This makes StageCoordinator implement the TransitionHandler
interface.
In general, this currently expects 'enter' transitions to
contain 2 tasks (one in each split). The current UX is undefined
when one only one of the splits is occupied, so for now it will
throw an exception if that case is hit.
There is a split-screen API called startTasks which takes a list
of tasks (currently only supports 2) and associated options and
creates a transition to both enter split-screen and launch those
tasks into their respective stages.
These are the currently accounted-for entrypoints into
the handler interface:
- Core-initiated (handleRequest)
- in split: trigger=HOME that is opening -> full dismiss.
- in split: trigger=task with a stage parent that is last closing in
that stage -> dismiss with other stage onTop
- NOT split: trigger=task with stage parent -> exception
- Shell-initiated
- NOT split: startTasks -> enter split with 2 tasks
- in split: snap-to-dismiss -> dismiss with other stage on top
Bug: 182002789
Test: atest SplitTransitionTests
Or use the experimental pair-launch split-screen and observe
protologs to see clean transition-infos.
Change-Id: I4f4dd431ad5642cf98b4a01c32eb1d09e5b9a11e
change though one-handed mode is off
Add more condition check when Talk back announce one-handed mode
related.
Bug: 182475904
Test: manual
Test: atest WMShellUnitTests
Change-Id: I0644146eaa6d7d6701af94fe6caceee5e6c3be8b
Add a condition when launch activity from continuous package, consider
to show a blank splash screen since the activity might start from an
existing task, showing an icon on it might seems strange to user.
Bug: 183150443
Bug: 183108088
Test: atest StartingSurfaceDrawerTests ActivityRecordTests
Change-Id: Ia76648c291d602302725a1814991971a1d544549
PipMovesInAllApps was intended to test the PiP window movement when the
shelf height of Launcher changes and breaks with the recent `Device
search` feature that opening all-apps in Launcher triggers both IME and
shelf height change.
Since PipKeyboardTest has covered PiP movement with IME, reimplement
this by launching a new app instead of going to all-apps and also rename
this test for its intention.
Bug: 184050344
Test: atest WMShellFlickerTests:PipShelfHeightTest
Change-Id: I102ea95e6e91c9707b73587282702b868eb705fb
This change allows PipMotionHelper
and PipSnapAlgorithm can be injected
for customization.
Bug: 181956433
Test: manual test - test snapping PIP windows
atest PipBoundsAlgorithmTest PipTaskOrganizerTest PipTouchHandlerTest
Change-Id: Ic6e54f178b40ae21f8e198d8953db619b3ac9ec4
Only the thread which created the menu view (shell main thread) can
update its view layout, so ensuring that it is executed in that sense.
Also moved setup work in PipController to Shell Main thread. Ideally
they should be in ShellInit, but that will need to wait until
tv.PipController can unify with PipController.
Bug: 182418859
Test: Enter PIP
Change-Id: Ib88fefb9320ab441715c6ef3d5cf4f80dc9f022f
Previously the assertions were part of WMShell, however it is easier to keep them in the library as they can be used in other projects
Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: Ia6ca7cce1da81be2b73166acce40218bc304a77a
Ensures no other tasks are executing (cleanup) when a flicker test states to mitigate flakiness
Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: I84f712c8aba13ac845b9467f6c9753bc91e21a27
Test's currently failing due to the new `device search`, disable for
now to unblock presubmit and re-enable once we have a working solution.
Bug: 184050344
Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Change-Id: I6b75ea213b442400090ee0a3f2b7e46ee5ecd395
Previously OHM did not support for multile user switch
Now we hook SysUI onUserSwitch callback to update
latest one handed mode functionality by currentUserId
Test: atest SystemUITests
Test: atest WMShellUnitTests
Test: manually switch user and observe verify different OHM config
for different users
Bug: 182278800
Change-Id: I8ae7d0aedcafc8f477f41d2703df2df53839a89f
Catch for hidden resource not found exception.
Fix: 183277667
Test: atest StartingSurfaceDrawerTests
Change-Id: Ie1c25b044c6617f13025ccb7f6b43f3a2ee8c0e6
In several flicker tests it is necessary to check if a window or layer position is moving or resizing.
To facilitate these checks this CL introduces RectSubject (accessible through WindowStateSubject and LayerSubject) to assert rectangle behaviors
Bug: 174238224
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id568fd9dbd59f176eeb84323c321553221932685
This is the shell-transitions equivalent to RemoteAnimationRunner.
The OneShot handler is a utility to directly tie one call of a
remote transition to a specific transition (via
Transitions.startTransition) or as a general holder of a remote
for shell to use (taking care of binder lifetime and wrapping
callbacks).
Bug: 182002789
Test: ShellTransitionTests#testOneShotRemoteHandler
Change-Id: Ia405b133b18b4f132c8c841e74a6a264561df5a3
The InputEventReceiver in PipResizeGestureHandler receives
global coordinates in its events (i.e. screen coordinates)
that need to be translated into the PIP's window position.
Bug: 172839150
Test: enter PIP, enter OHM, drag resize
Change-Id: If5aaa8940904046ffc2303574e272601589a1638
The AdaptiveIconDrawable can spend much time which will impact the
time for first window drawn. But usually there is a small time
between setContentView to doFrame, we can use this gap to pre-draw
the AdaptiveIconDrawable and cache it since we already know the size
and it won't change anymore.
Bug: 173975965
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Change-Id: I759de2e1b4025dd150532f3fd5c67d1b404f56a0
1. Update the flag of DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW
during tests.
2. Before, the tests only checked whether the app window/layer became
visible/invisible, which could also happen during opening recent. Now,
we also check the visibility at the end.
Bug: 182235458
Test: atest WMShellFlickerTests
Change-Id: Ibc7b359d600a0e4105cc3a84b3111d59813eb9f1
- Expose interfaces for splitscreen, one handed, shell transitions,
starting window
- Make the shell code only reference the starting window controller and
not the exported interface
Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: Idafed90a8ed3382adfb4322b4b1797237be86a90
- Refactor OneHandedSettingsUtil.java
- Remove redundant test for SettingProvider
New policy: b/175024829
Settings key: <one_handed_*> is not readable.
From S+, new public settings keys need to be annotated
with @Readable unless they are annotated with @hide.
Recent changes :
ag/13764747 Remove @Readable for hidden fields added in S
Test: atest WMShellUnitTests
Bug: 183064974
Change-Id: I85bf3680cbcdba4c85aa96de058bc85cfabead46
These flaky tests have been stable for the past week and can be promoted
Test: atest WMShellFlickerTests:com.android.wm.shell.flicker.pip
Bug: 171049720
Bug: 167521849
Change-Id: Ibd78e9d9e53a5712ca781b265b1b65c830a74c08
New policy: b/175024829
Settings key: <one_handed_*> is not readable.
From S+, new public settings keys need to be annotated
with @Readable unless they are annotated with @hide.
Recent changes :
ag/13764747 Remove @Readable for hidden fields added in S
Test: atest WMShellUnitTests
Bug: 183064974
Change-Id: I185491189a3804d7038be3c117583ab571e7a961
Insets source window can be moved by the display area policy so that
the window would not on the edge of the display. This makes the window
cannot provide insets to the display frame. The default animation uses
the display frame to compute insets, so the moved types cannot be
animated properly.
This CL adds an insets hint to InsetsSourceControl. It is the insets
computed from its owning window bounds. With the insets hint, the insets
animation can be played regardless of the display frame.
This CL also fixes an issue that the insets animation would be played in
the wrong direction by the fixed-rotation window.
Bug: 175775686
Fix: 181939099
Fix: 163018915
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
InsetsControllerTest InsetsSourceConsumerTest
DisplayImeControllerTest
WindowInsetsTests (manual)
Change-Id: Ic6a8a215bd9b3a3b1af18e425dabe803c9be323e
It is already possible to ignore windows/layers on the verification of visibleWindowsShownMoreThanOneConsecutiveEntry and visibleLayersShownMoreThanOneConsecutiveEntry. However many tests need to manually add the Snapshot and Splash Screen entries.
Those entries are not guaranteed to show for more than 1 entry, they depend on the app behavior and when the SF actually renders the information sent by WM.
This CL removes those windows by default from the verification and refactor the tests to make it easier to update in the future
Test: atest FlickerTests WMShellFlickerTests
Bug: 182720234
Change-Id: I0e3346e078515b3e9a2065256ac04696acfa59fb
- Expose interfaces for splitscreen, one handed, shell transitions,
starting window
- Make the shell code only reference the starting window controller and
not the exported interface
Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: I49a5a0419996754e5e154df7af1e475268035a5a