Currently, the SplitscreenEventLogger is declared as private final and
initialized in constructor of the SplitScreenController and not used
anywhere else in the SplitScreenController. Moved the initialization to
the StageCoordinator and removed the field from SplitScreenController.
Bug: 245650570
Test: atest SplitTransitionTests
Test: atest SplitScreenControllerTests
Test: atest StageCoordinatorTests
Change-Id: Iedc8893982f3bc4ba4c41f6a394f5fdf39098a99
Merged-In: Iedc8893982f3bc4ba4c41f6a394f5fdf39098a99
Add a splitscreen menu for TV allowing to change the focused task, swap
the stages and exit the splitscreen mode by closing one of the stages.
Bug: 242179031
Test: Enter the splitscreen mode. Send the corresponding broadcast to open the menu (adb shell am
broadcast -a com.android.wm.shell.splitscreen.SHOW_MENU). Choose the needed action button and press it, open the menu again, etc. Press the back button on the
menu control to hide the menu window.
Change-Id: Iac17445414a190c91ccd407d67f0f8c29d6bd4bf
Merged-In: Iac17445414a190c91ccd407d67f0f8c29d6bd4bf
(cherry picked from commit 7ab2a40d0a)
The remote animation for entering split screen will be canceled if it's
triggering by quick-switch gesture. Add back logic to update surface
bounds after animation got canceled which were accidently removed by
Icaabf2e1.
Fix: 244671191
Test: won't have any side empty after quick siwtched to a split pair
Test: atest WMShellFlickerTests
Change-Id: I520e594188e03fda2619be3fb22455e7d8b06d41
There could transfer starting window when launch a trampoline activity,
and the trampoline activity could be removed before it add a window.
So a possible sequence would be:
1. Activity A start a trampoline activity B, and transfer the starting
window to B.
2. B finish itself before add window, so the starting window transfer
back to A.
And there will create a close transition when finish B, but actually
this activity never draw anything on it. So if there attemp to create
an edge extend surface for it, that thread would be stuck in
Surface.unlockAndPost because nothing will draw.
Note: Not sure if above reasoning is correct, but in any case, it
should be reasonable to not need to prepare edge extend surface for the
surface which could never been drawn.
Bug: 244260394
Test: atest ActivityLifecycleTests --rerun-until-failure 10
Change-Id: I31a36398bec86cb439396ad93108487cd6479139
Remove ripple after touching the splitscreen button
(with id of android:id="@+id/enter_split" defined in pip_menu.xml)
by setting the ImageButton setEnabled to true in PipMenuView.java
Test: atest SystemUITests
Test: manually, reproduced steps in the bug listed
Bug: 239613989
Change-Id: I105966feb22a0ccc5f11b59848c81f9ba682c3eb
Currently the window container transaction to apply desktop mode
would only be performed when the setting changes. If desktop mode
is already enabled, there wouldn't be a setting change event for it
being "on" after a reboot.
This CL updates the code to apply the wct in DesktopModeController
onInit, if the setting is enabled.
Test: manual - enable desktop mode via the tile
- reboot the device
- open an app
=> app should be in desktop mode
Bug: 241944030
Change-Id: I15df10dd275ef62df2cdcf7aaf22db526a842e97
Unable to repro, but based on the stack trace it happens here.
Adding proto logs to use when we collect repro steps from users.
Bug: 242939615
Test: n/a, unable to repro
Change-Id: I0d6761e26eb2bfadcd673bb3777812340aa060ae
Make sure to update stage root's bounds and reset the surface position
of opening apps to prevent double offset instead.
Fix: 245055674
Bug: 244671191
Test: enter split screen by long pressing on shortcut, anotehr side can
receive touch events after entered split screen.
Change-Id: Ie186cfa3b1406514ce8c33cd7321b8b9df40af26
When we switch between desktop and focused modes, we clear bounds and
reset windowing mode for all tasks.
Make sure this affects only tasks that have activity type set to
ACTIVITY_TYPE_STANDARD. This ensures we don't clear bounds or reset
windowing mode for launcher or split screen stages etc.
Bug: 244348395
Test: atest ShellTaskOrganizerTests
Change-Id: Iaf84cb2733a6ffa93c267cb8c716e7c0eb7ca13f
PiP window will gravitate towards bottom of the screen if it's in the bottom half of it.
PiP window will gravitate towards left/right edge of screen, whichever is closer.
PiP window will avoid occluding any reported keep clear areas.
Test: manually, existing tests pass
Bug: 183746978
Change-Id: Idb481fee7ead67734c5de0d833b281ca2a2aaaa8
Added a ProtoLogController class that hooks into ShellCommandHandler to
handle the adb shell command for ProtoLog in WMShell.
Removed the proxy in WM to pipe the adb shell command to WMShell via
StatusBarManagerService.
Bug: 243447162
Test: adb shell dumpsys activity service \
SystemUIService WMShell protolog help
Change-Id: I9175ec88dcbae53508c97b4df1c2378b3eb9d648
Therefore caption can be put at the same layer as other window
decorations. It adds CaptionContainerSurface to host the caption so that
WindowDecoration can put the caption at the same position as the task
surface.
Bug: 241598994
Test: atest WindowDecorationTests
Test: Caption is shown in front of embedded activities.
Change-Id: I9ec571859680f622449f4c3b5cea27222ec4c788
This way, the player doesn't have to take a second
screenshot for use during animation.
This also includes luma (only for rotation) since
that requires the actual buffer and we only want to
send the snapshot surface.
Bug: 242056267
Test: atest TransitionTests
Change-Id: Ib76bb821b4aa8c01c6db1827c26b9fb498aae878
Added removeTask HierarchyOp so that CaptionWIndowDecorModel now uses WindowContainerTransaction to remove task rather than IActivityTaskManager#removeTask(int)
Bug: 242094334
Test: Manual testing using acloud and unit testing (atest WmTests:WindowContainerTransactionTests)
Change-Id: I9e2f1946a517bdba6a75b7049f00943d729045f0
Updated paddings, margins, text and icons, renamed the main icon file
Bug: 232475559
Test: manual UI test
Change-Id: I3a70637a1330265376337f36f72fdf1c3dda25ee
Improve enter split transition by two part changes.
1. Enter split with resizing animation:
We directly show split but no animation before, it might looks
bad to user because UI change too many things in few frames.
2. Fix flicker cause by black screen when split active:
When we start intent on side stage task, the top split root task
will go to top and current top one task will be set as invisible
then cause black screen due to split root task is full screen.
Solve this by use new wct api setForceTranslucent to make split
root task as translucent when split inactive. We need to reset
it when split active otherwise it cause flicker when back to home.
Except above change, we also need to set side stage bounds to
area outside of screen otherwise it still cause flicker because it
will show a flash of shadow when launch intent on side stage.
This solution should be removed after shell transition fully
landing because in shell transition we could make those transitions
be done in one transition.
3. Fix b/243634747 caused by the previous CL. We should ensure split top
root is non-translucnet after split active by any flow.
4. Fix b/243735702 which occured on the previous CL. Because sync
transcation might apply after the animation, we could remove apply
when split active but only apply by the animator.
Fix: 223325631
Fix: 243634747
Fix: 243735702
Test: manual
Test: pass existing tests
Change-Id: Id8822aafe9eb0d6d5b0282cea256db622b9730d0