Commit Graph

874 Commits

Author SHA1 Message Date
Chris Li
52e1f36763 Merge "Set PIP corner radius when enter" 2021-12-20 12:37:08 +00:00
Tony Huang
36b5dd8b5f Handle split rotation in rotation callback
By current split design, we always update bounds and apply WCT on
DA info changed callback. However, with shell transition, we should
avoid apply WCT while transition running.

Add display rotation callback we used in legacy split to new split
and apply bounds on such callback. This can ensure that WCT sync to
running rotation transition.

Bug: 206872147
Test: manual
Test: pass existing tests
Change-Id: I358a00ab6ecfb56ececcc93204a78366c48cabda
2021-12-20 17:33:45 +08:00
Chris Li
862c4118d4 Set PIP corner radius when enter
Before, it didn't set the corner radius on the finish transition, so the
corner radius is set to 0 when finished.

Bug: 210965679
Test: atest WMShellFlickerTests:PipRotationTest
Change-Id: I7a3c478ef36a4bb730f2153d6b2487a41a469545
2021-12-20 15:13:45 +08:00
Mariia Sandrikova
d77c92a3f1 Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3 am: 02a17e7b1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: Ic9916a3883eef0148a86c86149aa2e883fc56d1b
2021-12-18 22:19:12 +00:00
Mariia Sandrikova
02a17e7b1f Merge changes from topic "camera-compat" into sc-v2-dev am: 3486eacda3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16468379

Change-Id: I1e56abcef9715a3dd6a00d70cb815c4d9260175a
2021-12-18 21:59:31 +00:00
Mariia Sandrikova
3486eacda3 Merge changes from topic "camera-compat" into sc-v2-dev
* changes:
  [3/n] Camera Compat UI: Add a camera compat control.
  [2/n] Camera Compat UI: Add interfaces for client-server communication.
2021-12-18 21:39:13 +00:00
Mariia Sandrikova
13e80fd997 [3/n] Camera Compat UI: Add a camera compat control.
Test: atest WMShellUnitTests
Bug: 206602997
Change-Id: Id9b9a89303387c4ac797fc1382967151a13d38ef
2021-12-17 00:20:19 +00:00
Mariia Sandrikova
24f4d8a952 [2/n] Camera Compat UI: Add interfaces for client-server communication.
Changes:
- Listens to changes from the client coming through IActivityClientController#requestCompatCameraControl to ActivityRecord#updateCameraCompatState
- ActivityRecord#updateCameraCompatState sends updated state via TaskInfo to WM Shell
- ITaskOrganizerController#updateCameraCompatControlState to dispatch the user interactions with the control from WM Shell triggers callback to ActivityRecord#updateCameraCompatStateFromUser
- ActivityRecord#updateCameraCompatStateFromUser remembers the user's choice and asks client to apply treatment through ICompatCameraControlCallback

Feature is guarded with config_isCameraCompatControlForStretchedIssuesEnabled

Test: atest WMShellUnitTests:ShellTaskOrganizerTests, atest WmTests:ActivityRecordTests
Bug: 206602997
Change-Id: I083aa6718bd67456bedd9444e9b78740c041f870
2021-12-17 00:18:57 +00:00
Jerry Chang
fdf92de82a Merge "Integrate RecetsTaskController with shell-transition" 2021-12-16 09:01:25 +00:00
Mady Mellor
b6d0f141fd Merge "Fix a potential NPE" into sc-v2-dev am: 4b3ea38f9b am: 6f120287c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16470586

Change-Id: I27362b4a9b9698f2e1d4ba87ce941050b3e43dd9
2021-12-15 18:21:55 +00:00
Mady Mellor
6f120287c9 Merge "Fix a potential NPE" into sc-v2-dev am: 4b3ea38f9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16470586

Change-Id: Iac4afaa1caaf0969346e2c2ada0445a7dbc74be7
2021-12-15 18:21:15 +00:00
Mady Mellor
4b3ea38f9b Merge "Fix a potential NPE" into sc-v2-dev 2021-12-15 18:09:31 +00:00
Jerry Chang
7eccf61dcd Integrate RecetsTaskController with shell-transition
Hook up RecentsTaskController with split screen when enabled
shell-transition. Bundle exit reason and dismiss transition together in
order to log and determine whether the dismiss should break recorded
app-pair in recents or not.

When dismissing split screen with shell-transition, it'll reparent child
tasks out of split screen before they committed invisible, so rely on
fullscreen task opening signal to update app-pair information instead
of relying on visible task appeared or changed in
FullscreenTaskListener.

Bug: 206487881
Test: atest SplitTransitionTests
Test: dump and observe recorded split pair in RecentsTaskController
Change-Id: I109d7b3b2eab2b4f691e85a2afd052f56b1a9bca
2021-12-15 03:39:23 +00:00
Jerry Chang
1b560d8747 Integrate launch-to-side split transition to shell transition
Integrate launch-to-side split transition to shell transition.
Because there is no guarantee for launching activity to split
successfully before actually launching it, trigger enter split
transition after observed new task launching into split.

Bug: 206487881
Test: atest SplitTransitionTests
Test: drag to enter split with shell transition works
Change-Id: Idda7c3b02689753cea1a1fe80264145f1a449f73
2021-12-15 00:52:43 +00:00
Mady Mellor
447e4f16e2 Fix a potential NPE
I've never been able to reproduce this and the stack traces I have
of it don't match existing code, but looking at the code paths I think
this could still happen, there are a couple of places where the
mMagnetizedBubbleDraggingOut gets nulled out (e.g. on child removed)
I've tried to repro by:
 - canceling the bubbles in the middle of dragging to dismiss
 - trying to snap the bubble back and then drag it again to dismiss
   (snap back also nulls it)

I see a recent stack of it in pitot so I think it's worth adding the
null check.

Test: atest ExpandedAnimationControllerTest
Bug: 201866808
Change-Id: Ib9425a2b63410c95fddaaea59761dfd18557ed54
2021-12-14 15:21:41 -08:00
Ben Lin
f591b7ae3c Merge "Update PiP exclusion bounds in TaskBarDelegate." into sc-v2-dev am: c34133ad93 am: 0ec1299cf7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16434534

Change-Id: Id218d01be8e6f2faba1653f0e5c537f666831d36
2021-12-14 21:15:10 +00:00
Ben Lin
0ec1299cf7 Merge "Update PiP exclusion bounds in TaskBarDelegate." into sc-v2-dev am: c34133ad93
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16434534

Change-Id: Ibc6f0eb3c87274aa7bd72e6ba0c104792b3b0447
2021-12-14 21:13:06 +00:00
Ben Lin
c34133ad93 Merge "Update PiP exclusion bounds in TaskBarDelegate." into sc-v2-dev 2021-12-14 20:49:06 +00:00
TreeHugger Robot
772f18a1b6 Merge "Disable failing shell transition tests" 2021-12-14 18:58:19 +00:00
Ben Lin
82865fe924 Update PiP exclusion bounds in TaskBarDelegate.
Navigation bar is only created and used when taskbar is not available.
When taskbar is available, we will use TaskbarDelegate to be the one
responsible to update pip exclusion bounds as PiP moves.

Bug: 210038947
Test: Unfold, enter PiP, stash - PiP can be yanked out
Change-Id: I8f789d3b603e41c3d15494afdadce2cddc4d4b9c
2021-12-14 10:35:50 -08:00
Sergey Serokurov
ddae9c92a2 Merge "Do not show overflow after the last bubble dismissed (revised)" 2021-12-14 17:00:20 +00:00
Nataniel Borges
306ef506b3 Disable failing shell transition tests
Some tests are failing when using shell transition.

Disable the tests that currently fail so that we can move some shell assertions into presubmit

Test: atest FlickerTests WMShellFlickerTests
Change-Id: If86fb6b053a384050aa533d2ebb45031c1acdf70
2021-12-14 14:04:44 +01:00
Jerry Chang
fa82eafc1e Merge "Indicate whether to apply layout change when setting divide position" 2021-12-14 04:18:55 +00:00
Mady Mellor
3f40ec342b Merge "Mark bubbles as updated when they're added to the stack" into sc-v2-dev am: 6b1abd9b68 am: 8834b96d87
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16374106

Change-Id: I217f3b55666f3b1f21ad12fa5081d44bea60162b
2021-12-14 02:05:44 +00:00
Mady Mellor
8834b96d87 Merge "Mark bubbles as updated when they're added to the stack" into sc-v2-dev am: 6b1abd9b68
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16374106

Change-Id: Ib5c93cd4710eeace2f0c54157f9052f5e182455c
2021-12-14 01:47:30 +00:00
Mady Mellor
6b1abd9b68 Merge "Mark bubbles as updated when they're added to the stack" into sc-v2-dev 2021-12-14 01:16:23 +00:00
Sergey Serokurov
97aa9b0ec1 Do not show overflow after the last bubble dismissed (revised)
Bug: 202742002
Test: atest SystemUITests
Test: screen recording before https://drive.google.com/file/d/1KOHZnsW4BAn73slH54Rp1ZK0RXxumrw5/view?usp=sharing
Test: screen recoring after https://drive.google.com/file/d/1tC6iIP2fG84pHcwoyJsySDUm9ciSzjRI/view?usp=sharing
Change-Id: Ib5e36e5abb9f4e6adb441f38f1d66dbf7f73a1f0
2021-12-13 09:07:11 -08:00
Mariia Sandrikova
ef1f033720 Merge "[1/n] Camera Compat UI: Refactor size compat mode UI controller." into sc-v2-dev am: aa7a8cdda5 am: 6863643cda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16420818

Change-Id: I63c10a663aea9471594af90d1c59c57f8bef1e1c
2021-12-12 17:15:30 +00:00
Mariia Sandrikova
6863643cda Merge "[1/n] Camera Compat UI: Refactor size compat mode UI controller." into sc-v2-dev am: aa7a8cdda5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16420818

Change-Id: Id8ebd3b2a6e7bff738bb8d2d5fd8e17cd6b1c4bd
2021-12-12 17:00:08 +00:00
Mariia Sandrikova
6dd79270b0 [1/n] Camera Compat UI: Refactor size compat mode UI controller.
First CL in the chain that will add a camera compat UI control which will be used to correct stretched issues in TextureView and SurfaceView cause by apps not handling mismatch between camera buffers and view size correctly.

This change is necessary because right now there are 2 instances of WindowlessWindowManager (SizeCompatUIWindowManager) in SizeCompatUILayout: for a hint and for a restart button. They are also positioned relatively by computing offsets in java code rather than by specifying layout with XML. This code structure will cause issues since with upcoming camera changes there will be a need to coordinate relative position of 4 UI elements (2 buttons and 2 hints).

What is changing in this CL:
- Majority of changes are simple renaming from "size compat UI" to "compat UI" since, starting from the next change, two different compat controls will be supported.
- Merging 2 instances of SizeCompatUIWindowManager into one (CompatUIWindowManager) and for that create a joint layout in compat_ui_layout.xml
- Merge SizeCompatLayout logic into CompatUIWindowManager since in absence of 2 instances of WindowlessWindowManager there is no good reason to keep them separate.
- Merging and renaming tests to follow refactoring of the implementation.

Test: atest WMShellUnitTests (the same set of tests should be sufficient since this refactoring just reorganized the structure of the implementation)
Bug: 206602997
Change-Id: I7141c69b7ba4742c5b7b2018329b91a1b37b45bc
2021-12-11 13:00:23 +00:00
Jerry Chang
d3872acc57 Indicate whether to apply layout change when setting divide position
To prevent it conflicting with shell transition when entering split, we
don't want to apply layout change when setting up divide position. Add a
boolean parameter to indicate whether to apply layout change or not for
setDividePosition.

Bug: 206487881
Bug: 208954095
Test: Trigger split screen, snap divider to non-middle position and
      observed no crash after dismissed and re-entered split screen.
Change-Id: I91ba735ade538e1bb3d5a5eba0c782c4456e1746
2021-12-10 04:03:27 +00:00
Evan Rosky
927f9f5c11 Hook-up TaskView/bubbles to shell transition
Bug: 209073176
Test: atest TaskViewTest
      Open a bubble with shell transitions enabled
Change-Id: I4a8143f0d84b0618ddf247150307efc587776a56
2021-12-09 17:14:02 -08:00
Mady Mellor
fecc199440 Mark bubbles as updated when they're added to the stack
If you add a bubble via the button on the notification but
if the notif for it is older than the notifs for the bubbles
in the stack, then that added bubble is removed immediately.

This isn't expected and can result in the view state being
out of sync with bubble data, i.e. BubbleStackView contains
the view but BubbleData doesn't have the bubble so it can
get added again (but the view is already in BSV causing the
crash).

This fixes the issue by marking newly added bubbles as
"updated" which will ensure the newly added bubble won't
be immediately removed.

Had to adjust the tests to be setting a current time since
that's what's used to mark the update time.

Test: atest BubbleDataTest
Bug: 207083906
Change-Id: I425de9c1ca514066340f9123b6004820e98674fd
2021-12-09 13:36:32 -08:00
Michał Brzeziński
8ec095245a Revert "Do not show overflow after the last bubble dismissed (in master)."
This reverts commit bf4301f59b.

Reason for revert: Breaking test b/209904625

Change-Id: Iabd5c188844d6f640fefe8f4f6b0eec8f31c4aff
2021-12-09 11:51:14 +00:00
Sergey Serokurov
bf4301f59b Do not show overflow after the last bubble dismissed (in master).
Bug: 202742002
Test: screen recording before https://drive.google.com/file/d/1KOHZnsW4BAn73slH54Rp1ZK0RXxumrw5/view?usp=sharing
Test: screen recoring after https://drive.google.com/file/d/1tC6iIP2fG84pHcwoyJsySDUm9ciSzjRI/view?usp=sharing

Change-Id: I2342c1c61cf38205b03e10b5ece0392f4bc70c76
2021-12-08 18:31:16 +00:00
TreeHugger Robot
cf37df74d7 Merge "Promote/demote flicker tests" 2021-12-07 20:03:40 +00:00
Nataniel Borges
12e300d402 Promote/demote flicker tests
Promote stable postsubmit to presubmit
Demote unstable postsubmit to flaky
Demote fass assertions to flaky

Test: atest FlickerTests WMShellFlickerTests
Change-Id: Ib652d9951794b7bf27ffcfd16f4f342bfbf2b2e2
2021-12-07 15:41:09 +01:00
Nicolo' Mazzucato
a948d9fc75 Do not animate some split screen sides on fold animation
Sides adjacent to the divider or the taskbar are not animated anymore

Bug: 202396814
Test: atest com.android.wm.shell.splitscreen.StageCoordinatorTests
Test: Manual testing
Change-Id: I13c5dc6872f457cd303f6f6868be81d349de7f50
2021-12-07 14:57:49 +01:00
TreeHugger Robot
68ab1bd457 Merge "Allow split position constants to be used in launcher." into sc-v2-dev am: 99461804ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16373281

Change-Id: I9e68c75cf661851de7d84955668f469b70a933f9
2021-12-02 20:50:25 +00:00
TreeHugger Robot
a0d654c5a7 Merge "Promote/demote flicker tests" 2021-12-01 20:37:05 +00:00
Schneider Victor-tulias
226f579f78 Allow split position constants to be used in launcher.
- Added SplitScreenConstants class and added this class to the exported files to allow exporting window manager constants and methods to the launcher.

Bug: 198438631
Test: manual
Change-Id: I7c5649449389413d1435798c3e757103c4ced038
Merged-In: I7c5649449389413d1435798c3e757103c4ced038
(cherry picked from commit a191eb7e3c)
2021-12-01 19:56:10 +00:00
Nataniel Borges
184d33e1ab Promote/demote flicker tests
Promote stable postsubmit to presubmit
Demote unstable postsubmit to flaky
Demote fass assertions to flaky

Test: atest FlickerTests WMShellFlickerTests
Change-Id: I48c4e26b05873a3305cd814b5cb4bedcae9def81
2021-12-01 18:49:05 +01:00
Schneider Victor-tulias
a191eb7e3c Allow split position constants to be used in launcher.
- Added SplitScreenConstants class and added this class to the exported files to allow exporting window manager constants and methods to the launcher.

Bug: 198438631
Test: manual
Change-Id: I7c5649449389413d1435798c3e757103c4ced038
2021-11-30 23:07:27 -08:00
Jerry Chang
30afad009e Merge "Remove stage type from split screen APIs" into sc-v2-dev am: 4ce27c5400 am: 068afd51b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16358306

Change-Id: Ia37698a75e4a679717b056e6ba423641cf11b9fc
2021-12-01 00:54:41 +00:00
Jerry Chang
068afd51b3 Merge "Remove stage type from split screen APIs" into sc-v2-dev am: 4ce27c5400
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16358306

Change-Id: Ide16292fc7f49ecab93c5847a1764928ea3fee9f
2021-12-01 00:48:34 +00:00
Jerry Chang
4ce27c5400 Merge "Remove stage type from split screen APIs" into sc-v2-dev 2021-12-01 00:41:10 +00:00
Mady Mellor
cb646e9d65 Merge "Drag and drop to split transition" into sc-v2-dev am: 8653f2eeb5 am: f42d0346ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16224193

Change-Id: I239808b6ec35c45207dcf057bf5558412a3a7555
2021-11-30 18:30:44 +00:00
Mady Mellor
f42d0346ff Merge "Drag and drop to split transition" into sc-v2-dev am: 8653f2eeb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16224193

Change-Id: Ie294b6d276c9d9862869c54c520f9b898df0919c
2021-11-30 18:17:14 +00:00
Mady Mellor
8653f2eeb5 Merge "Drag and drop to split transition" into sc-v2-dev 2021-11-30 17:50:30 +00:00
Jerry Chang
04f1d4df9d Remove stage type from split screen APIs
Due to stage type will soon be deprecated, updates to remove stage type
param from split screen APIs and leave resolving stage job to split
screen controller.

Bug: 198438631
Test: atest WMShellUnitTests
Test: manul check drop to split and shell command to split behavior
Change-Id: Ic543d74ebbee4afba06187e382808fa75ad8a416
2021-11-30 17:19:00 +08:00