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
Fix crash in .tv.PipController: .tv.PipController creates a
PipNotification object before assigning mPipMediaController, but
PipNotification calls PipController#getPipMediaController() from its
constructor, receives null, and causes NPE when tries to subscribe to
it.
This CL fixes the crash by providing PipNotification with a
PipMediaController reference directly (as a constructor param).
Bug: 169575409
Bug: 165795012
Test: make && flash adt3-userdebug
Test: atest android.systemui.cts.tv.MicIndicatorTest
Change-Id: I0010863921607cc315acfcbe0cb9d181b79d26b2
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
A list of existing DisplayAreas of the given feature are returned when
registering the organizer, and the organizer will not receive
onDisplayAreaAppeared() for these DisplayAreas.
Fix: 162028888
Test: atest WmTests:DisplayAreaOrganizerTest
Test: atest OneHandedDisplayAreaOrganizerTest
Change-Id: I3f4c5921a31c06e5b6c0040397df15cdee6ebcdd
Make .tv.PipController rely on PipMediaController for media session
monitoring and managering.
Refactor .tv.PipControlsViewController to use PipMediaController to
retrieve the media buttons.
Make .tv.PipNotification subscribe to PipMediaController to receive
callbacks about media metadata updates.
Bug: 169575409
Bug: 165795012
Test: make WindowManager-Shell; make SystemUI
Change-Id: I397f93eb4433116ba4f476bda7374b07d97e082d
Introduce MetadataListener interface to the PipMediaController (required
by .tv.PipNotification.
Remove unused field mActivityManager and unused IActivityManager
constructor parameter.
Bug: 169575409
Bug: 165795012
Test: make WindowManager-Shell; make SystemUI
Change-Id: I6988d9aa95edd6152d807300520803116f193a3b
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
Remove TV "legacy" methods from Pip interface:
- addListener(...) that takes .tv.PipController.Listener objects
- getMediaController()
- getPlaybackState()
Leave both methods in .tv.PipController with package-private access
level.
Bug: 165795012
Bug: 169575409
Test: make WindowManager-Shell
Change-Id: I335d7d098b1a7af2c7958cd234553e7fde6557ac
- Add mechanism for creating PendingIntents to launch apps in the same
way as starting through LauncherApps service
- Require callers starting a task launch to either be the recents
component or have the START_TASKS_FROM_RECENTS permission
Bug: 169894807
Test: atest LauncherAppsTest
Test: atest DragDropControllerTest
Change-Id: I2f9f622b4ef7a8aba06b0854a1549a2c07cf38e1
Currently some of the information about a task created by createRootTask
is returned with the method and the rest like leash is return in
onTaskAppear. Mixing both async and sync infromation return styles
complicates the mental model for this. So, we will have this be
completely aync for now.
Also, fixed an issue where the windowing mode for organizer created
task was not set correctly before the organizer gets the first task
appear signal.
Bug: 169266958
Test: Split-screen works!
Change-Id: Ia4180d5a42838bf566fbf75f40466dfd8237e0f1
- Add private window flag INTERCEPT_GLOBAL_DRAG_AND_DROP (protected by
MANAGE_ACTIVITY_STACKS permission) to be considered as a part of the
normal flow for global drag and drops even if the window is not
visible. In addition, the window with the flag receives the clip
data on DRAG_STARTED and the drag surface on DROP. If the window
consumes the drop, then it will relinquish cleanup of the drag surface
from the system.
- Add MIMETYPE_APPLICATION_ACTIVITY for an app to report that they are
starting a global drag of an activity. The associated data must
include an intent with the pending intent and user to launch the
activity for.
- Add a test drag handler on the shell end to receive the drag, setup a
drag layout, and just launch the intent (for now).
Bug: 169894807
Test: atest DragDropControllerTest
Test: atest DragDropTest
Change-Id: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Merged-In: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Signed-off-by: Winson Chung <winsonc@google.com>
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
Added also a AIDL method Launcher would issue when the entering pip
animation is completed on Launcher side and WM should update the task
surface when doing cleanup.
Bug: 143965596
Test: see ag/12838262
Change-Id: I5396f9637b4760df014f63b46543d4f399229bba
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
- Rename TransitionType to TransitionOldType, and define a new
TransitionType.
- Calls prepareAppTransition which takes a new TransitionType when app
transition related event happens.
The TransitionOldType and related logic will eventually removed. Until
migration finishes, we keep both.
Bug: 166736358
Test: Pass existing tests, since no new logic is enabled.
Change-Id: I984f68d5ecfae56fbfe7d91babbfddcf34378f6c
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
1. Return false for handlesOrientationChangeFromDescendant() when
ignoring orientation request, so Task will be letterboxed on cold start.
2. When Task is letterboxed, CompatDisplayInsets should use the Task
size instead.
3. ShellTaskOrganizer places FULLSCREEN Task to (0,0), which doesn't
work well with task level letterboxing.
Bug: 170725334
Bug: 155431879
Test: atest WmTests:SizeCompatTests
Test: manual: adb shell wm set-ignore-orientation-request true
Change-Id: Ifdc30fd5e52df5db11bef80d1a124e017ce146b6
- Post callbacks from WM Core on executor.
- Added lock to protect critical sections.
Bug: 171384876
Test: They pass!
Change-Id: Ia1808b66104c2a1e6efb9f43c31e6a3a2f67a952
Make sure that the bounds state is updated with the final
destination bounds after a rotation *before* sending the
pip animation finished & cancelled callbacks.
This ensures that the MotionHelper bounds are synchronized
correctly at the end of the rotation to the post-rotation
bounds and not the pre-rotation bounds by
PipTouchHandler#onPinnedStackAnimationEnded.
Bug: 171352429
Test: Enter PIP, rotate, move PIP - the window doesn't jump
to the pre-rotation bounds when trying to move it.
Change-Id: I36eb192210ec58ac3448c423f43b959ce29eff1f