Mirror PhoneWindowManager#addSplashScreen to StartingSurfaceDrawer,
which make WMShell able to draw the splash screen starting window.
- Use StartingSurfaceController#DEBUG_ENABLE_SHELL_DRAWER to switch
drawer when developing this feature.
- Temporarily put StartingSurfaceDrawer in ShellTaskOrganizer, the
drawer should be controlled by a controller which should be create
while porting ActivityRecord#addStartingWindow to Shell.
Ref doc: go/delegate_starting_window
Bug: 131727939
Test: atest AppWindowTokenTests WindowOrganizerTests ActivityStackTests
Test: atest WMShellTest ShellTaskOrganizerTests
StartingSurfaceDrawerTests
Test: check from winscope that the splash screen window can
attach to/detach from the ActivityRecord.
Change-Id: I6dfc9ff75807e2f9479149d14f219c91a6527393
- Ensure that the task info activity type always matches the actual task
activity type (can be different than the window configuration type)
- Ensure that the targets hit rects respect the insets, and that dragging
out of all targets (but still within the window) will hide the last
target
- Work around race with launching secondary task when splitting, wait
until the split screen task org has moved existing tasks to secondary
split root before starting the new task, and also update the home task
position when going home (b/172686383)
- Add a timeout to clean up drag surfaces if SysUI crashes while
mid-drag
- Clean up some other calls to get activity type/win mode
Bug: 169894807
Test: atest DragDropControllerTests
Test: atest DragAndDropPolicyTest
Test: atest SplitScreenTests
Change-Id: I7ae11cc38b1e927d955798ef1056e17c9e435758
- Have shell provided a task stack listener that various controllers can
add to, and remove registration from outside the controllers (this
also removes methods on the interface exposed only for use from the
task stack listeners)
- Move copy of InputConsumerController into shell (shared lib version
can probably be refactored into use just by launcher for gesture nav)
- Hide remaining wm components that are exposed now that all the
features are in the Shell
Bug: 169894807
Test: atest WMShellUnitTests WMShellTest
Test: Verify Pip/Split/One handed still behaves as expected
Change-Id: If0f50f6b701ac4b013a9e41fe6f88857ea35bf5b
Fixes an issue where activities using the manifest min
width/height was causing them to not be resizable.
This was caused by:
1. transformBoundsToMinimalSize is called on drag resize, which
causes the bounds to go back to the minimal size.
2. After fixing 1, drag resizes "jumps" from the minimal size to
the default bounds because the normal bounds are not set to the
minimal size
3. Reentry bounds are not restored correctly because when
calculating the destination bounds, the bounds where always
transformed to the minimal size at the end.
This CL changes a few things to fix these issues:
1. The minimal size is now considered when calculating the
entry bounds or transforming bounds to aspect ratio. This means
that instead of calculating the bounds/size using the "default"
size and then adjusting to the minimal size, we'll look at
whether we should calculate using the default or the minimal size
from the very beginning.
2. When the minimal size changes (onTaskAppeared, onTaskInfoChange,
swipeToHome), the normal bounds and movement bounds need to be
recalculated. The normal bounds are the default bounds, and the
default size changes if the minimal size is set or unset.
3. The min edge size used to be set by PipTouchHandler depending
on whether PIP is expanded to either expandedMinEdgeSize or 0. It
is now set to mDefaultMinEdgeSize if not expanded. This was not
causing issues before but it started to with these changes.
Also moved the minEdgeSize and overrideMinSize to PipBoundsState
as part of b/169373982
Fixes: 172598623
Bug: 169373982
Test: com.android.wm.shell.pip
Test: enter pip, expand, resize, reentry bounds,
minimal size in manifest, aspect ratio change all work
correctly.
Change-Id: I4baa46eb641323282fc23fd4499365c83ff38a7d
If the PiP is stashed and something causes it to move (such as, screen
rotation or unexpand animations after timeout), we calculate its current
snap fraction, get the new bounds and movement bounds, and re-apply the
snap fraction. However during the snap fraction calculation, it assumes
that PiP bounds is within the movement bounds, which is not true when
PiP is stashed. So take this into consideration when doing the math.
This also changes the stashed status to reflect more than just yes/no -
but rather NONE/LEFT/RIGHT.
Bug: 165793553
Test: Stash PIP while menu is showing, and wait for timeout
Test: Stash PIP, rotate the device, see that snap fraction is persisted
Change-Id: Ib4eda44b7f280362b52609e4092dd4231ac8f04c
Move first test out of android.systemui.cts.tv.PipNotificationTests to
com.android.wm.shell.flicker.pip.tv.TvPipNotification tests.
Bug: 171520419
Test: atest WMShellFlickerTests:TvPipNotificationTests
Change-Id: I6a3e2fb96a7688814ce909f28d6d904356fad3fd
Move common constants to a separate class.
Rename abstract FlickerAppHelper to BaseAppHelper.
Give BaseAppHelper a UiDevice (from androidx).
Make BaseAppHelper resposiblt for creating launcher.
Teach BaseAppHelper to launch app via intent and force-stop it.
Teach PipAppHelper to properly close Pip on TVs and work around
hasPipWindow() method not working on tv.
Bug: 171520419
Test: atest WMShellFlickerTests
Change-Id: Icc102a51351605b4adb27c3a1c2d73030eac33ff
Move bubbles package and related resources to shell package,
also copied some used codes and resources.
Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
- Add basic policy for handling drags over home/fullscreen tasks
/split tasks. For now, default to only allowing split to non-docked
root task
- Refactor drag layout to have same lifecycle as the window instead of
being per-drag session
- Resolve activity info for tasks as well as activity drag items
(shortcuts to be resolved in a follow up CL)
- Fix crash due to sending drag events to all displays
Bug: 169894807
Test: atest DragAndDropPolicyTest
Change-Id: I7d777c59296e9ca9e1d169c8a021f9263af94d65
Deprecates also the SystemWindow reference in PipTaskOrganizer
Bug: 172274913
Bug: 172275014
Test: manually enter PiP with auto-pip enabled
Change-Id: I0c817a51fd3c24036151deec0cf1487759573d44
This is the first step to move the menu to fullscreen, but not quite
yet.
This CL does:
- Move PipMenuView to be attached to SystemWindow, instead of child of
PiP leash
- Use SyncRtSurfaceTransactionApplier to ensure the menu moves along the
PIP leash at the same time when the menu is visible
- Remove setup/destroy code in PipTaskOrganizer with SurfaceViewHost
- Expose Window information to Accessibility services
- Refactor ShellRoot to take in a Layer type instead of windowType
instead
Bug: 161710689
Bug: 170151121
Bug: 169894316
Bug: 152738416
Test: Manual
Change-Id: I73c26f96784b35b9bb9a4bea452df55cf5913278
Allows to organize direct child of root task created by organizer and
extends TaskInfo to reveal the parent task id.
To organize child task properly for each features, passes all child
task organizer events to the listener listening to its parent task if
feasible.
Fix: 169267298
Fix: 169266482
Test: atest WindowOrganizerTests
Test: atest SplitScreenTests
Test: atest PinnedStackTests
Test: atest WindowInsetPolicyTests
Test: atest WMShellUnitTests
Test: split screen works
Change-Id: I8e66f810c86fcdac3287adfa208d8e34786fc9b5
Move PipMediaContoller from com.android.wm.shell.pip.phone to
com.android.wm.shell.pip.
Since PipMediaController relies on the PipUtils, move that along.
Bug: 169575409
Bug: 165795012
Test: make WindowManager-Shell
Change-Id: Ide2dfd813eb8df906b58f50e1ed9b57a62d63dbc
As now the AssertionTypes in Flicker checks for the bug id to set the default value of the enabled param (ag/12886026), we are fixing all the calls to the assertions types as the params order changed.
Test: atest WMShellFlickerTests
Bug: b/162923992
Change-Id: I04c0b70aeb201dc1d7627571cc4809e959bd2370
Migrates more state out of PipBoundsHandler as an effort
to split it into a state holder (PipBoundsState) and a
bounds calculating util.
Bug: 169373982
Test: atest com.android.wm.shell.pip
Change-Id: I37ab29c988be519a074ec260163632df3060efc4
Add intent-filter for LEANBACK_LAUNCHER to PipActivity and ImeActivity
in com.android.wm.shell.flicker.testapp.
Bug: 170484870
Test: atest WMShellFlickerTests:PipKeyboardTest
Change-Id: Ib9be4d4c30c5759a18b67be1a606c06562b47d3c
Couple of changes here:
1. mAspectRatio is moved to PipBoundsState
2. Simplified getDestinationBounds by removing the aspect ratio
param. It was always re-calculated, then sent to getDestinationBounds,
then updated mAspectRatio. Now mAspectRatio is updated first and
getDestinationBounds just uses the PipBoundsState's ratio.
Bug: 169373982
Test: aspect ratio is set correctly on enter PIP, and updated during
PIP mode if app changes it (e.g. Youtube)
Change-Id: I144960ff41bde4f18eb1e9a8e60ea0cba29a8470
Allows for managing specific task regardless of windowing mode.
Converted TaskView which to use the new API.
Bug: 170153209
Test: All tests pass and bubbles works!
Change-Id: Ic5281bc9dd9124841834c88f2b85545107567417
- 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
Makes sysui dagger provides optional PIP controller with PIP feature
flag. Adds test in PipControllerTest to make sure it won't instantiate
controller if the feature is not supported.
Bug: 170188471
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: I681bb5ac2972d6426c270099605d44fc82dc9f78
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