- User is easier to mis-trigger OHM when keyguard showing
it's make sense to disabled OHM when keyguard showing
- Resolve OneHandedControllerTest flaky
Test: atest WMShellUnitTests
Test: manual enable OHM, when keyguard showing OHM can not trigger
Bug: 179044949
Bug: 180682204
Change-Id: I59399e35c7f7bc895df006f54b43e572a9463fd1
1) Fix all broken tests and use mock for unit tests
2) Integrate TestableContext for unit tests
3) Do not update/restore Settings from TestBase
4) Limit to grant permissions for test cases
Fixes: 167943723
Test: atest WMShellUnitTests
Change-Id: Id02aa26e63b96962d955fcfbf061d668a6cb731c
Calling unregister + register in the same call is NOT able to process
the onDisplayAreaVanished() until the register call is finished.
Depend on flag mIsOneHandedEnabled to handle register/unregister DA
Test: atest WMShellUnitTests
Test: atest SystemUITests
Test: manual quickly enable/disable OHM
Bug: 178357839
Bug: 179092435
Bug: 179985282
Change-Id: Iaafb1a0ab1ba9c16088ed91a420edf0421123e67
By default all flicker tests use the Winscope component.
Test: check the owner files
Bug: 162923992
Change-Id: I3d7b6e7ea60eb9d96643d75b3d23d01bad268383
Create new APIs for developer to customize starting window
- windowSplashScreenBackground: specify the background color
- windowSplashScreenAnimatedIcon: replace center icon on starting
window, and it can be animatable.
- windowSplashScreenAnimationDuration: the animation duration if
the replace icon is animatable, it cannot exceed
max_starting_window_intro_icon_anim_duration.
Support ADV to replace the icon on starting window.
Ref doc: go/improved_app_launch_animations
Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Test: atest ShellTaskOrganizerTests
Change-Id: Id3de3e9b57d769f096baf43713c1e3c327ecfdc8
Introduce new APIs to customize exit splash screen animation.
- SplashScreen
This can be used for Activity to handle the exit splash screen
animation.
- SplashScreen#OnExitAnimationListener
When receive onSplashScreenExit, the splash screen view will be on
top of the activity.
- SplashScreenView
The view object which represents the view of current starting window.
There are two APIs for developer to control it:
- getIconView: get the icon view object.
- remove: remove the view and release resources.
If an Activity create a OnExitAnimationListener and set on
SplashScreen, the core will request a copy of SplashScreenView
from Shell, then send the parcelable information to client to
reconstruct the view on top of the DecorView, then call
onSplashScreenExit to let the listener able to operating this view.
Bug: 73289295
Test: build/flash, check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ActivityRecordTests
WindowOrganizerTests
Test: atest CtsWindowManagerDeviceTestCases:SplashscreenTests
Change-Id: I9f77fb4471bcf37a7f74d6c18a345ca56c05b716
Those methods were replaced by WindowManagerStateHelper to make the tests more stable.
Bug: 172321238
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I87d4fb031603eb060551f4800a31fb44851a3cff
- Adding documentation for dagger setup for shell
- We should only reference the controllers from shell code instead of
through the external interfaces. This reduces the number of exposed
methods, and is also more direct (it ends up in the controller
anyways). This means that the base module will provide the
controllers separately and we can remove some duplication in the
create methods for the controllers (except in cases where it's doing
other initialization)
- Remove SizeCompatUi interface since it's not actually used in SysUI
- Group related dependencies in the module to make it a little eaiser
to parse
Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SystemUITests
Change-Id: I07c2c002b87ffd127ebfce67b5485ff47d127e1f
Make sure the test can run multiple times and is stable on flame
Introduce methods to allow waitForPipWindowShow/Gone using the WindowManagerState to determine if a PIP window is active (windowingMode = PINNED), since the UiDevice method is unstable and doesn't work on TVs.
Bug: 171049720
Bug: 172321238
Bug: 171049762
Test: atest WMShellFlickerTests
Change-Id: Iade19fadeb0ba07e047eb5f64479e592920ca11e
Atest cannot override include-annotation and exclude-annotation from the Android.xml, only append new ones.
Ideally we should have a single test configuration for all flicker tests (presubmit/postsubmit/flaky) and adjust the arguments according to the type of test we intend to run.
Presubmit:
atest FlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Presubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest
Postsubmit:
atest FlickerTests -- --module-arg FlickerTests:include-annotation:android.platform.test.annotations.Postsubmit --module-arg FlickerTests:exclude-annotation:androidx.test.filters.FlakyTest
Flaky:
atest FlickerTests -- --module-arg FlickerTests:include-annotation:androidx.test.filters.FlakyTest
To run WMShellFlickerTests, just replace FlickerTests for WMShellFlickerTests in the commands above.
Bug: 170490377
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ic252f27065714e9039e3c0f33659b98eb288aa6f
- Also remove usages of external interface within the shell code
and remove methods only used in the controller from the interface
(will update for other components separately)
Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SystemUITests
Change-Id: I06d266095d8e287ba131e41dc6bebefa15c9e477
The activity surface is rotated by WM core when changing
the windowing mode of PiP activity to fullscreen. And then
PipTaskOrganizer#onFixedRotationStarted will be called before
WindowContainerTransactionCallback#onTransactionReady. So
PipTaskOrganizer can use the given new rotation to run the
animation in current rotation. After the animation is done,
PipTaskOrganizer will set the task to fullscreen, that makes
previous top activity pause and then resume the next top
activity (the original PiP). Finally, the fixed rotation is
finished by transition done event, and then continue to
rotate the display seamlessly.
Also remove mInitialState from PipTaskOrganizer because it
is no longer needed for predicting the fullscreen bounds.
Bug: 165794724
Test: DisplayContentTests#testFixedRotationWithPip
PipAnimationControllerTest#pipTransitionAnimator_rotatedEndValue
Test: Expand PiP in portrait which was in landscape
Change-Id: I5c1400ece9d80226bc35b497d308215010ead027
Maintain the same assertions for new assertion blocks and legacy. This CL is used while migrating the existing tests from the old to the new DSL format.
Once the tests are migrated the legacy support will be removed.
Bug: 162923992
Test: atest FlickerTests
Change-Id: I9a64a7ab43bf60c67a26f37562ab6c4d7bb0c487
Those tests are right now flaky on flame and cannot be used in presubmit
Bug: 175687842
Bug: 179116910
Test: atest WMShellFlickerTests
Change-Id: I5e1b3075a63695fed006b2fb134b826447cb8d0c
This adds the proper hook for framework to request PiP transition from
Shell and run the animation as needed. Currently only Enter using
3-finger navigation is supported, along with a KI that the PiP bounds
are not finalized at the end of the animation.
Bug: 165793917
Test: Enter PiP with ENABLE_SHELL_TRANSITIONS flag on
Change-Id: I0b992840ddcf8ddfcec9759a5cb06b630f1899a8
Refactor SizeCompatModeActivityController to WM Shell. The old one will
be removed in separate cl as there are some dependencies in other
packages.
This cl is mainly for refactor. Major change will come after.
Besides refactor, also changed the mActiveButtons key to TaskId, because
launcher Task will also trigger onTaskInfoChanged, but should not remove
the restart button on the same display.
Bug: 176061101
Bug: 178327644
Test: manually verify that the size compat restart button works as usual
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WmTests:SizeCompatTests
Change-Id: I9143e079a1a945b76c3c56596976dd6ad2802897
Add interface for SizeCompatUIController in WM shell to use
when refactoring SizeCompatModeActivityController from system UI.
Bug: 176061101
Bug: 178327644
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I37f72396e1769b7773722be6575506fc430b2739
Enable tests ot be in presubmit, postsubmit or marked as flaky
Do not require flicker DSL changes
Bug: 162923992
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I74fdadaf5f6f08d96973683682297200eec6658d
These tests are flaky on both crosshatch and flame
Disable them from presubmit
Bug: 175687842
Bug: 179108356
Test: atest WMShellFlickerTests
Change-Id: I51e85238064e806106e68b47460836fd278cab3d
1) Integrate companion object inheritance and the default test runner
2) Move launch activity to setup: avoid noise of splash screen
3) Move setRotate() to setup: avoid noise of system windows
(LetterBox, NavBar, StatusBar...) visibility changes
4) Reducing test time of each test case: remove redundant transition
5) Remve redundant val for readibility
6) Remove navBarLayerIsAlwaysVisible assertion from split test
the rotation flow of enter split screen :
Overview(land) -> enter split(portrait) -> split mode(land)
7) Partially enable ROTATION_90 tests
8) Bypass visibleLayersShownMoreThanOneConsecutiveEntry assertion
for flaky reasons(Splash Screen, LetterBox, BackGestureSurface)
Test: atest WMShellFlickerTests
Bug: 176134495
Bug: 178685668
Bug: 178447631
Change-Id: I1d6153b987e5913a5d9a1fa5b72b9341b40db6fc
Improve flicker memory consumption with the following:
- Use a static factory for better compatibility with JUnit4 ParameterizedRunner
- Ensure `cleanUp` is always called, even when an exception occurs
Bug: 178572522
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Id9e539c0e8bce350f94811cab58a726e47aac525
- Refactor some code to prevent blocked calls when calling to
and from the Bubbles code when it runs on another thread
- Ensure that ScrimView can be run in separate windows running
on separate threads
Bug: 161979899
Test: atest WMShellUnitTests
Test: atest SystemUITests
Change-Id: I8eca9e9f644486f73a39f21dc37852be51d94539