Commit Graph

356 Commits

Author SHA1 Message Date
Hongwei Wang
c0cc6218aa Enables back gesture nav in screen pinning
Bug: 138969972
Test: Back gesture in screen pinning mode
Change-Id: I0ddb7a6e7978e7ec82d7949048e75147c5ece3c8
2019-08-13 10:50:43 -07:00
Adrian Roos
5f2c9a14f5 GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.

Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
2019-08-05 21:19:40 +02:00
Winson Chung
5b6a1fe8a8 Adding quick settings flag to sysui state
- We were previously ignoring the QS state for notifications expanded since
  we were only using that flag for gating whether to allow back. But since
  we also use the state for gating swipe up, we should be explicit and
  check that both notifications are hidden and we are not in QS.

Bug: 135969043
Test: Swipe into QS, ensure the state is set
Change-Id: Ia284938e32f54998bf7aba3a051de2b30cdc0e26
2019-07-28 05:29:59 +00:00
Vinit Nayak
3a9f1f547a Prevent key removal on cache update
Recent thumbnail cache keys were prematurely
deleted from the TaskKeyCache.

Test: atest SystemUITests:TaskKeyLruCacheTest

fixes: 111077107
Change-Id: I4d38ba1f69b4a4b9898e1951b68181f27f92c116
2019-07-26 01:20:14 +00:00
Winson Chung
48e3cfc06a Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev 2019-07-24 05:14:05 +00:00
Winson Chung
cb6454e68a Proxy search disabled flag to Launcher
Bug: 137652372
Test: Just adding a flag
Change-Id: Ib1936dc0d2eed02bc2ef0dd7e091cbc4fa7af682
2019-07-23 15:55:10 -07:00
Winson Chung
7a545ae9cc Modify deferred recents animation cancel to work without screenshot
- Allow the recents animation runner to request deferring a cancel from
  stack order change until the next app transition start without using
  a screenshot. This allows launcher to set this state, then start an
  activity without a flash due to the animation not finishing immediately
- Always prepare a transition when using the deferred cancel to ensure
  an app transition callback
- Handle app transition canceled as well (if canceled, we continue to
  cancel recents the animation with/without the screenshot as requested)
- Remove internal lock and use the global WM lock when setting the defer
  cancel state
- Renamed a few methods to clarify the deferred cancel flow

Bug: 137196872
Test: atest FrameworksServicesTests:RecentsAnimationControllerTest
Test: atest WmTests:RecentsAnimationTest
Change-Id: Ie8f6f60b6bf6777e36f24749b30f90c8c26ee848
2019-07-23 15:50:33 -07:00
Sunny Goyal
f5b03e0921 Adding method to check if a task is running in home stack
Bug: 137197916
Test: Verified on Launcher
Change-Id: I0260fa63e19bf7a22d81f44b56bd7e9818b19d16
2019-07-12 14:08:43 -07:00
TreeHugger Robot
7d5da92740 Merge "Autoenabling gesture mode only is the device is unmanaged" into qt-r1-dev 2019-07-12 15:47:36 +00:00
Sunny Goyal
56d145fef9 Autoenabling gesture mode only is the device is unmanaged
> Adding a protected broadcast to enable gesture mode

If the device is not managed, gesture mode will be wnabled once setup-wizard
finishes. Otherwise, it will wait for a protected broadcast from the device/profile
owner app which can switch the device to gesture mode.

Bug: 134473386
Test: Verified on device setup in device owner and profile owner mode
Change-Id: I7d32d5461eef19a30f323295c7a9bac975adbf91
2019-07-09 14:37:29 -07:00
Jorim Jaggi
d6f0a5c243 Launch recents from main thread
Such that binder response inherits our nice scheduling
characteristics.

The old logic isn't really needed anymore, as we don't do anything
interesting on the main thread.

Test: Open app from recents
Fixes: 136111411
Change-Id: Ibfb0f60113bc0d9d94844ea4cde0e78723183eb2
2019-07-08 16:53:08 +02:00
davidln
1ceedb55d0 Notify on task display change.
This is a targeted fix for not receiving a task stack change callback
when a task with a resumed Activity is reparented to another display.

Bug: 128932906

Test: manual - launch activity from virtual display onto default display
  in a new task, verify callback notified. atest WmTests
Change-Id: Idabad8379cded664bcf302d5c6fb69564d158eb7
2019-06-25 21:05:31 -07:00
Sunny Goyal
7c3d6126bf Merge "Using correct slop for checking quickstep gesture" into qt-dev
am: 6f72636bb6

Change-Id: I909f0cc2e32ba44664e88046529cc626a81c8a31
2019-06-19 18:35:24 -07:00
Sunny Goyal
c55bac635a Using correct slop for checking quickstep gesture
Bug: 135214165
Test: Compiles
Change-Id: I6d74b33fce31346086acfaba1b9ebfeed8f928e6
2019-06-19 12:11:52 -07:00
Sunny Goyal
29a2b1109c Merge "Hiding home handle while on home in no-button mode" into qt-dev
am: 702c5199f9

Change-Id: I4c6f425736ff84ed21d513b00ee16219240b4b74
2019-06-17 17:41:33 -07:00
TreeHugger Robot
702c5199f9 Merge "Hiding home handle while on home in no-button mode" into qt-dev 2019-06-18 00:10:17 +00:00
Sunny Goyal
c73ce70467 Hiding home handle while on home in no-button mode
> Unifying handling home and back button alpha logic

Test: go home, manual
Bug: 134381592
Change-Id: I93a72cc4ac252f2ced22216f14c50b074e9903c8
2019-06-17 12:50:24 -07:00
Jorim Jaggi
a8393c6b07 Merge "Trace sync rt transaction applier" into qt-dev
am: c6f5069668

Change-Id: Ifdfa1389a022a396167e606287485aabf7768c76
2019-06-13 16:29:14 -07:00
TreeHugger Robot
c6f5069668 Merge "Trace sync rt transaction applier" into qt-dev 2019-06-13 23:12:00 +00:00
Jorim Jaggi
84149044fd Trace sync rt transaction applier
Test: Trace
Bug: 134583193
Change-Id: I00c2863f954e4c991d684ce4220380573db4d749
2019-06-13 21:45:14 +02:00
Matt Pietal
e43cea0622 Merge "GlobalScreenshot - Fix race condition" into qt-dev
am: 0ebf0252e0

Change-Id: Idd450a77f83c91b50e706b17ef3fb123c000a779
2019-06-11 17:12:33 -07:00
Matt Pietal
777c82d9b7 GlobalScreenshot - Fix race condition
It is possible for the call to system windows to occur slightly after
the ChooserActivity gets launched, therefore preventing it from ever
showing. Wait on the future before attempting to launch the activity.

Bug: 134976976
Test: Screenshot, then share over and over
Change-Id: Iba98a079412f8e35643f3a1db04e749b3c654637
2019-06-11 15:50:54 -04:00
Winson Chung
8533a4cc62 Merge "Expose keyguard showing-but-occluded state to launcher" into qt-dev
am: c8120d6d6a

Change-Id: Id709a812fc1db45e99a69a7114f2ff665b142cc2
2019-06-04 18:16:37 -07:00
Winson Chung
c8120d6d6a Merge "Expose keyguard showing-but-occluded state to launcher" into qt-dev 2019-06-04 20:56:37 +00:00
Winson Chung
7bbeb4531a Expose keyguard showing-but-occluded state to launcher
Bug: 133871965
Test: Verify with sysui dump in various states
Change-Id: I39c99712d525e0823a86d32510beb0a35103dd5e
2019-06-04 10:36:32 -07:00
Steve Elliott
47350b01b4 Merge "Fix loading classloader for plugins whitelisted by component name" into qt-dev
am: b730e36596

Change-Id: If9eab4b100c80a50b9288fd3c47527c9058e3f8a
2019-06-04 05:49:22 -07:00
TreeHugger Robot
b730e36596 Merge "Fix loading classloader for plugins whitelisted by component name" into qt-dev 2019-06-04 12:36:12 +00:00
Winson Chung
466b5dfd34 Merge "Fix regression in swiping up from lockscreen" into qt-dev
am: fafe6dd571

Change-Id: Ie6a8a8983c4fa9340309353670f7940b12f2c18b
2019-06-03 18:38:38 -07:00
Winson Chung
241e63d2ff Fix regression in swiping up from lockscreen
Bug: 134391878
Test: Swipe up to assistant from lockscreen

Change-Id: I32fe638de507775c5744344bc5e71509e4a5b0e1
2019-06-03 22:16:11 +00:00
Steve Elliott
66109771d3 Fix loading classloader for plugins whitelisted by component name
Fixes: 134162974
Test: manual
Change-Id: I1e6df38b455eb0038f1b255724619ba53561ff2a
2019-06-03 14:05:37 -04:00
Siarhei Vishniakou
7e2a341ee1 Merge "Use unbatched inputeventreceiver, reduce touchslop" into qt-dev
am: 2fb4cb55f0

Change-Id: I1f638492b1be20670d2379da073519348a08e9fd
2019-05-30 14:47:37 -07:00
TreeHugger Robot
2fb4cb55f0 Merge "Use unbatched inputeventreceiver, reduce touchslop" into qt-dev 2019-05-30 21:42:27 +00:00
Sunny Goyal
38c6070357 Merge "Adding a compat class to listen for exclusion rect changes" into qt-dev
am: 14aabea07c

Change-Id: I08002611d68d050ef3171d010c5f261bf15e6737
2019-05-30 01:28:23 -07: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
Hyunyoung Song
8e324522a2 Merge "Add live wallpaper metrics to atoms.proto" into qt-dev
am: 2f6110f832

Change-Id: I91f1ffde3d66850fd2b47eed24ba33f8c15a4a8c
2019-05-24 16:00:27 -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
3ba8d29377 Merge "Clean up system ui state flags" into qt-dev
am: 4786a567e8

Change-Id: I1d773c7dabb2359575de16389e74fb447abf58ff
2019-05-21 22:22:12 -07: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
Issei Suzuki
cac2a50465 Synchronize bubble activity rendering status and its visibility change.
- Add an API ITaskStackListener.onSingleTaskDisplayDrawn() to notifity contents
  are drawn for the first time on a display which can only contain one task.
- BubbleController updates contents visibility (actually alpha value) of
  the Surface in a ActivityView.

Bug: 130442248
Test: atest WmTests:TaskStackChangedListenerTest
Change-Id: Ie5aed373996419b059935889b564ca91c2e3cf23
2019-05-21 13:23:41 +08: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