Commit Graph

9123 Commits

Author SHA1 Message Date
Eugene Susla
2ddcb077ac Merge "Unit test to keep a11y cache critical events up to date" 2017-01-09 22:59:39 +00:00
TreeHugger Robot
e2489c67e1 Merge "Using official names for clusters and sections." 2017-01-09 20:25:45 +00:00
Chris Craik
2294458565 Merge "Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator" 2017-01-09 18:15:32 +00:00
Chris Craik
686d972e12 Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator
Bug: 33797688
Test: new RenderNodeAnimatorTest passes

Other clients use RenderNodeAnimator now, so call
ensureTransformationInfo to be safe.

Change-Id: I837d6f5b00bb368d2bbf77b94d4c19a8426b9927
2017-01-06 16:18:31 -08:00
Sergei Vasilinetc
ab08c65533 Merge changes I68d56d76,Iad432577
* changes:
  Hidden method to get a graphic buffer from a hardware bitmap
  Move GraphicBuffer to graphics package
2017-01-06 20:36:41 +00:00
Vadim Tryshev
311a5b5497 Using official names for clusters and sections.
Per the bug, “clusters” and “sections” are already the official names,
and for a general name for both, we use “keyboard navigation
groups”.

Bug: 33708251
Test: N/A.
Change-Id: Ieb1d2e8a1ad758f902b0a925fbe5d187e0f7ea06
2017-01-06 11:42:15 -08:00
Wale Ogunwale
26c0dfed7a Support for WindowContainer controllers and listeners
- WindowContainerController class allows a component outside window manager
to create a window container and communicate directly with it to make
changes. For example, the ActivityRecord class in activity manager uses the
AppWindowContainerController class to create and communicate with
AppWindowToken window container class which is its counterpart on the window
manager side.
- WindowContainerListener interface allows a component outside WM to get
notified of changes to a window container. For example, the ActivityRecord
class in AM implements the AppWindowContainerListener interface to get
notified of changes to the AppWindowToken container.

Bug: 30060889
Test: Existing tests pass and manual testing.
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Change-Id: I2896bfa46a80b227052528c7da8cf4e56beab4bc
2017-01-06 09:11:02 -08:00
Vladislav Kaznacheev
7039cbc6f3 Add content description and tooltip to menu item
Bug: 34076597
Test: manual
Change-Id: Ide32463252457721286c929ab2f8f7bae241835d
2017-01-05 09:57:40 -08:00
sergeyv
0a0f23163a Move GraphicBuffer to graphics package
Test: locally tested Bitmap.createHardwareBitmap method
bug: 30999911
Change-Id: Iad432577f26f2362ede9e77cd8a5425c010692e5
2017-01-04 14:01:52 -08:00
TreeHugger Robot
c587433dd1 Merge "Introducing teleportation between sections." 2017-01-04 20:43:44 +00:00
Eugene Susla
74c6cbaa63 Unit test to keep a11y cache critical events up to date
Unit test AccessibilityCache.CACHE_CRITICAL_EVENTS_MASK, introduced in Icbdb91803b646fa06aaf11996d350f6f65c1e809

Bug: b/32642665
Test: Ensure the introduced unit test passes
Change-Id: I60741c42334c61af8cd695e20c3a1f6be706824d
2017-01-04 11:45:08 -08:00
TreeHugger Robot
f2acf9df65 Merge "Fix custom pointer icon caching in ViewRootImpl" 2017-01-04 19:35:14 +00:00
Vadim Tryshev
8957f2ddda Introducing teleportation between sections.
The key combos differ from the ones in the spec because key combos
including Meta key don’t get delivered to apps. To fix this, I’ll
implement necessary plumbing after the feature freeze. Meanwhile,
temporary combos are used.

Given that the section and cluster teleportation have a lot in common,
I’m not introducing new methods, but adding a param to the cluster
teleportation ones. I should have also changed the names to something
like findNextKeyboardNavigationCluster => findNextFocusGroup, where
“FocusGroup” is a generalized name for clusters and sections.
However, that name depends on b/33708251, so I’m not doing it now. I
don’t rename existing identifiers, and using “focusGroup” for new
ones. Admittedly, this creates mess that will be resolved based on
the outcome of the mentioned bug.

Bug: 32151632
Test: Manual checks; CTS are coming after feature freeze
Change-Id: I01b5d6e5a9689b8f643fa4af695d2ce61265f374
2017-01-03 18:18:36 -08:00
Vladislav Kaznacheev
e40fb27f32 Fix custom pointer icon caching in ViewRootImpl
Currently if the pointer leaves a window which has
a custom pointer icon, the pointer icon is not updated
upon re-entry.

Bug: 33824962
Test: manual
Change-Id: I3e40413117b8aa2a1bde47394ef9318a03a7e135
2017-01-03 16:45:42 -08:00
Eugene Susla
eb1375c091 Always propagate AccessibilityCache events
Bug: b/32642665
Test: Steps:
	- Retrieve root AccessibilityNodeInfo
	- Change text on its child TextView
	- Wait for a few seconds to let the AccessibilityEvent propagate to
    the AccessibilityCache
	- Get the child AccessibilityNodeInfo from the root, corresponding to
    that TextView, and ensure that it's updated to reflect the text
    change
Change-Id: Icbdb91803b646fa06aaf11996d350f6f65c1e809
2016-12-29 13:05:58 -08:00
TreeHugger Robot
e097432e30 Merge "Revert "Add Brightness setting for VR Mode."" 2016-12-27 19:02:23 +00:00
Ian Pedowitz
7e96654f1b Revert "Add Brightness setting for VR Mode."
This reverts commit c7e853f511.

Bug: 33895226
Bug: 30984614
Change-Id: Icca320e02651b7dd7b8db84ab414f41edee32760
2016-12-27 18:28:36 +00:00
Santos Cordon
6982a108b2 Merge "Add Brightness setting for VR Mode." 2016-12-22 23:08:55 +00:00
TreeHugger Robot
8644daa39f Merge "Adjust tooltip layout" 2016-12-22 22:39:43 +00:00
Vladislav Kaznacheev
20a12da3ce Adjust tooltip layout
Position a mouse hover tooltip closer to the target.
Limit tooltip width and make it multiline (maxLines=3).
Show a long press tooltip above the target, not below.

Bug: 33352391
Bug: 33353823
Bug: 33354000

Test: manual
Change-Id: Ie00353d715d73d432b5d892a0a7c04508a003a78
2016-12-22 13:17:20 -08:00
TreeHugger Robot
6318e36a52 Merge "Restoring last focused view when teleporting to a cluster." 2016-12-22 21:11:38 +00:00
Santos Cordon
c7e853f511 Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Change-Id: Ie5578bbd6ea346f0eb34fe4abbfd604a5d7c0c93
2016-12-22 12:27:51 -08:00
Vadim Tryshev
01d8c49e04 Restoring last focused view when teleporting to a cluster.
The UX spec requires each cluster to remember which view was last
focused in it, and focus on it upon the teleportation to this
cluster.

This CL implements saving and restoring the focus.
It also introduces a public API so that an app could switch to a
cluster as if it was teleported to.

Bug: 32151632
Test: Manual checks; CTS are coming after feature freeze.
Change-Id: I0dc816776386015a7f1235f93e3dd9c03dfffcd6
2016-12-21 17:41:33 -08:00
Selim Cinek
c4946d4a00 Merge "Revert "Fast-path for ViewGroup#invalidateChild, invalidate tests"" 2016-12-21 15:57:38 +00:00
Selim Cinek
1cb8b08ae4 Revert "Fast-path for ViewGroup#invalidateChild, invalidate tests"
This reverts commit f7505803ea.

Change-Id: Ie7714360357e2baaf7723b8d992b3c6c4b0b9989
2016-12-21 15:34:30 +00:00
TreeHugger Robot
89eaa33e11 Merge "Fast-path for ViewGroup#invalidateChild, invalidate tests" 2016-12-21 00:34:05 +00:00
Chris Craik
f7505803ea Fast-path for ViewGroup#invalidateChild, invalidate tests
Bug: 33460152
Test: new tests passing

We spend a lot of time computing a damage rectangle that the ViewRootImpl ignores with HW
acceleration. Skip all that with a fast path.

Change-Id: Ia7447d1242cd5279be2ce34eead0cd813baffd33
2016-12-20 11:04:30 -08:00
Michael Kwan
cd6be5bdab Fix OnCancelListener for Dialogs on swipe to dismiss. am: 67639a5f67 am: 5a0c0ffd03
am: 95ccfb0dcc

Change-Id: I25f9462c60a59582d26a68c2cc7a2ca5a1c11857
2016-12-19 19:34:41 +00:00
Michael Kwan
95ccfb0dcc Fix OnCancelListener for Dialogs on swipe to dismiss. am: 67639a5f67
am: 5a0c0ffd03

Change-Id: Id8faa62cb551424036aae9f542f2d0776cfea522
2016-12-19 19:17:48 +00:00
Michael Kwan
5a0c0ffd03 Fix OnCancelListener for Dialogs on swipe to dismiss.
am: 67639a5f67

Change-Id: I92bc472b3519020eeadf61b1e8047aee9e8bd96c
2016-12-19 19:11:48 +00:00
Michael Kwan
67639a5f67 Fix OnCancelListener for Dialogs on swipe to dismiss.
Swipe to dismiss on dialogs did not dispatch onCancel events
to OnCancelListeners. Resolve by adding listener to monitor
swipe to dismiss events and dispatch onCancel events when
that occurs.

Bug: 33663411
Change-Id: I64ff29e008d485a4559eb3d1ff7f0e74dccff404
2016-12-16 13:43:16 -08:00
Vadim Tryshev
418b1fc512 Restricting navigation into and from clusters.
Tabbing loops inside cluster. Tabbing outside of clusters (i.e. in
the default cluster) won’t enter clusters. Initial focus won’t go
into a cluster.

Arrows work like before.

Bug: 32151632
Test: Manual checks. CTS test will be added after feature freeze.
Change-Id: Icecbd75394e2dd4afe2e1c4e6bc9ac64f6785699
2016-12-16 10:41:44 -08:00
TreeHugger Robot
5fb5881dbd Merge "Adding support for PIP actions." 2016-12-15 22:52:30 +00:00
Chris Craik
9180f64186 Merge "CriticalNative for RenderNode and DisplayListCanvas" 2016-12-15 21:48:17 +00:00
TreeHugger Robot
8102d91377 Merge "Teleportation between clusters." 2016-12-15 21:40:12 +00:00
Vadim Tryshev
01b0c9ed4e Teleportation between clusters.
Per the UX spec, key combos for quickly jumping between clusters are
Meta+Right and Meta+Left. However, these events don’t get delivered
to the app, and I’ll have to implement this plumbing after the
feature freeze. For now, the temporary combos are Ctrl-Shift-”-”
and Ctrl-Shift-”+”.

In addition to the key combo processing, the CL adds public APIs for
teleportation; they are similar to the API for moving the focus.

Bug: 32151632
Test: Manually checking that teleportation works. CTS test will be
added after the feature freeze.

Change-Id: I622156b9e4cc7c44e61623081d6d079bbe04fd02
2016-12-15 11:51:27 -08:00
Chris Craik
fc29424a3c CriticalNative for RenderNode and DisplayListCanvas
Bug: 33460152
Test:  adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner

- Also FastNative for setDisplayList, simplifying upcall into field setter.

- Also removes depth sweep parameter for ViewShowHideTests for now, they're not
providing much extra info.

Together with Outline/Path CL, about 25% faster visibility toggles

960MHz Bullhead Before (prior to Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=743505
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=332420
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=354154
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=1106095
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1261290
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=356153
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=362149

After (this CL + Outline/Path CL):

$ adb shell am instrument -w -e class android.view.ViewShowHidePerfTest com.android.perftests.core/android.support.test.runner.AndroidJUnitRunner | grep min
INSTRUMENTATION_STATUS: add[Factory:NestedLinearLayoutTree,depth:6]_min=636061
INSTRUMENTATION_STATUS: goneToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=267481
INSTRUMENTATION_STATUS: invisibleToVisible[Factory:NestedLinearLayoutTree,depth:6]_min=289433
INSTRUMENTATION_STATUS: recordAfterAdd[Factory:NestedLinearLayoutTree,depth:6]_min=976827
INSTRUMENTATION_STATUS: remove[Factory:NestedLinearLayoutTree,depth:6]_min=1207286
INSTRUMENTATION_STATUS: visibleToGone[Factory:NestedLinearLayoutTree,depth:6]_min=286148
INSTRUMENTATION_STATUS: visibleToInvisible[Factory:NestedLinearLayoutTree,depth:6]_min=292834

Change-Id: Iaddfa9550bdbab807c662595d005126d98cdc277
2016-12-15 11:30:08 -08:00
Phil Weaver
037692d5ab Add null check to a11y interrupt. am: 74f9e1b867
am: 718f403b50

Change-Id: I9d70640813bd91e035f9614f0403e18b7706e53f
2016-12-15 19:12:02 +00:00
Phil Weaver
278782f275 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I51bcf42327f30a0c6b1dc7666a5c057d44eec98c
2016-12-15 19:05:00 +00:00
Phil Weaver
718f403b50 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I8bb63b88a12ab6f8dfae42918ab9fdf4b1a457b5
2016-12-15 19:04:59 +00:00
Phil Weaver
74f9e1b867 Add null check to a11y interrupt.
Also adding same robustness to interrupt that we have for
sending a11y events.

Bug: 32507871

Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
(cherry picked from commit 867ad35d9c)
2016-12-15 08:06:15 +00:00
TreeHugger Robot
d047116fad Merge "Remove unnecessary shadow damage calc in invalidate" 2016-12-15 02:43:05 +00:00
Chris Craik
8fb56d0272 Remove unnecessary shadow damage calc in invalidate
Test: builds, boots

Work already done in native, via RenderNode::damageSelf and
RenderProperties::getClipDamageToBounds.

Change-Id: Id96d00d58d61c629dabba49dde3bef1c7b079e89
2016-12-14 16:05:49 -08:00
Winson Chung
a29eb98d9f Adding support for PIP actions.
- Introduced generic RemoteAction to represents an action
  that can be made across processes with an icon and text
  description based on a Notification action.
- Modified PinnedStackController to ensure that it notifies
  the listeners from the source of truth, this ensures that
  SysUI is in the right state if killed and re-registers
  itself.

Test: Enable menu & minimize in SystemUI tuner.
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testNumPipActions

Change-Id: I5b5d0cf9de3f06b5687337d59cfb91e17355bdb1
Signed-off-by: Winson Chung <winsonc@google.com>
2016-12-14 12:15:07 -08:00
TreeHugger Robot
7198ca863e Merge "Fix merge for OnDrawListener" 2016-12-14 20:12:35 +00:00
Phil Weaver
9a14b56b60 Merge "Add null check to a11y interrupt." 2016-12-14 18:49:30 +00:00
Vadim Tryshev
ce3264dac7 Adding public API for marking nodes as clusters and sections.
Clusters:
We need clusters to limit the size of the “tab loop” by
widgets related to the current context: working in the
app’s client area, choosing a command in the action bar
etc.

Clusters are a generalization of the current action bar’s
behavior.
An activity can have several clusters.
A cluster is a view or a view group group marked as such.
Pressing Tab loops inside the cluster, but you can exit it via
arrows.
You can teleport between clusters via special key combos.

Sections:
Sections live inside clusters.
They are needed for simplifying navigation in complex
hierarchies: instead of tabbing or arrowing, you can simply
teleport to the the next/previous section by pressing a
special key combo.
Example: think about panes in GMail app or dir/files
panels in a file manager.

Otherwise, sections are normal view groups: for example,
they don’t limit keyboard navigation in any way.

Bug: 32151632
Test: Checking for syntax errors and that Android starts.
Change-Id: Ic78495d0749db65d5177017553d37f870354c6bc
2016-12-13 11:10:51 -08:00
TreeHugger Robot
d4f08a007d Merge "AutoFill Framework refactoring." 2016-12-13 04:05:51 +00:00
Felipe Leme
1ca634a544 AutoFill Framework refactoring.
The AutoFill Framework uses the same AssitStructure provided by the Assist API
and so far it was using the same methods as well, both internally and externally
(public API).

Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic).

This CL also splits the original 'auto-fill' request in 2 types of requests,
which are set by View flags:

- ASSIST_FLAG_SANITIZED_TEXT
- ASSIST_FLAG_NON_SANITIZED_TEXT

It also added new methods and callbacks to handle save requests.

Bug: 31001899
Test: manual verification

Change-Id:  I4eb09099dc19a43cb7e053e64d939aed3704b410
2016-12-12 18:22:45 -08:00
Wale Ogunwale
72919d2c31 Untangle creation of Task from addition of AppToken in WM.
Makes it easier to follow what is going on and also clean-up in
preparation of stand way for AM to interact with containers in WM.

Test: Existing tests pass and manual testing
Change-Id: I91754b6d974dce2f696453cdaed175efb0f10c73
2016-12-12 15:09:03 -08:00