Commit Graph

425 Commits

Author SHA1 Message Date
Muhammad Qureshi
3ab2065deb Merge "Add sysui module for logging SystemUI atoms." 2020-01-21 21:22:14 +00:00
Andy Wickham
e47e006283 Adds UniversalSmartspaceUtils to be shared between Launcher and SysUI.
Some initial helper methods include ones to build the intent for
Launcher to send its SurfaceView to SysUI, and for SysUI to
retrieve the necessary components (SurfaceControl and InputToken).

Test: Builds; used new method in Launcher.
Bug: 141701658
Change-Id: Ic89a15f20f89f0b90041afc72c349d524d2ad439
2020-01-17 14:07:04 -08:00
Muhammad Qureshi
9bced7d7de Add sysui module for logging SystemUI atoms.
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL adds autogenerated SysUiStatsLog to SystemUI and replaces usages
of StatsLog with SysUiStatsLog.
Since the write calls in SysUiStatsLog are public, StatsLogCompat is no
longer needed.

Bug: 145952197
Test: m
Test: fastboot flashall
Test: adb shell cmd stats print-logs && adb logcat "*:S statsd:*"
Change-Id: I192ff29d21cedbe715bb02ffa05921b4912af371
2020-01-17 10:41:05 -08:00
Wale Ogunwale
194435b5a2 Introduce WINDOWING_MODE_MULTI_WINDOW
Generic multi-window with no presentation attribution from the wm-core.
Needed for wm-shell to correctly drive multi-window cases like Bubbles
and n-way-split.
Current windowing modes split and freeform will probably be migrated to
this once wm-shell drives their presentation.

Test: N/A
Bug: 139371701
Change-Id: I5247f41b4f67d21b2bb5929a52e8ec93c41644c2
2019-12-26 12:56:09 -08:00
Winson Chung
10fc25dadd Clean up remote animation definitions when activity is destroyed
- Remove the remote animation definition when the associated process dies
- Also expose method to unregister any registered animation defs

Bug: 139137636
Test: Kill launcher, ensure the remote animation ref is removed
Change-Id: Ia38d037397703221c17c8258ec1a245055d5896d
2019-12-19 15:01:50 -08:00
chaviw
4ce1ddff79 Added WindowMagnification for Accessibility in System UI
Added support for window magnification as an accessibility feature. The
UI can either be dragged to a new a location or arrow controls can move
the window around.

Test: adb shell settings put secure window_magnification 1
Bug: 136250281
Change-Id: If3098df098f2a1b88b2170e773dccc8f86946abf
2019-12-16 13:49:53 -08:00
Riddle Hsu
440f88b43a Add task snapshot for home task
The real home activity usually takes longer time than a
snapshot to complete drawing. Especially when unlocking
to home, the duration becomes more noticeable.

This CL enables snapshot of home task when turning screen
off. And because the snapshot is only used when entering
home from a sleeping state, the snapshot will be removed
once it is used.

Also provide a method for home activity to remove its
snapshot while the content of home activity has significant
change after taking the snapshot.

Bug: 140811348
Test: 1. Set an unlock method that doesn't need to show
         lockscreen when unlocking.
      2. Turn off screen while home is on top.
      3. Unlock device to enter home.
      4. Check the duration of trace "screenTurningOn".

Change-Id: Ic516cdcfd84ca4a85e19798537f9f5a85077392b
2019-12-13 16:59:52 +08:00
Winson Chung
88eff82e04 Add compat call to fetch icon from task description with user
Bug: 145708947
Test: Manual
Change-Id: I7895a5acb71813960aa2658f1bd2b62a7326a37f
2019-12-09 11:09:17 -08:00
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