Commit Graph

4773 Commits

Author SHA1 Message Date
Ivan Makarov
8ac0ae76e0 Move SplitscreenEventLogger to StageCoordinator
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
2022-09-09 09:51:09 +00:00
Ivan Makarov
e6bf1d16cb Add TV splitscreen menu
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)
2022-09-08 15:53:06 +00:00
TreeHugger Robot
915edab656 Merge "Enable shell drag and drop logging to diagnose drag failure" into tm-qpr-dev 2022-09-08 07:14:03 +00:00
Wei Sheng Shih
b31a80dedc Merge "Do not create extend surface for transfer starting window change." into tm-qpr-dev 2022-09-08 04:41:42 +00:00
Winson Chung
61d4b956a6 Enable shell drag and drop logging to diagnose drag failure
Bug: 234653212
Test: Presubmit
Change-Id: Icb46e5d95a03d342c8c9394d787a5d7e71a70602
2022-09-08 04:21:02 +00:00
Jerry Chang
591c5ebf87 Merge "Fix wrong layout after quick switch back to a split pair" into tm-qpr-dev 2022-09-07 23:53:38 +00:00
Ikram Gabiyev
108cea327f Merge "Deactivate touch target for splitscreen button" into tm-qpr-dev 2022-09-07 21:28:11 +00:00
Mady Mellor
328b3d9a47 Merge "Fix a small bug where desktop mode changes might not be applied" into tm-qpr-dev 2022-09-07 19:03:22 +00:00
Evan Rosky
da06944a7c Merge "Send core-created snapshots to transition player" into tm-qpr-dev 2022-09-07 17:15:05 +00:00
Jerry Chang
e32c8fb9c2 Fix wrong layout after quick switch back to a split pair
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
2022-09-07 03:52:13 +00:00
wilsonshih
e252ffde09 Do not create extend surface for transfer starting window change.
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
2022-09-07 11:39:14 +08:00
Ikram Gabiyev
041c9b9027 Deactivate touch target for splitscreen button
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
2022-09-06 23:43:00 +00:00
Mateusz Cicheński
91a8c017b2 Merge "Ignore scheduleFinishResizePip if there is no surface to operate on." into tm-qpr-dev 2022-09-06 23:24:03 +00:00
Mady Mellor
c063e246ce Fix a small bug where desktop mode changes might not be applied
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
2022-09-06 12:21:47 -07:00
Mateusz Cicheński
3e6c3a9914 Ignore scheduleFinishResizePip if there is no surface to operate on.
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
2022-09-06 17:02:47 +00:00
Ats Jenk
70a463df5c Merge "Only clear bounds and windowing mode for standard" into tm-qpr-dev 2022-09-06 16:06:54 +00:00
Jerry Chang
d64db8b5a6 Merge "Fix no response after entered split screen" into tm-qpr-dev 2022-09-06 07:13:17 +00:00
Vali Calinescu
f6b0a6487f Merge "Fix typo in EnterPipToOtherOrientationTest" into tm-qpr-dev 2022-09-05 14:18:05 +00:00
Jerry Chang
768ee2c04c Fix no response after entered split screen
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
2022-09-05 10:34:39 +00:00
Bill Yi
801b76d540 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Id4a294d3b38dfabaccd7029b85e695b888c68836
2022-09-03 10:40:18 -07:00
Garfield Tan
4e86b76aaa Merge "Stop making copies when updating input channels" into tm-qpr-dev 2022-09-03 01:06:23 +00:00
Ats Jenk
0de70a4160 Merge "Move check for 'desktop mode active' to helper" into tm-qpr-dev 2022-09-02 19:05:37 +00:00
Ats Jenk
aa39e03993 Only clear bounds and windowing mode for standard
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
2022-09-02 11:16:21 -07:00
Bill Yi
d4f923474d Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-02 18:13:22 +00:00
Vali Calinescu
994b3bf56d Fix typo in EnterPipToOtherOrientationTest
Fix: 244734796
Test: N/A
Change-Id: I9ec3baa6de3b96cab9189529ced4d48f0ab1f54e
2022-09-02 16:10:20 +00:00
Ats Jenk
fe50d13c04 Move check for 'desktop mode active' to helper
Test: build wmshell
Bug: 244348395
Change-Id: I7157c977200d70f54767f4587010e1872f03616d
2022-09-02 09:00:26 -07:00
TreeHugger Robot
2d4204a3b0 Merge "Remove decoration layers from hierarchy on release" into tm-qpr-dev 2022-09-02 14:21:58 +00:00
Mateusz Cicheński
abcf028aa9 Merge "Move PiP in response to keep clear areas changed events." into tm-qpr-dev 2022-09-02 05:19:12 +00:00
Jerry Chang
e481b38441 Merge "Support launching a shortcut and a task to split screen" into tm-qpr-dev 2022-09-02 01:40:47 +00:00
Mateusz Cicheński
835dd73120 Move PiP in response to keep clear areas changed events.
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
2022-09-02 00:23:34 +00:00
Garfield Tan
c49b8a122b Stop making copies when updating input channels
Bug: 244586478
Test: No window decor layers in offscreen layers.
Change-Id: Ib8cb9e30a0c078fe959037135a51261aa13ac31b
2022-09-01 16:58:38 -07:00
Hongwei Wang
8d8e064dd2 Merge "Handle ProtoLog logging command in WMShell" into tm-qpr-dev 2022-09-01 23:53:05 +00:00
Garfield Tan
c6a2b7e299 Remove decoration layers from hierarchy on release
Bug: 244586478
Bug: 243977698
Test: Decor layers aren't in the hierarchy after release.
Test: Old task backgrounds don't remain.
Change-Id: I28b31409069fd482bbf235ed39a16681e5b7c250
2022-09-01 15:14:39 -07:00
TreeHugger Robot
b4c3a06820 Merge "Move caption under DecorationContainerSurface" into tm-qpr-dev 2022-09-01 16:24:22 +00:00
Jerry Chang
24158716b4 Support launching a shortcut and a task to split screen
Bug: 243101552
Test: long press on a shortcut to enter split screen works
Change-Id: Ifc7f6ce926d45c9c13407921b80ab7b07d270cf1
2022-09-01 13:35:11 +00:00
Matt Sziklay
21688acee8 Merge "Guard potential null case in FullscreenTaskListener.releaseWindowDecor found in testing." into tm-qpr-dev 2022-09-01 02:07:09 +00:00
Bill Yi
1b963f0ff9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ifb3457577dc9c5ae0d0c355642eacd6f176594e1
2022-08-31 17:55:08 -07:00
Hongwei Wang
5ec2f4d52e Handle ProtoLog logging command in WMShell
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
2022-08-31 17:30:37 -07:00
Garfield Tan
9678d36dc5 Move caption under DecorationContainerSurface
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
2022-08-31 16:06:45 -07:00
Evan Rosky
c8b3fc0acc Send core-created snapshots to transition player
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
2022-08-31 15:20:06 -07:00
Maryam Dehaini
ef023c1411 Merge "Move Task Close to WindowContainerTransaction" into tm-qpr-dev 2022-08-31 20:39:37 +00:00
Oleg Blinnikov
4f878b4cc1 Merge "Letterbox education: Updated UI" into tm-qpr-dev 2022-08-31 10:26:20 +00:00
Tony Huang
1a24c23f93 Merge "[Re-land]Improve enter split transition" into tm-qpr-dev 2022-08-31 05:57:01 +00:00
mattsziklay
0e1f47361e Guard potential null case in FullscreenTaskListener.releaseWindowDecor
found in testing.

Bug: 244333148
Test: Test no longer fails.
Change-Id: Ie65ac68f11afc6777e2c9c18f8ad8386ae43082f
2022-08-30 17:26:58 -07:00
Maryam
193d515420 Move Task Close to WindowContainerTransaction
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
2022-08-30 22:17:21 +00:00
Oleg Blinnikov
ddae7e0800 Letterbox education: Updated UI
Updated paddings, margins, text and icons, renamed the main icon file

Bug: 232475559
Test: manual UI test
Change-Id: I3a70637a1330265376337f36f72fdf1c3dda25ee
2022-08-30 15:39:01 +00:00
Chilun Huang
313aae1ef2 Merge "Not to update recent tasks split pairs when shell transition enabled" into tm-qpr-dev 2022-08-30 08:54:13 +00:00
Tony Huang
5b09708ef6 [Re-land]Improve enter split transition
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
2022-08-30 07:09:27 +00:00
Steve Elliott
d215285a64 Merge "Remove NotifGroupManagerLegacy usage from Bubbles" into tm-qpr-dev 2022-08-29 19:28:57 +00:00
Steve Elliott
9e0b961c12 Remove NotifGroupManagerLegacy usage from Bubbles
Bug: 200269355
Test: atest SystemUITests
Change-Id: If996315ae55f9f5b13159345b01bcea8f07a0ba4
2022-08-29 12:20:10 -04:00