Commit Graph

417 Commits

Author SHA1 Message Date
jorgegil@google.com
62f735e0f6 Persist PiP size to be restored on re-entry
Adds support for restoring the PiP size along with its snap fraction.
Modifies PipBoundsHandler logic to use both the previous size and
position (snap fraction) when calculaing the bounds for re-entry.
Additionally, some phone-specific logic is added to ensure that the
re-entry size that is restored is the non-expanded size (i.e. the
size before the bounds are animated to expand when pip is clicked).

Bug: 143641277
Test: enter pip, move it, touch to expand, restore. Then re-enter
pip. Pip should retain its size and position.
Test: atest PinnedStackTests
Change-Id: I21b7e4bf9360cd7da9faf2015c04d12d37c0241f
2019-11-20 15:46:07 -08:00
Winson Chung
0c7f966aa9 Merge "Clear temp list after call" 2019-11-05 20:20:40 +00:00
Winson Chung
17f6ca12ff Clear temp list after call
- Also make sure to synchronize when adding/removing from the listener list

Bug: 139137636
Change-Id: I8085c93ddc4a194ea2c4faba245dd3ab2f323f88
2019-11-04 16:49:24 -08:00
Yunfan Chen
1abb683a66 Notify task description change to system UI (4/N)
The TaskStackChangeListener will take the task description chagne event
and notify the listeners. It will be able to let system UI handle the
theme change of the task correctly.

Bug: 113253712
Bug: 122726344
Test: go/wm-smoke
Test: Test with an app with theme, the listener will receive the
      background color.
Test: Manually registered a listener from system UI and the event is
      correctly received.

Change-Id: I087cc112be73cf421fa124cd0d6b238f91970a0c
2019-10-30 11:45:57 -07:00
TreeHugger Robot
48ed040e68 Merge "Adds CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY to ActivityManagerWrapper." 2019-10-24 01:31:46 +00:00
Andy Wickham
709825dfe1 Adds CLOSE_SYSTEM_WINDOWS_REASON_HOME_KEY to ActivityManagerWrapper.
Test: N/A
Change-Id: I7fa0389c09d949a6297c8a04dfa2dd6855cc80ed
2019-10-16 15:02:31 -07:00
TreeHugger Robot
453033f64d Merge "Use different reorder modes for fail safe before and after Overview" 2019-10-16 01:30:38 +00:00
Tracy Zhou
9e0354f651 Use different reorder modes for fail safe before and after Overview
Currently, when recents animation is cancelled from fail safe mechanism,
we put the previous app back to the top. It no longer makes sense when
live tile is in the picture since we don't want the user to see the
previous app being brought up when they turn off and on the phone.

Fixes: 142088072
Test: Turn off and screen and back on. Make sure the user goes back to
home instead of previous app in live tile mode.

Change-Id: I5f16c4c8c77b918dc706c45acadf143edc454de9
2019-10-15 13:39:17 -07:00
Issei Suzuki
d196637f9f Removed dead code around TRANSIT_TASK_IN_PLACE
Test: All existing tests still pass.
Change-Id: I881677c3a1737e4d0eca0a651216679819584179
2019-10-10 15:13:33 +02:00
Vinit Nayak
8e54796add Add callback to notify frozen RecentTasks
TaskStackListener can now know when
RecentTasks recents list has been
frozen and unfrozen.
Launcher needs this to know when to listen
for multiple swipe regions in quickstep
for apps with different orientations.

Fixes: 140116135
Test: Had Launcher be a consumer of new
listener and verified via logs and
debugger that it was sending the correct
callback when quickswitching apps.

Change-Id: I65fb92d2490c91837523b99563d4fef422dabb76
2019-10-07 15:01:01 -07:00
Colin Cross
13ce036c62 Merge "Merge "Set min_sdk_version for SystemUISharedLib" am: ce2417fa9c" into stage-aosp-master am: 0bda334b4f am: 1918e5cb87
am: e656874137

Change-Id: Iab883fda28814388b9844a2e55b2ef14692f7d78
2019-09-25 15:45:52 -07:00
Colin Cross
e656874137 Merge "Merge "Set min_sdk_version for SystemUISharedLib" am: ce2417fa9c" into stage-aosp-master am: 0bda334b4f
am: 1918e5cb87

Change-Id: I81f2cb5421671c310d01819b375ff3866dc6046e
2019-09-25 15:30:58 -07:00
Colin Cross
8e3c49d81e Merge "Set min_sdk_version for SystemUISharedLib"
am: ce2417fa9c

Change-Id: I175b6e39fd04f56faa03e3730144b49c1b14ef35
2019-09-25 15:07:22 -07:00
Hongwei Wang
a904e8d208 Merge "Moves shelf offset into SysUI package" 2019-09-25 21:22:59 +00:00
Hongwei Wang
9b751800bc Moves shelf offset into SysUI package
With this change, the shelf offset will be set directly by Launcher to
SysUI without WM being involved.

PinnedStackControllerTest is removed in this change since the only test
function is against WM.setShelfHeight. However, new tests regard
PinnedStackController should be added per b/141200935.

See also: go/pip-sysui-migration

Bug: 139016518
Test: atest PinnedStackTests
Change-Id: I606de3d8106ac12d7bf2b367877bc5bb345af3fe
2019-09-23 17:00:42 -07:00
Winson Chung
d585219545 Add wallpaper leash for remote and recents animations
Bug: 140626334
Test: atest RecentsAnimationControllerTest
Test: atest RemoteAnimationControllerTest

Change-Id: Id638256983801e722b57da0abd22e3e480d5559d
Signed-off-by: Winson Chung <winsonc@google.com>
2019-09-20 17:20:12 +00:00
Hongwei Wang
43a752be14 Move bounds calculation and snap fraction to SysUI
Major changes in this CL

- Added PipBoundsHandler in SysUI package handles the bounds calculation
and save/restore the snap fraction
- Added IPinnedStackListener.onSaveReentrySnapFraction and
IPinnedStackListener.onResetReentrySnapFration, both called from
PinnedStackController (WM) to SysUI
- Added IPinnedStackListener.onPrepareAnimation, called from WM to
SysUI to notify that an animation for pinned stack is about to happen
- Added IPinnedStackController.startAnimation, called from SysUI to WM
to actually start the pinned stack animation
- Updated tv/PipManager to use PipBoundsHandler as well

Known issues and what's next

- Shelf height is set after the animation is started, therefore one may
notice the PiP window is hovering over the shelf. This is tracked
separatedly by b/139016518
- Bounds calculations still exist in PinnedStackController since
onTaskStackChanged callback requires so. Once we addressed b/139016833
(move rotation bounds calculation to SysUI), they should be all gone.
- Move the pinned stack animation from WM to SysUI and we can furthre
remove IPinnedStackListener.onPrepareAnimation and
IPinnedStackController.startAnimation

More details: go/pip-sysui-migration

Bug: 139015463
Bug: 139015142
Test: atest PinnedStackTests
Test: atest PinnedStackControllerTest
Change-Id: Ib62d8152ecc7b18a671ec403af44cc517612169e
2019-09-18 23:01:00 +00:00
Colin Cross
6afa62024a Set min_sdk_version for SystemUISharedLib
Set min_sdk_version so that the manifest cant be merged into
Launcher3 when it is converted to Android.bp.

Test: mmma packages/apps/Launcher3
Change-Id: I28543d4be54aa789fbb452be005373239e1e0a6e
2019-09-17 16:00:21 -07:00
Hongwei Wang
7759895ee6 Revert "Move bounds calculation and snap fraction to SysUI"
This reverts commit e3ff139062.

Reason for revert: PinnedStackTests#testEnterPictureInPictureDiscardSavedPositionOnFinish flaky

Change-Id: I067c94d536b1db94523ef3eec3d443e0dc4cb575
2019-09-17 09:48:36 -07:00
Hongwei Wang
e3ff139062 Move bounds calculation and snap fraction to SysUI
Major changes in this CL

- Added PipBoundsHandler in SysUI package handles the bounds calculation
and save/restore the snap fraction
- Added IPinnedStackListener.onSaveReentrySnapFraction and
IPinnedStackListener.onResetReentrySnapFration, both called from
PinnedStackController (WM) to SysUI
- Added IPinnedStackListener.onPrepareAnimation, called from WM to
SysUI to notify that an animation for pinned stack is about to happen
- Added IPinnedStackController.startAnimation, called from SysUI to WM
to actually start the pinned stack animation
- Updated tv/PipManager to use PipBoundsHandler as well

Known issues and what's next

- Shelf height is set after the animation is started, therefore one may
notice the PiP window is hovering over the shelf. This is tracked
separatedly by b/139016518
- Bounds calculations still exist in PinnedStackController since
onTaskStackChanged callback requires so. Once we addressed b/139016833
(move rotation bounds calculation to SysUI), they should be all gone.
- Move the pinned stack animation from WM to SysUI and we can furthre
remove IPinnedStackListener.onPrepareAnimation and
IPinnedStackController.startAnimation

More details: go/pip-sysui-migration

Bug: 139015463
Bug: 139015142
Test: atest PinnedStackTests
Test: atest PinnedStackControllerTest
Change-Id: I76c2b40ea0fe95e3a8019b434d39ba5540e2039f
2019-09-12 09:57:21 -07:00
Mady Mellor
8e10394ccc qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic3a4ba793db7f1361678ef51c411d9eab85d9b85
Merged-In: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-09-09 21:48:30 +00:00
Mady Mellor
06b770cf14 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-08-29 20:24:52 -07:00
Pinyao Ting
3c530ff514 allow error notification in plugin framework to be shown in external
process, such as Launcher

Bug: 139823632
Change-Id: Id0307e483e66bd3c396f5355a526e4c728e68335
Test: Manual
2019-08-22 10:42:16 -07:00
Hongwei Wang
006e34e49e Merge "Enables back gesture nav in screen pinning" into qt-r1-dev am: f8108f81cc am: c55e4e668f
am: 57a9fbff5b

Change-Id: If4b60e1c5a7f08d6ae8a92b1504ddc02beafae7f
2019-08-14 15:16:44 -07:00
Hongwei Wang
c55e4e668f Merge "Enables back gesture nav in screen pinning" into qt-r1-dev
am: f8108f81cc

Change-Id: Ibc491beb050da96ea742194c0f539d44c46f845b
2019-08-14 14:31:18 -07:00
Hongwei Wang
fc07801e47 Merge "Enables back gesture nav in screen pinning" into qt-r1-dev
am: f8108f81cc

Change-Id: I11b8a95d9ead5ef6b70b5dff0bcfbd85c03489b2
2019-08-14 14:29:47 -07:00
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
Tracy Zhou
8089ffaced Pass the captured snapshot data to Launcher when recents animation is
cancelled.

In the current implementation, when recents animation is cancelled due
to stack order change, window manager replaces the surface with a
snapshot before cancellation. Launcher needs to acquire the snapshot in
order to switch the live tile into snapshot mode, and yet because the
recents animation is cancelled, that snapshot can no longer be acquired
anymore. This change takes care of this "relay" process.

Fixes: 138683199
Test: N/A
Change-Id: I1c11af38c2bdc442e3b45d0b5f0c7e7e37c2b0f0
2019-08-11 17:00:38 +00:00
TreeHugger Robot
23e5669c92 Merge "Only fire EvictionCallback when item actually evicted" 2019-08-09 02:09:21 +00:00
Vinit Nayak
e185ac2b8b Merge "Create general callback for changes to RecentTaskList" 2019-08-06 22:05:26 +00:00
Vinit Nayak
88c504cbc5 Only fire EvictionCallback when item actually evicted
In TaskKeyLruCache, we currently call the EvictionCallback
without checking if the entry was actually evicted or not.

fixes: 138952364
Test: Unit tests, manually inspected via debugger

Change-Id: Ic8e871f8e5a0324e4d00011d5bcd7036302b5c68
2019-08-05 15:16:18 -07:00
Adrian Roos
304f75603b GestureNav: Log exclusion rect heights am: 5f2c9a14f5 am: fde134f106
am: e4b2440287

Change-Id: If3f626a85dcf93482ad580e93c1c5b49299fd78f
2019-08-05 14:43:57 -07:00
Adrian Roos
e4b2440287 GestureNav: Log exclusion rect heights am: 5f2c9a14f5
am: fde134f106

Change-Id: I6b4d05cbd7f9b42dd4e2e340b2abadc791c69f37
2019-08-05 14:30:16 -07:00
Adrian Roos
15195e080b GestureNav: Log exclusion rect heights
am: 5f2c9a14f5

Change-Id: I1486dc89e9502351961156b0f1094ef7ad77c45c
2019-08-05 14:19:15 -07:00
Adrian Roos
ad19429212 GestureNav: Log exclusion rect heights
am: 5f2c9a14f5

Change-Id: Ic64a4394729c416813888244639ee31a1bb24d70
2019-08-05 14:18:13 -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
Tracy Zhou
4465cd3487 Merge "Change RecentsAnimationListenerSet interface" into qt-qpr1-dev am: 1ed86c9cf1
am: e103b2b9c8

Change-Id: I2b7cd26ee6e09d9ec1b0abd9977352a7c968c225
2019-08-01 19:44:25 -07:00
Tracy Zhou
f36321fc91 Change RecentsAnimationListenerSet interface
Instead of passing a boolean value signaling whether to defer with
screenshot, we want to pass the actual screenshot to Launcher if that's
the case. Another change will follow to implement passing the screenshot
from the window manager.

Bug: 138683199
Test: N/A
Change-Id: If5956436641aa35ffac3122fb53d13366552e0f1
2019-07-31 12:16:40 -07:00
Winson Chung
18cde725d3 Adding quick settings flag to sysui state am: 5b6a1fe8a8 am: dd26fafd8d
am: fb06056b79

Change-Id: Id453e9d9012a34ab45102fdcd4075bb42f4143bd
2019-07-28 01:52:55 -07:00
Winson Chung
3c5a6af058 Adding quick settings flag to sysui state
am: 5b6a1fe8a8

Change-Id: If364ed9139b5a5166a134dd01d04de47d78f6beb
2019-07-28 01:34:06 -07: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
3e73749c13 Create general callback for changes to RecentTaskList
New callback called whenever a user visible task
is added or removed to the recents list. This results
in less work by updating only when recent task list
changes instead of listening for active task list
changes.

Test: atest RecentTasksTest

fixes: 111077107

Change-Id: I9acf13762d0c79bfde90b64fa5e0edaf882068cc
2019-07-26 12:10:47 -07:00
Vinit Nayak
0739ec03c1 Merge "Prevent key removal on cache update" into qt-r1-dev am: c1dc1facea am: 0b23789274
am: 3454e5970c

Change-Id: I6217571e072efa30542718e4e44c3eb472aaf6f7
2019-07-26 09:49:59 -07:00
Vinit Nayak
f3d6fd2201 Merge "Prevent key removal on cache update" into qt-r1-dev
am: c1dc1facea

Change-Id: Iade07612e84421bbd8fc4cf6aad504ba327e7901
2019-07-26 09:26:29 -07: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
df69ae467a Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev am: 48e3cfc06a am: 932a656359
am: 71626be681

Change-Id: Ie5636139863163d42788314c0e8ca0c946a80ae1
2019-07-24 00:33:54 -07:00
Winson Chung
3d00facef8 Merge "Proxy search disabled flag to Launcher" into qt-r1-dev am: 6d4d529fb1 am: ea9527d31f
am: 1fca79b766

Change-Id: I9955d17200e9af9cc29794a771469f14eab8c6c4
2019-07-23 23:41:18 -07:00
Winson Chung
7ff14a69cf Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev
am: 48e3cfc06a

Change-Id: If607c33898a4a4ed75a3768ae1027507edfc0437
2019-07-23 22:25:45 -07: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
21b327c2f1 Merge "Proxy search disabled flag to Launcher" into qt-r1-dev
am: 6d4d529fb1

Change-Id: Ib3531e499059531a695f8c50642ecdea92d97c5f
2019-07-23 21:20:07 -07:00