Commit Graph

9100 Commits

Author SHA1 Message Date
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
John Reck
9f8ec54244 Fix merge for OnDrawListener
Test: CTS tests for PixelCopy pass; without this
they time out as they never get the OnDraw call.

Change-Id: I6acced4699182b969f38a606a1314b2ffb38d760
2016-12-12 11:23:05 -08:00
Jorim Jaggi
40db029cfe Light navigation bar support (1/2)
Test: Open an app that has this flag set.

Test: android.systemui.cts.LightBarTests

Bug: 29058491
Change-Id: Idaff65fdd5c59b68ae9920726c9ea50b53f96675
2016-12-08 13:52:41 -08:00
Mark Renouf
cb566f368b Revert "Allow power button to close an input method" am: 28f0e5bf48
am: fc526f6e84

Change-Id: Ifcf2f842c91677128e458dd7256013263543937f
2016-12-07 17:38:13 +00:00
Mark Renouf
fc526f6e84 Revert "Allow power button to close an input method"
am: 28f0e5bf48

Change-Id: I678857531259617cc26941fcc832cb7670d25bfe
2016-12-07 17:29:25 +00:00
Mark Renouf
28f0e5bf48 Revert "Allow power button to close an input method"
This reverts commit d28e907183.
Test: manually tested

BUG: 33038203
Change-Id: I7a4c6e95a69abb2e40df73509b6e67b93eacf6ff
2016-12-06 17:43:28 +00:00
Ned Burns
df1710dc6e Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de am: f9566827f2
am: 768f62aac1

Change-Id: Ibe1a8b9a7cf71b715ae7d4e0157b5cdf1d52e81d
2016-12-06 02:48:01 +00:00
Ned Burns
768f62aac1 Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de
am: f9566827f2

Change-Id: I157e10afa6b8c0414c2af25d98bf5913928925f2
2016-12-06 02:38:47 +00:00
Ned Burns
081fd25237 Modify SwipeDismissLayout to perform its own exit animation
am: 7d6cb913de

Change-Id: Ie9784fa9b7c878371f1e12acbb362b36fc66e023
2016-12-06 02:33:23 +00:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
Phil Weaver
867ad35d9c 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
2016-12-05 14:57:48 -08:00
Michael Kwan
319cfe16f1 Disable swipe-to-dismiss for not cancelable dialogs. am: f7964be938 am: 85ba660b16
am: 1805ba1d76

Change-Id: I23863328b64f95915a7ecb7ceb35448bc10bdfbe
2016-12-05 18:21:14 +00:00
Michael Kwan
85ba660b16 Disable swipe-to-dismiss for not cancelable dialogs.
am: f7964be938

Change-Id: I6d71bb4c6acdc9d994766eebd7a6320356aa3a23
2016-12-05 18:09:10 +00:00
Jorim Jaggi
6aa763bbed Merge "Deprecate FLAG_DISMISS_KEYGUARD" 2016-12-05 10:43:50 +00:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
TreeHugger Robot
e9bf7c8436 Merge "Introduce PathInterpolator to native animators" 2016-12-01 20:21:13 +00:00
Mark Renouf
cf952e74b0 Allow power button to close an input method am: d28e907183 am: 8da4ced46c
am: 9a21708ec6

Change-Id: I63d939d4dbd889cbd6f83ef101d817ccd561d707
2016-12-01 01:41:56 +00:00
Mark Renouf
8da4ced46c Allow power button to close an input method
am: d28e907183

Change-Id: I0324d14bde85e3461d0fe605f3b83496b25b9c75
2016-12-01 01:29:11 +00:00
Doris Liu
9e9eeeeb78 Introduce PathInterpolator to native animators
For interpolators defined with a path, PathInterpolator is more accurate
and likely less costly for longer animations than what are currently
using as a substiute - LUTInterpolator.

Test: manual test and added a unit test
BUG: 32830741
Change-Id: I867c7a28e4261392cce9c45a2992ab4fd120c496
2016-11-30 16:03:23 -08:00
Chet Haase
a8ba43d288 Merge "Add layout_marginHorizontal|Vertical attributes" 2016-11-30 23:05:31 +00:00
Mark Renouf
d28e907183 Allow power button to close an input method
BUG: 33038203
Change-Id: I5c44dc49db6b960b4e3e42545bfbbab62f357f08
2016-11-30 16:01:42 -05:00
Sergei Vasilinetc
c1e6a12ab5 Merge "Add createHardwareBitmap on GraphicBuffer for SysUI" 2016-11-30 20:53:43 +00:00
sergeyv
9a02987642 Add createHardwareBitmap on GraphicBuffer for SysUI
Test: none
bug:30999911
Change-Id: Ic396e25d9e587665e634c3192e14ef4bc3dc78f7
2016-11-30 10:47:12 -08:00
Chet Haase
40b2de5d1c Add layout_marginHorizontal|Vertical attributes
These two new attributes are a short-hand way for specifying the
separate left/right (or start/end) and top/bottom margin attributes.
It is common to use the same margin on both edges, so these new
attributes make that common case easier and less verbose.

Issue: 30261490 Better way to define paddingTop/Bottom/Left/Right in XML if vertical paddings are the same and horizontal paddings are the same
Test: new CTS test in ViewGroup_MarginLayoutParamsTest
Change-Id: I183ace956892187b6ea086e61ed5b195c8903d7d
2016-11-30 07:39:57 -08:00