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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
- 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
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