Using WindowlessWindowManager for adding a surface wihtout depend on
Window Hierarchy, we just add leash with specific theme color at
bottom z-order while One-handed trigger, and remove it when exited.
Bug: 197165590
Test: manually test One-handed mode basic operations.
Test: atest WMShellUnitTests
Change-Id: Ie53684edd4511719516c00dd64c2dfad360a593b
With Shell transition, when mVisibleRequested is changed, it will wait
until the transition finish to update the isVisible(). As a result, if
there is a visible change before the previous transition is finished,
it will be skipped.
For example, when we first open a fullscreen app and then immediately
enter pip:
1. TRANSIT_OPEN will call to hide wallpaper and set mVisibleRequest to
false, but not commit visible until transition animation is finished.
2. TRANSIT_PIP will call to show wallpaper, but if it is started before
the OPEN transition is finsihed, it will not update the wallpaper
mVisibleRequested, which will leave the wallpaper hidden.
Fix: 210965575
Bug: 210965692
Test: atest WMShellFlickerTests:ExpandPipOnDoubleClickTest
Change-Id: I2578aafd024a3c9a6ec96079d4dc6cb740c890d2
Use short edges on the flicker tests so that the test apps cover the full screen in both raven and in flame devices. With default cutout, some assertions will need to be updated to consider the letterbox layers, as well as app windows not covering the entire display
Bug: 209935473
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Iaeabe2033adc2890605bbef7bce139569f402c4b
Add 2 CUJs for one handed mode transition
1. ONE_HANDED_ENTER_TRANSITION
2. ONE_HANDED_EXIT_TRANSITION
- [STATE_ENTERING] Detect swipe down gesture: Begin of enter CUJ
- [STATE_ENTERING] Tap shortcut to trigger: Begin of enter CUJ
- [STATE_ACTIVE] Transition end of enter: End of enter CUJ
- [STATE_EXITING] Detect swipe up gesture: Begin of exit CUJ
- [STATE_EXITING] Tap shortcut to exit: Begin of exit CUJ
- [STATE_NONE] Transition end of exit: End of exit CUJ
Test: see trace in comment
Bug: 201032904
Change-Id: I29258a1bbbe567c935d467621a85fbdfe2397d54
Previoulsy mDefaultDisplayBounds & mLastVisualDisplayBounds are
incorrect after device reboot without re-register DisplayAreaOrganizer.
Then the bounds does not set correctly for transition.
When AnimationController#getAnimator() get incorrect display bounds,
either surface bounds or rounded corner does not crop correctly.
Test: manual enable OHM, reboot device and trigger
(Bounds/Rounded corner should works when trigger)
Test: atest WMShellUnitTests
Bug: 212651010
Change-Id: Ib30edf6ecc2244f7fec7e233b0fb048d5ee40f3c
When there is screen rotation, we need to set the corner radius and
window crop in both start and finish transaction to avoid janky
animation.
Fix: 210965679
Test: atest WMShellFlickerTests:PipRotationTest
Change-Id: I03d1c3c4e39ea55dd4cc3f43b1170cfd6fe88cfa
Some of the assertions used in flicker worked in older devices but not on newer ones.
Disable these assertions and make flicker tests compatible with notch to run on newer devices
Bug: 206753786
Test: atest FlickerTests WMShellFlickerTests
Change-Id: Idf889506d767c4743938ee6727cd228b29873e66
By current split design, we always update bounds and apply WCT on
DA info changed callback. However, with shell transition, we should
avoid apply WCT while transition running.
Add display rotation callback we used in legacy split to new split
and apply bounds on such callback. This can ensure that WCT sync to
running rotation transition.
Bug: 206872147
Test: manual
Test: pass existing tests
Change-Id: I358a00ab6ecfb56ececcc93204a78366c48cabda
Before, it didn't set the corner radius on the finish transition, so the
corner radius is set to 0 when finished.
Bug: 210965679
Test: atest WMShellFlickerTests:PipRotationTest
Change-Id: I7a3c478ef36a4bb730f2153d6b2487a41a469545
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback
Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled
Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
Hook up RecentsTaskController with split screen when enabled
shell-transition. Bundle exit reason and dismiss transition together in
order to log and determine whether the dismiss should break recorded
app-pair in recents or not.
When dismissing split screen with shell-transition, it'll reparent child
tasks out of split screen before they committed invisible, so rely on
fullscreen task opening signal to update app-pair information instead
of relying on visible task appeared or changed in
FullscreenTaskListener.
Bug: 206487881
Test: atest SplitTransitionTests
Test: dump and observe recorded split pair in RecentsTaskController
Change-Id: I109d7b3b2eab2b4f691e85a2afd052f56b1a9bca
Integrate launch-to-side split transition to shell transition.
Because there is no guarantee for launching activity to split
successfully before actually launching it, trigger enter split
transition after observed new task launching into split.
Bug: 206487881
Test: atest SplitTransitionTests
Test: drag to enter split with shell transition works
Change-Id: Idda7c3b02689753cea1a1fe80264145f1a449f73
I've never been able to reproduce this and the stack traces I have
of it don't match existing code, but looking at the code paths I think
this could still happen, there are a couple of places where the
mMagnetizedBubbleDraggingOut gets nulled out (e.g. on child removed)
I've tried to repro by:
- canceling the bubbles in the middle of dragging to dismiss
- trying to snap the bubble back and then drag it again to dismiss
(snap back also nulls it)
I see a recent stack of it in pitot so I think it's worth adding the
null check.
Test: atest ExpandedAnimationControllerTest
Bug: 201866808
Change-Id: Ib9425a2b63410c95fddaaea59761dfd18557ed54
Navigation bar is only created and used when taskbar is not available.
When taskbar is available, we will use TaskbarDelegate to be the one
responsible to update pip exclusion bounds as PiP moves.
Bug: 210038947
Test: Unfold, enter PiP, stash - PiP can be yanked out
Change-Id: I8f789d3b603e41c3d15494afdadce2cddc4d4b9c
Some tests are failing when using shell transition.
Disable the tests that currently fail so that we can move some shell assertions into presubmit
Test: atest FlickerTests WMShellFlickerTests
Change-Id: If86fb6b053a384050aa533d2ebb45031c1acdf70
First CL in the chain that will add a camera compat UI control which will be used to correct stretched issues in TextureView and SurfaceView cause by apps not handling mismatch between camera buffers and view size correctly.
This change is necessary because right now there are 2 instances of WindowlessWindowManager (SizeCompatUIWindowManager) in SizeCompatUILayout: for a hint and for a restart button. They are also positioned relatively by computing offsets in java code rather than by specifying layout with XML. This code structure will cause issues since with upcoming camera changes there will be a need to coordinate relative position of 4 UI elements (2 buttons and 2 hints).
What is changing in this CL:
- Majority of changes are simple renaming from "size compat UI" to "compat UI" since, starting from the next change, two different compat controls will be supported.
- Merging 2 instances of SizeCompatUIWindowManager into one (CompatUIWindowManager) and for that create a joint layout in compat_ui_layout.xml
- Merge SizeCompatLayout logic into CompatUIWindowManager since in absence of 2 instances of WindowlessWindowManager there is no good reason to keep them separate.
- Merging and renaming tests to follow refactoring of the implementation.
Test: atest WMShellUnitTests (the same set of tests should be sufficient since this refactoring just reorganized the structure of the implementation)
Bug: 206602997
Change-Id: I7141c69b7ba4742c5b7b2018329b91a1b37b45bc
To prevent it conflicting with shell transition when entering split, we
don't want to apply layout change when setting up divide position. Add a
boolean parameter to indicate whether to apply layout change or not for
setDividePosition.
Bug: 206487881
Bug: 208954095
Test: Trigger split screen, snap divider to non-middle position and
observed no crash after dismissed and re-entered split screen.
Change-Id: I91ba735ade538e1bb3d5a5eba0c782c4456e1746