Commit Graph

321 Commits

Author SHA1 Message Date
TreeHugger Robot
2fb4cb55f0 Merge "Use unbatched inputeventreceiver, reduce touchslop" into qt-dev 2019-05-30 21:42:27 +00:00
Sunny Goyal
9a98e2265c Adding a compat class to listen for exclusion rect changes
Bug: 133844237
Test: Verified library changes with Launcher
Change-Id: I39e817943d3804353dbe17fd4b7339970181acb5
2019-05-29 16:45:25 -07:00
Siarhei Vishniakou
faa8799621 Use unbatched inputeventreceiver, reduce touchslop
To ensure gesture navigation has sufficient time to intercept gestures,
use unbatched inputreceiver, meaning that input events will be processed
immediately rather than on vsync boundaries.

Also, reduce touch slop to ensure that interception happens before the
app starts to react to the gesture.

Fix provided by michaelwr@.

Note: if the device is slow (for example, still executing first-boot
instructions), then the symptom can still be reproduced. However, once
the performance is good, then the issue is no longer observed.

Bug: 130352502
Test: open google maps and swipe from right and left. observe that the
map doesn't start moving before the back gesture icon appears.

Change-Id: I0696509c7f1cb0a0d2450080e0b61e2218a01140
2019-05-29 13:46:54 -07:00
Kunhung Li
286c52f8c2 Add live wallpaper metrics to atoms.proto
Resue StyleUIChanged message to append live wallpaper events.

Test: make statsd_testdrive && statsd_testdrive 179
Bug: 133209268
Bug: 127745228
Change-Id: I864d8e35bd071f7bcd2249ef20446a42a680dc6d
2019-05-24 01:42:15 +00:00
Winson Chung
a706700a31 Clean up system ui state flags
- Move setting of the flags to the responsible components, updating them
  directly instead of duplicating the logic in OverviewProxyService
- Add flags for tracking keyguard state, overview disabled state, and
  screen pinning state
- Ensure the notification expanded state excludes quicksettings
- Add logging for states and both back/assistant disabled states

Bug: 132107485
Bug: 131698989
Test: Immersive mode - ensure you can't swipe back, ensure you can't swipe
                       up or open the assistant
Test: Expanded notification - ensure back doesn't work when locked/unlocked
Test: Expanded QS - ensure back works when locked/unlocked
Test: A11Y - ensure that 2 finger swipe up shows accessibility menu
Test: A11Y - ensure that 2 finger swipe up & hold works
Test: Bouncer - launch notification over launcher, ensure back works,
 	        ensure assistant doesn't work
Test: Screen pinning - ensure back/assistant doesn't work

Change-Id: Ife37bf40602b997e6c2b534d9fa274ce07c53b07
Signed-off-by: Winson Chung <winsonc@google.com>
2019-05-21 10:38:05 -07:00
Miranda Kephart
4be269094e Add onAssistantGestureCompletion to SystemUiProxy
Allows passing the incoming velocity for gestures. This lets
SystemUI react differently to flings vs drags.

Bug: 132356358
Test: manual
Change-Id: I91df5801eb3399c94320307ccdbeca7763075984
2019-05-20 10:53:15 -04:00
Hyunyoung Song
d200fa1908 Revert "Notify OverviewProxyService of scrim colors"
Bug: 130451254
Test: manual

This reverts commit d9b9847ad6.

Reason for revert: found a better way to extract scrim colors without going through OverviewProxy

Change-Id: Iac97fee4d9b15757f7211889f6c370757c0870e3
2019-05-13 16:53:56 +00:00
Lucas Dupin
d9b9847ad6 Notify OverviewProxyService of scrim colors
Bug: 130451254
Test: manual
Test: atest SysuiColorExtractorTests
Change-Id: I0ce271d3250ff5292a8e195c4c19ee99328ebad4
2019-05-10 11:00:33 -07:00
Mark Renouf
66bb870917 Adds missing break after last statement in switch
Test: no functional change
Bug: 123542488
Change-Id: I756755324e7a59e58affc13c272c8154425b8363
2019-05-07 13:55:35 -04:00
Mark Renouf
446251dc52 Adds OnBackPressedOnTaskRoot
This allows Bubbles to be collapsed instead of finished
when there is only one activity in the stack.

Bug: 126852149
Test: launch activity, press back
Change-Id: Iad8db0549853e3f385d54fc6b6cea5e502d37139
2019-05-07 10:00:07 -04:00
Jeff Chang
6d856d335d Merge "Introduce the display ID to TaskKey" into qt-dev 2019-05-06 02:22:52 +00:00
Jeff Chang
bf589bb5b6 Introduce the display ID to TaskKey
Let the recents app to know the recent task was running from which display.

Bug: 118266305
Test: 1. atest ActivityManagerRecentTaskInfoTest
      2. atest TaskRecordTests

Change-Id: Ief2538056d414d8317b495ea45d50ccb2dc4518f
2019-05-03 21:58:54 +08:00
Steve Elliott
02bbaaa470 Allow specifying full component names in sysui plugin whitelist
This allows for a more granular whitelist, where a single package
could have multiple plugins available but only a subset are enabled.

Bug: 123881720
Test: manual
Change-Id: Ie9b2c31f08d9dac8a892501345e8ff85143f40f9
2019-05-03 00:34:19 +00:00
Winson Chung
67b090243d Preemptively clear buffer reference if snapshot is unused
- Normally this will be picked up in the next GC, but there is no reason
  to wait

Bug: 129295298
Test: Manual
Change-Id: I945336e86d0980f926586cfba6327c8c6c142ce8
2019-05-02 14:00:51 -07:00
TreeHugger Robot
c83bdb4626 Merge "Remove interaction flag code replaced by QuickStepContract (1/2)" into qt-dev 2019-05-01 00:18:35 +00:00
Beverly
440e6fae5e Add plugin to list before sending PLUGIN_CONNECTED
Test: manual
Fixes: 130527695
Change-Id: Ia40c25bc86aff18ed56399da89b6fdcc8a8d653f
2019-04-30 23:32:35 +00:00
Winson Chung
975eea7e98 Merge "Update sysui for screen pinning with gestural nav" into qt-dev 2019-04-30 02:10:25 +00:00
Matthew Ng
b2f89d3ee8 Remove interaction flag code replaced by QuickStepContract (1/2)
Test: manual
Bug: 112934365
Bug: 131419978
Fixes: 129497226
Change-Id: Iee5f5f99a1bea84fc69c8291e3f982ed68b875c5
2019-04-26 19:09:23 +00:00
Winson Chung
4d30e9ede9 Update sysui for screen pinning with gestural nav
- Add call to stop screen pinning
- Modify layout/description to reflect new gesture

Bug: 130828539
Test: Manual
Change-Id: I970a2dc7273170a735cf019f5c5ff6c1c3c269c0
2019-04-25 23:18:40 -07:00
Sunny Goyal
e951976e80 Fixing wrong message sent when surface params are applied
Bug: 123874711
Test: Verified jar with Launcher
Change-Id: I966bfc5bd87396916dbacdf894dc6cca26a03593
2019-04-25 11:53:57 -07:00
Winson Chung
05500a3651 Merge "Ensure we get the right nav bar mode for the current user in sysui" into qt-dev 2019-04-25 06:14:57 +00:00
Winson Chung
1aa24b9b5e Ensure we get the right nav bar mode for the current user in sysui
- Load resources from the current user's context to ensure the right
  overlays are read
- Create a controller in sysui to dispatch mode change to prevent callers
  from calling with the wrong user's context
- Clean up the quickstep contract to prevent launcher from calling methods
  using the baked in fw resource ids

Bug: 130185871
Test: Switch to secondary user, ensure the mode is read correctly
Change-Id: I00d9276185777e340b3e758345a00d2e9b3e3e64
2019-04-24 16:51:26 -07:00
Sunny Goyal
247eb895dc Exposing some accessibility methods and state to be used in Launcher
Bug: 130905838
Test: Verified the build with updated launcher
Change-Id: I09f77abc8c767fca8879610bc3fcef1f4da7f821
2019-04-24 12:10:27 -07:00
Sunny Goyal
21a47e6dea Adding callback when surface params are applied
Bug: 123874711
Test: Verified that there are no leak logs
Change-Id: I5dcb27c9c44d674363824e703b923fa83e3132b9
2019-04-23 06:36:01 -07:00
Dave Mankoff
bbad0dda60 Replace synchronous calls to shared prefs with async calls.
Also, make a copy of protected data to prevent accidental changes
from outside callers.

Bug: 130525551
Test: Manual.
Change-Id: I7b6efa32bc6db88b79579effaa7ffe1466a80380
2019-04-19 21:15:33 +00:00
Winson Chung
e2a686dca3 Check that sysui states before allowing back gesture
- Ensure not in immersive mode, and also that the notification panel is
  not expanded

Bug: 130340004
Bug: 130417141
Test: Manual, ensure back doesn't work when notification panel is down or
      app is in immersive mode

Change-Id: I29f5cd80cc89b28802ca8b2c9e2956ae5b3b1151
2019-04-18 14:15:08 -07:00
TreeHugger Robot
73913e3bf6 Merge "Fixing HardwareBuffer leak when creating a bitmap" into qt-dev 2019-04-11 21:06:40 +00:00
Sunny Goyal
62915b28e0 Fixing HardwareBuffer leak when creating a bitmap
Callers are supposed to close the hardware buffer themselves. Creating
a utility method around this

Bug: 123874711
Test: No more leak warning on device
Change-Id: I2cf215f0646222f63e564a58edab1ffffa396ff3
2019-04-10 21:59:57 +00:00
Winson Chung
a313298ba9 Add state callbacks to launcher
Bug: 129785904
Test: Manual, change states and verify state is sent

Change-Id: I8db10688615f3021d8d1241a15010fa4a8c121b4
2019-04-10 14:18:35 -07:00
Tracy Zhou
9c675d4f4b Implement the new PiP animation (fade-in).
The new fully gestural navigation changes how user goes home from an
app as well as the animation of the app transition. The current PiP animation (bounds) is not compatible with the new model because of the direction of movements. Instead of animating bounds, we can fade the PiP window in after app closing animation finishes.

Fixes: 122609330
Test: 1. Open youtube, play a video, tap home to observe the new PiP
animation (demo video attached in the ticket b/122609330) 2. With gestural nav on, observe pip transition when swiping up to home.
atest ActivityManagerPinnedStackTests
atest BoundsAnimationControllerTests
atest RecentsAnimationTestTest

Change-Id: I28eeb1aa99c4fd569845ca7a42561f6b20796f9b
2019-04-09 10:37:32 -07:00
Winson Chung
099d3ae04b Merge "Add logging callback for back action" 2019-04-03 22:40:47 +00:00
TreeHugger Robot
b89d92b5d6 Merge "Adding some helper methods in QuickstepContract" 2019-04-03 20:26:44 +00:00
Winson Chung
04ff8bda2b Add logging callback for back action
Bug: 127848641
Test: adb shell setprop log.tag.UserEvent VERBOSE, hit back
Change-Id: Ic2289278acfd804cf40b93d0531a138d6e5c0445
2019-04-03 12:51:09 -07:00
Sunny Goyal
18ae97e337 Adding some helper methods in QuickstepContract
Test: N/A
Change-Id: I3d4c05820659a1f91d4a23f2bfd2ffc56ed06234
2019-04-03 11:25:59 -07:00
Sunny Goyal
a6a581279a Using input monitor for edge swipe handling for back
Bug: 112934365
Bug: 124299674
Bug: 124298541
Test: Verified build on device
Change-Id: Ic4cc4339b22aee63b0d96587f05dae3d8c01563f
2019-04-03 10:22:34 -07:00
Govinda Wasserman
1c72113451 Merge "Adds the ability for SysUI to request QSB alpha changes." 2019-04-03 15:59:10 +00:00
Adrian Roos
11dfd279a3 WindowInsets: populate system gesture and tappable element insets
Also fixes an infinite recursion when invoking
TestableContext.(un)registerComponentCallbacks().

Test: atest WindowInsetsPolicyTest
Bug: 126511573
Change-Id: I5c9f40054493a83746bce6124d72412e8eb8a0d1
2019-04-01 15:46:13 +02:00
Govinda Wasserman
c4c70f3e6a Adds the ability for SysUI to request QSB alpha changes.
Test: Tested locally
BUG:124063782
Change-Id: I2bdb2e66f3fa803695042e41e415b16f6f7eddea
2019-04-01 09:01:19 -04:00
Winson Chung
e108b6777b Check the overlay state for updating sysui
Bug: 127366543
Test: Change the system navigation gesture setting, ensure SystemUI updates
Change-Id: I448ea554b0bea2e3742291fc9ce12ab87c9fdbd5
2019-03-24 18:55:40 -07:00
Winson Chung
85e745929f Remove the swipe up setting from system
Bug: 127366543
Test: adb shell dumpsys setting

Change-Id: I3a1a716a73d91048886b67444b574abdfc61323e
2019-03-23 22:28:22 -07:00
lumark
5428446535 Better support for cleaning up the recents animation
With Life Tiles in QuickSteps (b/111697218), launcher will
“punch a hole” for TaskView & the app window will be transformed
in it & keep the task is running.

To prevent launcher animates on TaskView without the real app surface
during task switching, launcher start RecentsAnimation to monitor
onStackOrderChanged without cancel animation when swiping to recents.

We use this as signal to screenshot the previous app window when next
app transtion start, make leash with screenshot surface to let it below
homeAnimationLayer, so that launcher can still control the leash,
and then callback onAnimationCanceled with screenshot parameter for
launcher to know if need to call IRecentsAnimation#cleanupScreenshot for
clean up screenshot, to make the next app transtion animation can work
smoothly without flickering.

Bug: 122593881
Test: manual
Test: atest RecentsAnimationControllerTest RecentsAnimationTest
Change-Id: I83504d578a17856623a53c04a7d3c54e5bcab5f4
2019-03-21 02:04:04 +08:00
Winson Chung
c5fe7ffba7 Add mechanism for freezing the system recent task list
- In order to support swiping between tasks in a stable list, this allows
  SystemUI to temporarily freeze the task list ordering until either an
  interaction within the current app, or some timeout occurs.

  This does not affect the actual task ordering, only the ordering of the
  tasks via the call to getRecentTasks() made from SystemUI.

Bug: 111926330
Test: atest WmTests:RecentTasksTest

Change-Id: I9ebda02e4e0d34fd2211cfbbed9f7b0ec35f86cc
2019-03-15 09:53:47 -07:00
TreeHugger Robot
e035a1fd2e Merge "Decrease the edge panels height to not overlap with ime" 2019-03-09 03:48:18 +00:00
Matthew Ng
63c8f34fc0 Decrease the edge panels height to not overlap with ime
Test: manual
Fixes: 124267373
Bug: 112934365
Change-Id: I5e8a79ab3df7ddf54f08a3ecc893bd222d11bc05
2019-03-08 15:30:04 -08:00
TreeHugger Robot
c47a64e94b Merge "Do not show assist affordance when no assistant is available" 2019-03-08 02:10:56 +00:00
TreeHugger Robot
66d64cd4d6 Merge "Add restart button for size compatibility mode activity" 2019-03-07 06:34:27 +00:00
Matthew Ng
add4c3986d Do not show assist affordance when no assistant is available
This also tells launcher that there is no assistant so it will not
consume input events.

Bug: 112934365
Test: manual
Change-Id: I5690cf2fffe45c955a9f165a0fdeac1db8641601
2019-03-06 21:35:52 +00:00
Riddle Hsu
cf33f1c5c2 Add restart button for size compatibility mode activity
- The floating restart button will show when an size compatibility
  mode activity shown with non-native screen configuration. e.g.
  display size changed, move to another display.
- Consolidate onDisplayRemoved into CommandQueue.Callback so the
  components which implement CommandQueue.Callbacks don't need to
  register display listener individually. The leakage of
  AutoHideController when removing display is also fixed by the way.

Bug: 112288258
Test: runtest systemui -c \
      com.android.systemui.SizeCompatModeActivityControllerTest

Change-Id: Ib04efe983ae0d8d21b33fb9fd9c60e7f6f0dc92e
2019-03-06 01:17:15 +08:00
TreeHugger Robot
5766681ae5 Merge "Only show smart actions for whitelisted apps in lock task mode." 2019-03-04 11:38:18 +00:00
TreeHugger Robot
24ed9e4f35 Merge "Receive assistant progress and start commands from launcher" 2019-03-01 23:15:36 +00:00