Commit Graph

4829 Commits

Author SHA1 Message Date
Matt Sziklay
488a69bfc4 Merge "Show captions on tablets even when display windowing mode is fullscreen." into tm-qpr-dev 2022-09-16 22:39:07 +00:00
Maryam Dehaini
b25a29ed88 Merge "Fixing UI Crash" into tm-qpr-dev 2022-09-16 19:58:36 +00:00
Evan Rosky
d6c6f5865f Merge "Use transition for desktop-mode switch when enabled" into tm-qpr-dev 2022-09-16 16:38:27 +00:00
mattsziklay
e4a9f82606 Show captions on tablets even when display windowing mode is fullscreen.
Changes the criteria for showing caption on fullscreen tasks to check
if the device is a tablet based on screen size rather than using display
windowing mode.

Bug: 243671025
Test: Manual testing; launched fullscreen tasks on multiple devices with
and without desktop mode flag enabled.

Change-Id: I4550f040daef9c55edaaf42bcfc2004a23e6924f
2022-09-16 09:26:48 -07:00
Mady Mellor
63caeaf9fa Merge "Expose getTaskInfo on TaskView" into tm-qpr-dev 2022-09-16 16:19:45 +00:00
Jerry Chang
b48c123b67 Merge "Fix timeout when dismissing split screen to two pane mode" into tm-qpr-dev 2022-09-16 00:51:43 +00:00
Evan Rosky
6a1363adc8 Use transition for desktop-mode switch when enabled
WHen using shell-transitions, use a transition instead of
regular applyTransaction

Bug: 236047261
Test: use desktop-mode switch w/ shell-transit. observe an actual
      transition.
Change-Id: I81f37d278420383f8b2b0f37cca8a398313705cb
2022-09-16 00:26:59 +00:00
Chris Li
7eb3933a3e Merge "Only play ActivityEmbedding animation if there is AE split" into tm-qpr-dev 2022-09-15 23:31:24 +00:00
Chris Li
941a2e72f6 Merge "Play ActivityEmbedding animation if all changes in Task with embedded" into tm-qpr-dev 2022-09-15 23:31:09 +00:00
Maryam
1e45037d90 Fixing UI Crash
UI crashing due to null windowDecor object being passed into
FullscreenTaskListener#giveWindowDecoration
Test: Manual Testing
Bug: 246637353

Change-Id: Iaefee1993e1477cb88ed34d8e94b5f24120152f1
2022-09-15 16:19:48 -07:00
Mady Mellor
db23075abb Merge "Allow the dismiss target size to be overridden" into tm-qpr-dev 2022-09-15 22:32:54 +00:00
Evan Rosky
ccb00cdb19 Merge "Support display-rotation during a split-to-recents transition" into tm-qpr-dev 2022-09-15 22:15:26 +00:00
Mady Mellor
ca7e3d3001 Allow the dismiss target size to be overridden
For floating tasks the normal target size is too small to really
fit the task window, this allows the dismiss target to have a
different size set via a resource id.

Test: manual - override the size (in different CL), observe that
               the target is at that size.
Bug: 237678727
Change-Id: I85edae739992662852d4cf40c250714a100a67bb
2022-09-15 19:17:51 +00:00
Mady Mellor
0cde4a9202 Expose getTaskInfo on TaskView
There's a bunch of useful stuff on TaskInfo (e.g. taskDescription and
background color). This exposes the existing method on TaskView so
users of TaskView can get this info.

Bug: 237678727
Test: none
Change-Id: I95e4bc37562a9f51b2cf6cec6d03889f57222e30
2022-09-15 19:17:36 +00:00
Mady Mellor
d0382078ba Fix NPE where BubbleExpandedView is null when we want to show manage education view
mManageEduView.show() requires a non-null BubbleExpandedView but getExpandedView() is declared as nullable.

Bug: 246824356
Bug: 246902054
Test: manual
Change-Id: I19d733ced80d121c7dab40936721c9cc8be1a12e
2022-09-15 18:54:49 +00:00
Evan Rosky
e992df1822 Support display-rotation during a split-to-recents transition
Some test automation will dismiss split-screen to launcher and then
immediately rotate the display. Currently, we can't properly
transactionalize the display-rotation, so it just gets squashed into
the existing collecting transition. The result is that the split-
screen handler expected just a split-screen transition but also got
a display-rotation.

This CL adds a mixed-handler case for rotation+split-screen that
stage-coordinator can then use to divide the transition into two
animations.

Bug: 244486556
Test: atest NexusLauncherTests:TaplTestsTaskbar#testLaunchAppInSplitscreen_FromTaskbarAllApps
Change-Id: I82b6a20155dc84e58ab95964da64c9c741f761d9
2022-09-15 11:26:17 -07:00
TreeHugger Robot
8e55f94e74 Merge "Use InstanceId in SplitscreenEventLogger for non-drag events" into tm-qpr-dev 2022-09-15 09:35:12 +00:00
Chris Li
b74873a410 Only play ActivityEmbedding animation if there is AE split
Same as the legacy app transition, we want to play the app customized
animation if there is no AE split.

We don't support app customized animation when there is AE split yet to
make the animation consistant.

Bug: 207070762
Test: atest WMShellUnitTests:ActivityEmbeddingControllerTests
Test: atest WmTests:TransitionTests
Change-Id: I68348cd650b9dbc8c39ef8d22a171d128e196882
2022-09-15 06:31:01 +00:00
Chris Li
1efadcb97c Play ActivityEmbedding animation if all changes in Task with embedded
Same as the legacy app transition, we want to play AE animation if all
changes are in Task with embedded activity

Bug: 207070762
Test: atest WmTests:TransitionTests
Change-Id: I66c5c083a517b3254d647c7335264eba8837f0cd
2022-09-15 06:30:05 +00:00
Chris Li
3f67b88826 Merge "Fix ActivityEmbedding Shell transition animation with reparent" into tm-qpr-dev 2022-09-15 06:29:44 +00:00
Chris Li
9170b62c9c Merge "Update ActivityEmbedding split open/close animation adapter for Shell" into tm-qpr-dev 2022-09-15 06:27:44 +00:00
Jerry Chang
d65119ec02 Fix timeout when dismissing split screen to two pane mode
After I1a0c4d17, the expanding task will first be resized to fullscreen
then reparent to TDA after the divider bar fling animation finished. If
the expanding app is expanding to two pane mode, the resuming of the
second activity might be skpped due to the task in another side of the
split is already empty and invisible.

Update the drag-to-dismiss flow to reorder the expanding task on the top
of dismissing task. So the content in the dismissing side won't flicker
during the dismissing transition and the activity resume won't be
skipped in the expanding side.

Fix: 243368173
Test: atest WMShellFlickerTests
Test: atest WMShellUnitTests
Test: put Settings and Chrome in split screen,
      drag divider bar to dismiss Chrome,
      verified the expanding transition won't timeout
Change-Id: Id16c1d9b4849d5f600de9524ffebb91aba73a721
2022-09-15 03:24:17 +00:00
Vinit Nayak
95a7c73b9d Use InstanceId in SplitscreenEventLogger for non-drag events
* Did not deprecate drag positions

Bug: 231369744
Change-Id: I6475b93dee7c8a141e5aeb9bb95825d510f04c5f
2022-09-14 19:54:47 -07:00
Tony Huang
306edcd6cf Merge "Fix overview to split pair animation" into tm-qpr-dev 2022-09-15 02:28:34 +00:00
TreeHugger Robot
7abd8bc893 Merge "Make the flingFinishedCallback be executed" into tm-qpr-dev 2022-09-15 01:04:52 +00:00
Chris Li
c72e0d110f Fix ActivityEmbedding Shell transition animation with reparent
With legacy transition, we capture a screenshot of the reparent child,
and attach it to the parent surface (in WM Core), and then animate the
parent in handler.

With Shell transition, we also need to do the same (in WM Shell) to
screenshot the reparent child, and animate the parent using the child's
change info. Otherwise the child animation will be cropped.

Bug: 207070762
Test: manual
Change-Id: I52b5c839343864b4179e5c35c33343bc282bc189
2022-09-14 13:57:16 +08:00
Bill Yi
a270946dc9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8ca7945ff6dd90ecc36ce31ebb40fb6e458f84b1
2022-09-13 19:17:22 -07:00
Ikram Gabiyev
491e471def Merge "Allow pip screen size to toggle on double tap" into tm-qpr-dev 2022-09-13 23:17:10 +00:00
Ikram Gabiyev
2dc6275e3a Allow pip screen size to toggle on double tap
Make sure pip screen size animates to normal
or maximum size depending on the current width
when a double tap occurs

Test: manually reproduced steps in the bug listed
Test: atest WMShellUnitTests:PipDoubleTapHelperTest
Test: atest WMShellFlickerTests:ExpandPipOnDoubleClickTest

Bug: 232173973
Change-Id: Ia8ec8696fddd236f992803451f44457e974069ac
2022-09-13 20:16:46 +00:00
Jeff Chang
500f2ea912 Make the flingFinishedCallback be executed
Exit split if the side stage no longer has children. We should invoke
flingFinishedCallback even if there is no need to run animation when
fling divider to dismiss.

Bug: 244540465
Test: Drag Chrome to create multi-instance in split screen repeatly
Change-Id: I101044515c366287e37951a32a1b57618f1c8f3e
2022-09-13 21:33:30 +08:00
Tony Huang
b54ca798dc Fix overview to split pair animation
Not very sure root cause but it caused by we changing to using
ILegacyTransition from normal remote animation callback.
Rollback to previous implementation for fixing this.

Fix: 246513837
Test: manual
Test: pass existing tests
Change-Id: I5fdde8a2304423153f60163d64c2f1ba2e642468
2022-09-13 10:13:46 +00:00
TreeHugger Robot
200d87305b Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-13 08:31:31 +00:00
Tony Huang
59666e71bc Merge "Fix split recent thumbnail disappear" into tm-qpr-dev 2022-09-13 08:04:23 +00:00
Mateusz Cicheński
839a5d1209 Merge "Delay PiP movement in response to keep clear areas changed." into tm-qpr-dev 2022-09-13 04:28:56 +00:00
Chris Li
9b1f2e4262 Update ActivityEmbedding split open/close animation adapter for Shell
Make sure the open/close a pair of activities act as one.
Cleanup unused adapter that was introduced for scaling animation, which
is replaced with x coordinate animation in T.

Bug: 19847347
Test: manually verify the animation with Shell transition
Change-Id: I5a34c2cf163f2a330e4c8111c16f8125bd5c2db5
2022-09-13 09:46:27 +08:00
Mateusz Cicheński
12199ddbdf Delay PiP movement in response to keep clear areas changed.
This prevents erratic movements caused by animations that update layout each
frame, effectively reporting new keep clear area bounds every frame and
triggerring the movement multiple times. This will now wait for the keep
clear areas to stabilize before moving away.

Can be customized via system property.

Video before: http://recall/-/g8x7ZkgdfbqscttAA9wzl9/hwr0OrO4Pq8cvLw9bgwLff
Video after: http://recall/-/g8x7ZkgdfbqscttAA9wzl9/bGTKo0oqCKUwtvBdBYOB9w

Bug: 183746978
Test: manually, e.g. open PiP and slowly swipe up to go to overview, which
causes Hotseat to animate away triggering keep clear areas changed multiple
times, but the PiP moves only once

Change-Id: I2214e2250fb3cace8fee117285fd8ffbd27a3870
2022-09-12 21:05:09 +00:00
Hongwei Wang
f121693b9d Merge "Update PiP movement bounds on TaskBar inset change" into tm-qpr-dev 2022-09-12 18:02:43 +00:00
Bill Yi
5a8aca57ff Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5c8b1656ec54382d22a6fafce1cc53e990282327
2022-09-11 10:33:31 -07:00
Hongwei Wang
f6fda1770a Update PiP movement bounds on TaskBar inset change
The DisplayLayout#stableInsets was set according to navigation bar
height and not get updated when TaskBar becomes visible.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dPuTSbBuAgjfyKiliwzo2Q
Bug: 198644965
Test: Open another app with PiP present and move it around, see Video
Test: atest WMShellUnitTests:PipControllerTest
Change-Id: I4db1446de0cb257e26d34985d294908cfe692967
2022-09-09 14:31:50 -07:00
Evan Rosky
241856132c Merge "Flatten SplitscreenPipMixedHandler into DefaultMixedHandler" into tm-qpr-dev 2022-09-09 20:37:47 +00:00
Ats Jenk
39e0f9f958 Merge "Add unit test for GroupedRecentTaskInfo" into tm-qpr-dev 2022-09-09 18:30:53 +00:00
Evan Rosky
c2c80d97c1 Flatten SplitscreenPipMixedHandler into DefaultMixedHandler
It was just a thin wrapper and thus unneeded abstraction.
Additionally, the mixed-handler is for general mixing, so
wrapping it in a name for just one combination is confusing.

Bug: 244486556
Test: Tests pass (meaning it still works)
Change-Id: I7a02f803fa421bbec02344d479d1d90ea741e155
2022-09-09 16:26:06 +00:00
Winson Chung
315959c6b8 Merge "Fix issue with drags sometimes not being handled in tests" into tm-qpr-dev 2022-09-09 16:15:53 +00:00
Ivan Makarov
bd8d6fc437 Merge "Move SplitscreenEventLogger to StageCoordinator" into tm-qpr-dev 2022-09-09 11:36:05 +00:00
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
TreeHugger Robot
7168e6c950 Merge changes I65d67bf9,Ibeee6718 into tm-qpr-dev
* changes:
  Remove NSSL#isChildInInvisibleGroup
  Remove unused BubblesManager#maybeCancelSummary()
2022-09-08 21:53:42 +00:00
Hongwei Wang
8df0cf455b Merge "Allow other app enter PiP when exiting current one" into tm-qpr-dev 2022-09-08 20:59:15 +00:00
Ats Jenk
c3e38f4ae4 Add unit test for GroupedRecentTaskInfo
Add unit tests for creating GroupedRecentTaskInfo objects and the
parcelling logic.

Bug: 244348395
Test: atest GroupedRecentTaskInfoTest
Change-Id: I10c97e91f164a45c3ed17935a820c5ed168e8305
2022-09-08 20:48:52 +00:00
Winson Chung
92c998a9fa Fix issue with drags sometimes not being handled in tests
- ACTION_DRAG_ENTERED does not actually have location data, and
  ACTION_DRAG_LOCATION may not always be sent, which results in no
  target being computed prior to the DROP.  Since the DROP event
  also has location data, we should update in that case as well.

Bug: 234653212
Test: atest TaplTestsTaskbar
Change-Id: I1f7657a95a4f124d98fc0da78b8a3ac2237f91f6
2022-09-08 20:20:47 +00:00
Ivan Makarov
f73ff9ec58 Merge "Add TV splitscreen menu" into tm-qpr-dev 2022-09-08 18:30:30 +00:00