Split-screen implementations moving forward would be based on app-pairs
and main/side stage models. So, renaming existing package to avoid
confusion.
Bug: 175416931
Test: They pass!
Change-Id: I55ab1d27fb1c00ba7a58d685ea7eb2840efb9437
Allows shell to have information on the parent container for tasks so it
can do things like attach other surfaces to it. E.g. split-screen
divider.
Also, have DisplayAreaOrganizer ctor take an executor so incoming calls
from the binder threads can be posted to the main thread.
Bug: 175416931
Test: They pass!
Change-Id: Ia3d0b978cf43badd8c495b75708aa027fe9a2aa1
This is the first step towards moving letterbox gravity logic from WM Shell to WM Core. It's important to do this even before the new implementation in WM Core is ready because surface repositioning in WM Shell causes visible flickering on rotation for all apps on devices with cutout.
Fix: 174632285
Bug: 175212232
Fix: 173440321
Test: atest WMShellUnitTests
Change-Id: I2b3706a1a46bb2c7ee4bb3789fb09b216e32f290
Enable the rotation tests and aling the structure of WMShell
Flicker test cases
Bug: 169271943
Test: atest WMShellFlickerTests:RotateOneLaunchedAppTest
Test: atest WMShellFlickerTests:RotateTwoLaunchedAppTest
Change-Id: Ieeafc42562e99c5aa26547625b13ec2af35871c1
1. testNonResizeableNotDocked
2. testNonResizeableWhenAlreadyInSplitScreenPrimary
3. testNonResizeableWhenAlreadyInSplitScreenSecondary
4. Refine the test flow to be more effeciency
Test: atest WMShellFlickerTests:EnterSplitScreenTest
Test: atest WMShellFlickerTests:AppPairsTest
Bug: 161435597
Change-Id: I271a522f220a65b1be7de6599a9ed185f06888b3
Some stuff changed underneath, so we can do a little bit
of housekeeping
Bug: 169035082
Test: nothing changed
Change-Id: I70c668d5760cd6fb9ddfd56720e0b712bd7520fc
Test: atest com.android.wm.shell.flicker.apppairs
Test: go/wm-tests-flicker should become green
Fixes: 175230170
Bug: 172704238
Change-Id: I210430a9f36fe8aca43bc0e97d29b5530c9dcb28
Activity handles insets on its own (e.g. under status bar or navigation bar). After task's surface is repositioned, intersection between an activity and insets can change but if it doesn't, the activity should be shown under insets to maximize visible area.
Also, an activity can use area under insets and insets shouldn't be cropped in this case regardless of a position on the screen.
Test: atest LetterboxTaskListenerTest
Fix: 174086576
Change-Id: I84cd28520ead3fb0099f15cc672167871c7d78a1
Fixes issue where the "default" bounds of PIP can be calculated
differently even though the PIP has never been resized. This is
caused by a combination of changing the aspect ratio of PIP and
trying to restore the "reentry" state that is just the default
state.
Instead, we'll only calculate the PIP bounds using the reentry
size if the size was actually changed by the user, otherwise
we'll always calculate using the default size.
Bug: 169379707
Test: atest com.android.wm.shell.pip
Change-Id: I724b167870407f7f37eb9c8a587a98c7972441a4
This removes ScaleGestureDetector and instead just do the calculation
inside the class itself. As user sets two input points on the PiP
surface, this signals the start of the gesture, and as user drags the
two fingers, it resizes the PiP to the maximum possible size. After the
user releases their fingers, then it auto-offsets/snaps to the right
position.
Bug: 166478885
Test: Start a pinch-to-resize while feature flag is on
Change-Id: I634bd14e97f0cf0cc7bf9c1a1b64a1f12130e0e9
- Add @BinderThread/@ShellMainThread/@SysUIMainThread annotations
for some common shell classes and callbacks
- Add mechanism to inject shell-anim/shell-main/sysui-main/etc
executors (removed AnimationThread static instance)
(Note: The shell main thread will still be the sysui main thread)
Bug: 161979899
Test: atest WMShellUnitTests
Change-Id: I4adfeaebe5b79fab7c9451eef7b54fcdf4d8d40a
Update SplitLayout and DividerView to support dragging divider bar and
make them more generic to be able to share among different split impl.
Bug: 172704238
Test: manual check the behavior of divider bar
Test: atest WMShellUnitTests
Change-Id: I16ed1fd86bdff4d8544c5787c95315c59055ad04
Fixes an issue where the DisplayImeController would disagree with
the InputMethodManagerService about the visibility of the IME.
Currently, the Insets component is supposed to execute the
visibility as dictated by IMMS; however, when the DisplayImeController
became the control target, previously it would just apply the IME
visibility that was last requested of it - regardless of the
changes to it that may have happened while it was not the control
target.
Eventually, IME visibility should be driven by the requested IME
inset visibility of the focused window, instead of the separate
dispatch we have now from IMMS.
Bug: 167780081
Test: atest DisplayImeControllerTest ImeInsetsSourceProviderTest
Change-Id: I1f140af6bcccbcbe6efb2fde9a789ac4c7bd127f
Tradefed FilePullerLogCollector can no longer access the internal app directory (e.g. /storage/emulated/0/Android/data/com.android.server.wm.flicker/files).
This makes it unable to pull trace files, when a test fails. This CL makes flicker tests store their data on /sdcard/flicker which can be accessed by the Tradefed FilePullerLogCollector
Bug: 171026227
Test: atest WMShellFlickerTests
Change-Id: Ie2329cbc475ee1be35e6bb3e274c96a4db142ac5
There's duplicated code in CommonAssertions of WMShell project and FlickerTests. We are keeping the one from FlickerTests and removing the one from WMShell to avoid problems of changing it in one place and forgetiing about the other project.
Test: atest WMShellFlickerTests
Change-Id: Ie87df793933d9cbe0ccd947514027650811a1819
Adding the flakytest annotation to the tests SplitScreenRotateOneLaunchedAppTest and SplitScreenRotateTwoLaunchedAppTest as seems to crash the device every so often.
Test: atest WMShellFlickerTests
Change-Id: Ie0dcfb60618afbed84b043b1c467a4e74e6cba2e
Add a new test (only the transition) called SplitScreenRotateOneLaunchedAppTest. This test will open one app in splitscreen and in the transition will test rotate the device.
Test: atest WMShellFlickerTests
Bug: b/171049764
Change-Id: I92c36f92e49e8cf617fa682bde078c8aff5962a5
Add logic to rotate app pair divider bar and add more tests.
Bug: 172704238
Test: AppPairTests, AppPairsPoolTests, AppPairsControllerTests
Test: AppPairLayoutTests
Test: manual check the behavior of divider bar.
Change-Id: Icb51cfaea04b1a9fd04cbb2bc868897d8428d483
Applying insets directly to parent bounds don't always work because parent bounds may not be equal to max bounds. For example, this happens when "Developer options > Display Cutout > Hide" option is selected or in One-handed mode.
Fix: 174211584
Test: atest WMShellUnitTests
Change-Id: I7415629aab39e5aac6c038f27494b87667ef84d9
Add a new test (only the transition) called SplitScreenRotateTwoLaunchedAppTest. This test will open two apps in splitscreen and in the transition it will rotate the device.
Test: atest WMShellFlickerTests
Bug: b/171049799
Change-Id: I41e9b09d2621c2c44d276a2348b8f7f94dec71dc
The aidl IActivityTaskManager interface doesn't allow for method
overloading with the same name. Switching some of these calls to use
ActivityTaskManager class instead makes it easier to have overloads in
upcoming CLs.
Test: they pass!
Bug: 172776536
Change-Id: Ic4895ccf7dc1207cc6b14004cfcf6ee7b4b76cc1
The test OpenAppToSplitScreenTest was marked as flaky as it doesn't run because of b/161435597 when being on 90 degrees. So we are removing the flaky annotation and marking the test to only run on 0 degrees. Also adding the presubmit annotation. This test is similar to one of the test inside EnterSplitScreenTest that's been running with no problem.
Test: atest WMShellFlickerTests
Change-Id: I4e9496286210805e0a8d15d7905cf6fbbc28a4ed
Moving some tests to Presubmit using the annotation tag (adding the annotation lib as dependency). These tests were working on post submit:
- AppPairsTest
- PipKeybopardTest
- EnterSplitScreenTest
- ExitSplitScreenTest
Test: atest WMShellFlickerTests
Change-Id: I10603cbb869044fce9d444ab7c2a8d761eb1ee74
Test mappings are as follows:
- testPinnedStackInBoundsAfterRotation => PipRotationTest
- testEnterPipToOtherOrientation => PipOrientationTest
- testSetRequestedOrientationWhilePinned => PipOrientationTest
- testPinnedStackWithDockedStack => PipSplitScreenTest
- testDisplayMetricsPinUnpin => EnterExitPipTest
Some other accompanying changes are as follows:
- add FixedAppHelper for FixedActivity.
- add testapp.Components to provide the constants for each test app.
- extend PipActivity to accept some extras from Intent/BroadcastIntent.
Bug: 161980624
Test: atest WMShellFlickerTests
Change-Id: I64d97a51387370cc086c9dcdded846e4a8c1c0ea
Moving all tests of Pip and SplitScreen from FlickerTests lib to WMShell.
Test: atest WMShellFlickerTests FlickerTests
Change-Id: I5e915f38beb8c1fef44cf18d955caf1e3cc77b30
Test that correct UI elements are displayed for the custom actions; that
the set of custom actions can be updates (while PiP menu is shown); that
custom actions collaborate correctly with "regular" actions (Full screen
and Close), as well as with the media contol actions.
Bug: 171520419
Test: atest WMShellFlickerTests:TvPipMenuTests
Change-Id: I1f5b1e4896a60b8d2bfb118e548466e7f4036e61