Commit Graph

5321 Commits

Author SHA1 Message Date
Chilun Huang
e9f622dc90 Merge "Reuse tasks in background in priority for split screen" into tm-qpr-dev 2022-09-26 04:35:45 +00:00
Chris Li
c1735a1f7b Merge "Allow ActivityEmbedding to finish Activity through WCT" into tm-qpr-dev 2022-09-24 02:44:06 +00:00
Mady Mellor
c423e60ae5 Merge "Allow floating tasks to be shown as bubbles (behind a sysui flag)" into tm-qpr-dev 2022-09-23 15:13:03 +00:00
Chris Li
840218d5df Allow ActivityEmbedding to finish Activity through WCT
Before, we call Activity#finish() to finish activities when removing
TaskFragment. This may start a CLOSE transition before the organizer has
a chance to request the actual transition type.

Now, we allow the organizer to finish activities through WCT so that the
operation is atomic and the organizer can request the correct transition
type.

Bug: 240519866
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Test: atest CtsWindowManagerDeviceTestCases:TaskFragmentOrganizerTest
Change-Id: I54671fb2dd34dca952468305429a90d89953de69
2022-09-23 21:23:03 +08:00
Chris Li
fcfa500483 Merge "Polish ActivityEmbedding Shell animation when open a split pair" into tm-qpr-dev 2022-09-23 05:31:41 +00:00
Hongwei Wang
12415a30ea Propagate PiP param change on RemoteAction update
We used to only check title/contentDescription/actionIntent of
RemoteAction for uniqueness and ignore the isEnable/shouldShowIcon.

Bug: 234679022
Test: Verify the isEnabled change updates PiP menu
Change-Id: I769507253594b016802b71368ac4a9036f2ad21f
2022-09-22 15:49:16 -07:00
Mady Mellor
3b9ef3fee1 Allow floating tasks to be shown as bubbles (behind a sysui flag)
Special "app bubble" that is ordered at the front of the list unless
something else was selected. This is guarded behind the flag to
enable floating tasks, and a new flag to allow floating tasks to be
bubbles.

Test: manual  - enable the flags and create a floating task
             => floating task appears in a bubble
Bug: 237678727
Change-Id: Ibf66e8bae07800b5f64598c9b50de7a7995d09e6
2022-09-22 12:11:28 -07:00
Bill Yi
d4b3adfee9 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-22 17:43:17 +00:00
Mady Mellor
2b9353ffbc Merge "Support for a floating task window (behind a sysui flag)" into tm-qpr-dev 2022-09-22 14:58:12 +00:00
Bill Yi
e9ffcf62f9 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-22 14:30:33 +00:00
Chilun Huang
8e89deb761 Reuse tasks in background in priority for split screen
When dragging the same app to the other side, we will try to reuse the
task in background instead of directly launching a new instance.

Bug: 241181313
Test: atest WMShellUnitTests
Change-Id: Ifd1329ae0b634d8b27a6960e4500458a09cf69f4
2022-09-22 16:38:19 +08:00
Chris Li
646b0c13e6 Merge "Skip ActivityEmbedding animation if it is behind an app starting window" into tm-qpr-dev 2022-09-22 08:14:08 +00:00
Tony Huang
7914d7de84 Merge "Skip enter split expanding animation by drag" into tm-qpr-dev 2022-09-22 05:43:54 +00:00
Chris Li
6a3dfb250a Skip ActivityEmbedding animation if it is behind an app starting window
Bug: 207070762
Test: atest WMShellUnitTests:ActivityEmbeddingAnimationRunnerTests
Test: atest WmTests:TransitionTests
Change-Id: I602201646040f3358a688dcb6ec779f8244953ac
2022-09-22 11:25:38 +08:00
Jerry Chang
f3e52f55a6 Merge "Fix not able to start a shortcut into split" into tm-qpr-dev 2022-09-22 01:34:59 +00:00
Chris Li
7c90ab5b09 Merge "Undo the Extensions API version change" into tm-qpr-dev 2022-09-22 00:43:42 +00:00
Bill Yi
97319739a0 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ibacf2a1ad142fc07f6a7582c0c38df63155b54e8
2022-09-21 16:02:31 -07:00
Bill Yi
02767a7a9b Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I157d95437dbfd3396287edf78cbc99f30d998d0c
2022-09-21 16:01:18 -07:00
TreeHugger Robot
c5637910b8 Merge changes I0e3aadba,I037a2b2f into tm-qpr-dev
* changes:
  Apply SplitAttributesCalculator to SplitController
  Extend bounds computation to support horizontal layout
2022-09-21 15:02:50 +00:00
Bill Yi
11862c7b71 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-21 14:28:55 +00:00
Bill Yi
e195a360f5 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2022-09-21 14:28:55 +00:00
Jerry Chang
601373db16 Fix not able to start a shortcut into split
Add back flags to allow start background activities since besides
drag-and-drop, start a shortcut into split also need these permission.

Fix: 243101552
Test: atest StageCoordinatorTests
Test: long press on a shortcut to enter split
Change-Id: I9159734836183c811642dffe1a9faebb2ccc23a5
2022-09-21 12:54:06 +00:00
Charles Chen
db133abbbd Merge "Listen to folding state change for SplitController" into tm-qpr-dev 2022-09-21 11:45:23 +00:00
Charles Chen
ef9c90071d Merge "Track visibility in onTaskFragmentParentInfoChanged" into tm-qpr-dev 2022-09-21 11:44:46 +00:00
Charles Chen
2e95b5f6fe Merge "Add TaskFragmentParentInfo" into tm-qpr-dev 2022-09-21 11:43:45 +00:00
Charles Chen
4f6fc19215 Apply SplitAttributesCalculator to SplitController
This CL implements SplitController#set(clear)SplitAttributesCalculator,
and also invokes #computeSplitAttributesForParams
in #computeSplitAttributes to compute the split attributes based
on the current device state.

fixes: 241043111
fixes: 241043028
Bug: 207494880
Test: atest WMJetpackUnitTests
Change-Id: I0e3aadba451f2e585b048bfe2417239ed2f3ba3c
2022-09-21 08:34:28 +00:00
Charles Chen
eaeeaa5608 Extend bounds computation to support horizontal layout
This CL introduces SplitLayout and update bounds computation methods
to support horizontal layout. It also introduces #computeSplitLayout
to compute the current split layout, which always returns the default
splitLayout currently. #computeSplitLayout will extend to consider
SplitLayoutCalculator in later CL.

fixes: 241042437
Bug: 241043028
Bug: 207494880
Test: atest SplitPresenterTest
Change-Id: I037a2b2fa38d05c4fe97e4734cc044148ad15806
2022-09-21 08:34:15 +00:00
Charles Chen
fe23ec48f5 Listen to folding state change for SplitController
This CL enables to update the current top SplitContainer if
there's a folding state change.

Test: manual - following CLs use this CL
Bug: 207494880
Bug: 241043111
Change-Id: Ia4d08d7f71d935101f3aeda94384295db2fa2214
2022-09-21 08:34:04 +00:00
Charles Chen
a13ffe82ff Track visibility in onTaskFragmentParentInfoChanged
As we add visibility info in TaskFragmentParentInfo, we can update
the parent Task visibility in onTaskFragmentParentInfoChanged.
It can be furthur used in update SplitContainers of visible containers.

Test: atest WMJetpackUnitTests
Bug: 243609832
Bug: 207494880

Change-Id: Iad4b8d46bad75c352fc6a1a732ef796cdbfad4f9
2022-09-21 08:31:41 +00:00
Charles Chen
3589fb907f Add TaskFragmentParentInfo
This CL adds a TaskFragmentParentInfo class and extends
onTaskFragmentParentInfoChanged to dispatch display ID and
visibility of the parent Task.
It makes SplitController able to track visibility and display
changes and used to update SplitContainers if there's a folding
state change.

Test: atest SplitControllerTest TaskFragmentOrganizerControllerTest
Bug: 243609832
Bug: 207494880

Change-Id: If3d5db621b20d4005ce0b60e46ac98e1d1e962e3
2022-09-21 08:30:51 +00:00
Chris Li
c7fae523bd Undo the Extensions API version change
Because most of the dependent features are not yet ready, revert it back
in T_QPR1.

Bug: 247950006
Test: pass existing
Change-Id: I451cb0d640f935c542a0e79df8c08945d5c4776c
2022-09-21 15:36:56 +08:00
Chris Li
228e7e502e Polish ActivityEmbedding Shell animation when open a split pair
Before, we are checking TransitionInfo.isIndependent, which is true when
the parent is TRANSIT_CHANGE. However, we already animate the change
parent here, so we should skip the child for such case.

Bug: 207070762
Test: manually verify the animation
Change-Id: I3d1342ef27c97b2c8bb7270975f1f089c4462d5b
2022-09-21 15:26:49 +08:00
Mady Mellor
38edb219c0 Support for a floating task window (behind a sysui flag)
Creates a new package within shell for floating tasks along with a
basic controller and interfaces for sysui and launcher to use to
manage floating tasks.

A single floating task is allowed at a time and they can only be
created if a sysui flag is turned on.

The floating task is backed by a TaskView, floats above all other
content, and can be moved via a handle at the top of the view. The
view sticks along the left and right edges of the screen, can be
stashed (similar to PIP), and can be removed by dragging to a dismiss
target in the middle of the screen (similar to PIP & bubbles).

The tests included trigger the sysui flag on and off to ensure the
flag behavior (i.e. that you can't create one unless the flag is on).

Test: atest FloatingTaskControllerTest
Bug: 237678727
Change-Id: I490c44685825e14166869b2cf7c2994ee0e30ba7
2022-09-21 02:12:46 +00:00
Tony Huang
d55d0b0047 Skip enter split expanding animation by drag
By our motion specs, drag drop to enter split case
should show split contents after drop rather than
run animation to enter split.
We already have a function for drag drop tell split
screen for logging events. Use this function to set
a flag to skip next time entering animation and reset
it after entering.

Fix: 247108671
Test: manual
Test: pass existing tests
Change-Id: Ie1a511bc4846021a79db726ef7a42590b33b8afb
2022-09-21 01:40:50 +00:00
Vinit Nayak
fa3a8fafda Merge "Pass in enter reasons into SplitscreenEventLogger" into tm-qpr-dev 2022-09-20 21:55:30 +00:00
HQ Liu
51afb38bda Merge "Use RootTaskDisplayAreaOrganizer to change windowing mode" into tm-qpr-dev 2022-09-20 19:43:33 +00:00
Vinit Nayak
1ab928f8ad Pass in enter reasons into SplitscreenEventLogger
* Multi-instance reason is kind of a default reason
if the enterSessionId hasn't been set.
* Explicitly set Launcher enter reasons so we don't
rely on Launcher being a default enter reason

Bug: 231369744
Test: Enter split screen from launcher, chrome new
window multi instance, and notification drag.
Logged enter reason when logging to verify.

Change-Id: I7af3b2c2b8c067ca4e6eadff037582d340cad0f5
2022-09-20 10:28:44 -07:00
Evan Rosky
556ecc8da9 Merge "Adjust caption observer for desktop transition" into tm-qpr-dev 2022-09-20 16:39:57 +00:00
Mateusz Cicheński
56cf35b281 Merge "Move PiP swiftly in response to IME with keep clear areas flag enabled." into tm-qpr-dev 2022-09-20 13:48:33 +00:00
Tony Huang
1c2c0b5258 Merge "Reduce flicker when split pair switching" into tm-qpr-dev 2022-09-20 03:12:05 +00:00
TreeHugger Robot
d7e17f97c7 Merge "Allow background activity launch by drag notification" into tm-qpr-dev 2022-09-20 00:09:19 +00:00
Mateusz Cicheński
62f6fe2294 Move PiP swiftly in response to IME with keep clear areas flag enabled.
If the keep clear algorithm is enabled, PiP window will avoid the
keep clear areas and move away from occluding keyboard.

When IME is shown, we trigger the movement right away, for a smoother
experience.
If there is another animation ongoing, we delay moving PiP again, so
that it's more smooth overall.
Finally, we always apply gravity bottom with keep clear areas flag on,
so that it goes back down after IME dismiss.

Test: manually, http://recall/-/blXo3gy66k4fDYh7gFkrpe
Bug: 183746978

Change-Id: I32c52e4b6dd3c083b2168fda6a8b3b13facdac69
2022-09-19 21:03:44 +00:00
Evan Rosky
3b2eff1cc4 Adjust caption observer for desktop transition
Instead of specific transition types, just try to get captions
and if it doesn't exist, make one. As we add more "source"
windowing modes, we'll have to just check more listeners. This
should hold-over until there's a centralized task-state manager.

Also, try to create captions on "warm-starts" (TO_FRONT) so that
apps that are in history before desktop-mode will get a caption.

Bug: 246851689
Bug: 246637353
Test: enable shell-transitions and switch into/out-of desktop
      mode with varying sets of warm/cold-start apps
Change-Id: If9e1ad35692b63bf8abd6185b037715b285645c9
2022-09-19 13:21:34 -07:00
Bill Yi
ec046d5524 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib67152acf0a47423a70bd77e679ab213ccbaab4c
2022-09-19 11:50:16 -07:00
Bill Yi
8987b22027 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I78f3c92c22c56d0994ed23618ede089a92091e1a
2022-09-19 11:45:31 -07:00
Jeff Chang
09c0d6ef9e Allow background activity launch by drag notification
Drag notification to launch activity is aborted since the app is not
visible.

This CL adds the background activity allowed flag to make activity
launches successful.

Bug: 237985674
Test: Drag the notification to home. Check the activity is launched.
Change-Id: I6513e7d5d7b17c4a41c32316fd7504fe1bf2e793
2022-09-18 23:06:12 +08:00
Ats Jenk
0a0969af1c Merge "Move active task tracking to a repository" into tm-qpr-dev 2022-09-17 00:16:33 +00:00
HQ Liu
e4ef661839 Use RootTaskDisplayAreaOrganizer to change windowing mode
In core, windowing mode is being set in TDA with ag/19902621. Thus, set
windowing mode with RooTaskDisplayAreaOrganizer instead of
RootDisplayAreaOrganizer.

Bug: b/241168290
Test: services/tests/wmtests
Change-Id: Ib7e6701839f83ab4125a9630d20203f8c5e415ba
2022-09-16 16:09:54 -07:00
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
Ats Jenk
8a3cf44c9a Move active task tracking to a repository
We were tracking active freeform tasks in the RecentTasksController.
This causes some issues when we want to share that information to other
controllers like DesktopModeController.
Move tracking of active tasks to a separate repository that controllers
can query and listen for updates.

Bug: 244348395
Test: atest DesktopModeTaskRepositoryTest RecentTasksControllerTest
Change-Id: I7a460020f6b2133225e292a04f29ae1dd27e964b
2022-09-16 13:51:42 -07:00