- Existing tasks for supported windowing modes are returned when
registering the organizer and the organizer will not receive
onTaskAppeared() for these tasks. For now, the shell task
organizer will keep these tasks for reporting task appeared when
individual components add listeners for their windowing modes.
- Fixed some tests now that we organize fullscreen tasks
Bug: 162028888
Test: atest WindowOrganizerTests
Test: atest ShellTaskOrganizerTests
Change-Id: Iedc5f58fbfa819e753a5dcea7a8eb9dee8b6843b
If Blast was enabled, WindowStateAnimator would create a container layer
and then a blast layer as a child. This caused some issues with
reparentChildren and relative Z, so instead of trying to continously fix
those issues, just use one layer. If blast is enabled, it will create a
single SurfaceControl with type blast. Otherwise, it will create a
BufferQueueLayer.
This means that we have to be careful with setting any properties on
the layer since the blast adapter could also be modifying the layer.
This is in the right direction since we will move all transactions for
the layer to the client, eventually.
Test: YT and Chrome with and without Blast
Change-Id: I43efc37663696ba8e54d341a03531f0048ee6a14
This reverts commit a6e524e127.
Reason for revert: should not use current pipBounds as reentry bounds when the bounds are temporarily expanded due to active menu
Bug: 170748861
Change-Id: I26a2ce4d9fb70db051b941ff09cdb423513b9ffc
This change adds a basic state class and migrates
mLastReportedBounds from PipTaskOrg into it. It'll
eventually become the holder of all bounds-related state
such as movements bounds, reentry bounds/fraction and
aspect ratio.
Bug: 169373982
Test: atest com.android.wm.shell.pip
Change-Id: I43c530f4f3ab192756964022417f39f3085e593e
Currently, when an out PIP transition happens we combine:
(1) the last user resized bounds, plus
(2) the out pipBounds fraction (mLastReportedBounds)
Using both we create the reentry bounds used to restore
on reentry.
This is actually unnecessary since ag/12307605 and
ag/12309037 both landed. They landed as separate
efforts fixing different issues almost at the same time,
so we didn't realize that getting the last user resized
bounds was no longer necessary with the safe
mLastReportedBounds (i.e. pipBounds) passed into
onPipTransitionStarted.
The pipBounds argument is equal to the last user resized
size with the current fraction applied, so there's no need
to re-calculate it, we can just use it directly.
Bug: 169373982
Test: enter/exit pip and resize multiple times to verify the
reentry size is correct.
Change-Id: I2517d10bfbc8ca9c15b08b32089bdeeb1dd3aab6
Stop using windowing modes as keys for task listerners mapping to allow adding multiple listeners for one windowing mode.
Fix: 170209272
Test: go/wm-smoke
Change-Id: I31c20a00f8747a8510a5fab9e54efa63173aab6a
Root cause:
Obtain handler from OneHandedDisplayAreaOrganizer and assert if
there's message in the message queue will encounter timing problem.
Solution:
Set a spied handler object into OneHandedDisplayAreaOrganizer,
and verify if sendMessage() was called or not.
Test: for i in {1..1000};do atest WMShellUnitTests;done
Bug: 170376119
Change-Id: Ie9f5561d61ac3c917a7dfced6c3281adb81fd12e
- This CL migrates FlickerPiPTests.java to WmShell: http://shortn/_Y4GUnepWZl
- This introduces ImeAppHelper and ImeActivity from FlickerTests.
- This uses launchActivity() function to launch Keyboard Activity, since UiAutomator doesn't support to launch the multiple Activities in a task: http://shortn/_KlCIzvahyr
Bug: 167233905
Test: atest WMShellFlickerTests:PipKeyboardTest
Change-Id: I990e6e83213610ca657dbc69f4535971760fde65
- Chatted offline, individual listeners can proxy state, but the task
org doesn't need to have multiple listeners for each mode
Bug: 161980327
Test: atest ShellTaskOrganizerTests
Change-Id: Ic11400a64bf9dc1e00ab6d22c29727414b608e17
This CL is aimed to refine the AM/ATM API surface. The other
stack naming internally spread in AM and ATM will be covered
in later CLs.
Also Consolidate #removeStack() with #removeTask().
Bug: 157876448
Test: existing tests
Change-Id: I1254f972dab3bbe66a736a0402eebce9d0fb1496
- Moved all Dismiss-magnet related logic into PipDismissTargetHandler
- Removed Dismiss fraction related code
Bug: 170151121
Test: Manual
Change-Id: Ic0a6d3926264b877f2c122552a740c93ab45400c
Allow Launcher to query destination bounds of PiP window from SysUI.
Add also the callback notifies SysUI that the swipe-pip-to-home
operation is finished.
PipTaskOrganizer would ignore the entering transition if
swipe-pip-to-home should happen in Launcher.
Next: handle the swipe-pip-to-home transition in Launcher
Bug: 143965596
Test: N/A
Change-Id: Ia8bbdfcd4ed92c7ed968be84f0bf991feac8598e
Allows launcher to set providesInsetsType on a window
Also, cleaned up ctor for ShellTaskOrganizer to reduce
duplicate code.
Bug: 169054709
Test: builds
Change-Id: I9e1f4a27b924013c0b6b17f0a5e10ac3411cbf4e
Initial rough implementation of Shell Transitions.
Shell Transitions can be enabled by setting ENABLE_SHELL_TRANSITIONS
via `adb shell setprop persist.debug.shell_transit 1`
The main structure behind this is:
- TransitionController in Core responsible for handling the
collection of transition participants and communicating with
the TransitionPlayer in Shell.
- Transitions in Shell responsible for starting transitions
and playing associated animations.
This initial version only supports task open/show/close and does
a simple fade. The flow is:
1. activityStarter calls to Transitions.requestStartTransition
2. Transitions will prepare to start and then call
WindowOrganizerController.startTransition().
2. Various operations in Core call TransitionController.collect()
to track participants. This collect() acts as a replacement for
adding to mOpening/ClosingApps.
3. The legacy executeAppTransition() is wired into
TransitionController.setReady() for now. This signal
is used to ready a BLASTSyncEngine.
4. When all participants are done drawing, TransitionController
will commit any showing visibility changes and then will construct
a TransitionInfo object summarizing all the changes needed for
animation. This gets sent to Transitions.onTransitionReady()
5. Transitions then plays the transition animation and on
completion will call WindowOrganizerController.finishTransition()
which will tell TransitionController to do any finishing
work (like commiting deferred hide changes).
Bug: 161980187
Test: enable the flag and try opening/closing tasks. Also added
TransitionControllerTests
Change-Id: I80c3a241fc12004a894c26523a1e5828e0c533ff
If the IME is showing while exiting split mode, the IME-adjust dims
won't be changed to hidden. This makes sure to hide the IME-adjust dims
when leaving split mode.
Fix: 168505685
Test: atest SystemUITests
Test: atest WMShellUnitTests
Test: manual check switching user while showing IME in split mode,
there won't have overlapping dim remains on the screen.
Change-Id: I778df71616827c01f415231d8bbc20b037181d10
Fixes an issue where the DisplayImeController did not re-apply the visibility
if it receives a new leash.
This lead to focusable IME dialogs not being visible sometimes upon relaunching
the IME target activity, such as during rotation.
Fixes: 162875596
Bug: 160672060
Test: Enable Braille keyboard, open Settings, click on search box, switch to Braille keyboard, on the confirmation dialog rotate the screen; verify the dialog does not disappear.
Change-Id: Ia40a682ca8a9ba669454892e2b453f736c55929c
There were some legacy ways to trigger split screen through
Recents.splitPrimaryTask. Decouples the API from Recents and migrates it
to WM Shell library.
Removes SplitScreen.onDockedTopTask and SplitScreen.onRecentsDrawn
because we have SplitScreenTaskOrg to instantiate new deivider bar and
resize primary/secondary split after entering split screen mode.
Fix: 169056724
Test: atest SystemUITests
Test: atest WMShellUnitTests
Test: manual trigger splitPrimaryTask api and check
Change-Id: I68979e2e32c7ff36d35ae451c81dcf09e2dc5ef6
This CL removes
- mSeq
- System UI flags used to communicate between WMS and System UI
- redundant AIDL methods
- redundant fields and methods
- redundant tests
- PolicyControl
This CL also
- refines the format in DisplayPolicy#dump
- sends a boolean to InputManager to indicate if System UI is in a low
profile mode instead of sending the legacy system UI visibility
Bug: 149813814
Fix: 169105126
Test: presubmit
Test: dumpsys window displays
Test: See if the layout of ImmersiveModeConfirmation is as expected
Change-Id: I8c8df509355bebc9b560af57d5458614557bcd2f
Split-screen dismisses itself on the SyncTransactionQueue to
prevent glitches/jank. The result, however, is that when one
of the split tasks gets unsplit, it becomes organized. Just
before it becomes organized, though, its windowcrop gets
updated on the sync transaction. Then onTaskAppeared gets
called. Then the sync transaction is applied once drawing
completes.
To resolve this, put the fullscreen transaction on the
syncTransactionQueue as well. In the future, everything that
shell does should probably be serialized in this way (eg.
PiP).
Bug: 169330989
Test: Open app, put it into split, expand the app to fullscreen,
rotate device and observer no half black screen.
Change-Id: I3a7d3d8650a475b4aa4208bf6be9285e530514a0
The onSplitScreenInvoked was used to notify system ui to reset the
divider position before entering split screen. With
SplitScreenTaskOrganizer, WM Shell library could know the exact time
when entering/leaving split screen mode now, so removes the API and
deals with the divider bar position in WM Shell library scope directly.
Resets mRatioPositionBeforeMinimized when dismission split screen since
the informaiton is no longer needed, it will leverage the creation flow
of DividerVew to assign the default target to the new divider bar.
This change will also make sure to reset the divider bar target even
when users are not triggering split screen from recents app shortcut.
Fix: 168869136
Test: atest WMShellUnitTests
Test: atest SystemUITests
Test: manual check the split screen behavior
Change-Id: Icd84a8c1559d0f5f0f99b22445410112fa517efe