Commit Graph

742 Commits

Author SHA1 Message Date
Treehugger Robot
9e5539c793 Merge "Create owner test files for subpackages" am: 9e8cfbac2c am: 05bc30f21c am: a39bb54fdd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952387

Change-Id: I94c28df75a0af1ea24dcc388fee84c093268ffd0
2022-01-21 15:56:50 +00:00
Treehugger Robot
a39bb54fdd Merge "Create owner test files for subpackages" am: 9e8cfbac2c am: 05bc30f21c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952387

Change-Id: I5a4f26de3f474fe5794d94ca1f581b317ac1bb37
2022-01-21 15:46:05 +00:00
Nataniel Borges
4e4babec1a Create owner test files for subpackages
Now failures can be automatically directed to the correct buganizer components and forwarded directly to the correct assignees, instead of being all created into the Winscope for further triage

Test: check owners file
Change-Id: I6876a702b4f46443328aab027f7fee994b2bb819
2022-01-20 10:21:40 +00:00
Mariia Sandrikova
a274e1a7d4 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..." am: 7617679a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16571392

Change-Id: I0adf2bf45c5f7d7349e9c0f180aea9d10f70645d
2022-01-13 22:55:51 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Aurimas Liutikas
aec26c4f68 DO NOT MERGE Revert "[3/n] Camera Compat UI: Add a camera compat control."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I318b89b87cd3b05a3f3dcd428e3d80fe81465011
2022-01-13 15:16:51 +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
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
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
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
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
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
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
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
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
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
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
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
Wei Sheng Shih
86caa03b70 Merge "Clear all starting window while unregister organizer." into sc-v2-dev am: 596c027966
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16332299

Change-Id: I00138b6148ffd08e948dd55818d701934cb821d9
2021-11-30 06:35:56 +00:00
Wei Sheng Shih
596c027966 Merge "Clear all starting window while unregister organizer." into sc-v2-dev 2021-11-30 06:15:08 +00:00
wilsonshih
205cd6486c Clear all starting window while unregister organizer.
The starting window view might left in client's ShellTaskOrganizer,
clear all of the starting windows view while unregister task organizer
to preventing those views from left.
Consolidating the remove window methods together.

Bug: 207175662
Test: build/flash
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Change-Id: I93e4862b7f866c7c73d9b3999a74e03784848058
Merged-In: I93e4862b7f866c7c73d9b3999a74e03784848058
2021-11-30 03:43:55 +00:00
Mady Mellor
1c0aefd45b Drag and drop to split transition
* DropZoneView represents a drop zone and handles
  animating the margins around it along with the
  splashscreen or highlight when the user drags into
  or out of the zone.
* DragLayout hosts two of these views and populates
  them with the relevant app info for the splashscreen
* While dragging the status bar is hidden

Test: manual/visual on large screen device:
 - have an app open and drag and drop an app to split
 - try this in portrait and landscape
 - try dragging between the two drop zones
 - try releasing not in a drop zone
 - have two apps already in split and try dragging a
   different app to split
 - have an app open and get a notif, drag it to split
 - verify that the status bar hides while dragging and shows
   again (and is interactable) after dragging is done
 - trigger the drag and drop UI, then switch theme and
   trigger again, it should match the new theme
=> verify that the animation looks correct / matches mocks
Test: atest WMShellUnitTests

Bug: 202017826
Change-Id: I806e8ff8ba30d01b9b47d12aa0987cec7aeb7d0c
2021-11-29 14:55:01 -08:00
Jerry Chang
6977b7fec6 Merge "Support to start tasks into split screen with specific split ratio" into sc-v2-dev am: 488d986cae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16331279

Change-Id: I313027cfd1d1c0ab9bc76d080cd2d5275174a877
2021-11-26 05:56:03 +00:00
Jerry Chang
9e6c73784c Support to start tasks into split screen with specific split ratio
Split tasks can be shawn with different split ratio in overview panel.
Supports to specify split ratio when launching split tasks from
overview.

Fix: 207479945
Test: atest WMShellUnitTests
Test: Quickswitch back to app pair keep split ratio
Change-Id: Ifa6d57c0ec9b75fbcaeb80a11a95f65af8c09a0b
2021-11-25 11:36:02 +08:00
Winson Chung
9f667fb094 Merge "Invalidate recent tasks when the splits (or split info) changes" into sc-v2-dev am: cc4a85c0a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16289022

Change-Id: If5ee007c9c1be5705e10ee184092e4c45afe910b
2021-11-19 21:40:52 +00:00
Winson Chung
cc4a85c0a9 Merge "Invalidate recent tasks when the splits (or split info) changes" into sc-v2-dev 2021-11-19 21:25:33 +00:00
Jerry Chang
18827d2545 Merge "Support moving task to an activated split stage in a specific position" into sc-v2-dev am: dcab13878e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16279912

Change-Id: Ic3874630bbae2d7356c5134e3418286aa0f251e8
2021-11-19 08:41:38 +00:00
Jerry Chang
dcab13878e Merge "Support moving task to an activated split stage in a specific position" into sc-v2-dev 2021-11-19 08:29:49 +00:00
Winson Chung
c55e1f491c Invalidate recent tasks when the splits (or split info) changes
- Now that split bounds info is tied to the recent tasks provided to
  Launcher, we need to notify of the changes when the info changes

Bug: 206868465
Test: atest WMShellUnitTests
Test: Split app pair, go to overview, go back to app, change divider
      position, then go back to overview -> ensure pair is drawn
      correctly
Change-Id: Id7926a20ab3be3a9cb5eb832fb321c80bd60bae0
2021-11-19 05:44:08 +00:00
Tom Natan
dd18ce17c4 Merge "Remove all size compat UIs when the keyguard becomes occluded" into sc-v2-dev am: 1bbc9f6355
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16212776

Change-Id: Ib3c178b3484c9df0b6aeac1e2b497209bb3c7839
2021-11-18 19:32:23 +00:00
Xin Li
10d9972786 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I13199bc39e9445929195f3d15579cbffe94e92b0
Change-Id: I35fa3c6c2abf679c51033f1395a08d511ed8739f
2021-11-18 17:00:37 +00:00
Tom Natan
1bbc9f6355 Merge "Remove all size compat UIs when the keyguard becomes occluded" into sc-v2-dev 2021-11-18 01:07:08 +00:00
Hongwei Wang
3657ee4c75 Merge "Revert "PiP: Recalculate size if too big/small on display change."" into sc-v2-dev am: 7b5857e2e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16275885

Change-Id: I7168c520763b2aabb9f726e829269cfca89d2f3a
2021-11-17 17:48:43 +00:00
Hongwei Wang
7b5857e2e3 Merge "Revert "PiP: Recalculate size if too big/small on display change."" into sc-v2-dev 2021-11-17 17:43:57 +00:00
tomnatan
6ed662a9db Remove all size compat UIs when the keyguard becomes occluded
This is needed because when a non resizable activity is launched over the lockscreen and a size compat restart button is displayed (after fold/unfold), clicking on it results in undefined behavior that seems broken. The solution to hide the restart button in such cases was a UX decision.

Fix: 202712269
Test: atest WMShellUnitTests:SizeCompatUILayoutTest
Test: atest SystemUITests:WMShellTest
Change-Id: Iced3948e0d7a37feb2f3422a7f25a22aab20a888
2021-11-17 15:00:37 +00:00
Jerry Chang
f49e300cac Support moving task to an activated split stage in a specific position
Split screen might has been activated when other components like
Launcher or PIP task organizer invoking enterSplitScreen API. This makes
sure the indicated task will be moved to the correct split side after
split screen activated.

Fix: 206745122
Test: atest WMShellUnitTests
Test: manual check expanding PIP task to split behavior
Change-Id: I6210846c6f4443727e93fcf313539a34c0f3298a
2021-11-17 22:16:14 +08:00
Ben Lin
06f8587f41 Revert "PiP: Recalculate size if too big/small on display change."
This reverts commit 4ef153a797.

Reason for revert: This fixes a foldable bug and so not really needed anymore for sc-v2. We'll leave it master only.

Bug: b/205761901
Bug: b/206644532
Change-Id: Ia50d491d89a4c9faaa49c3e2b9afe38f73bd7f57
2021-11-16 23:25:24 +00:00
Alex Chau
c7b00cdf53 Merge "Add letterboxInsets to TaskSnapshot" into sc-v2-dev am: 442ba5476d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16149035

Change-Id: Ib5f65e03fa70f0632a157c5b5f0bf4cc02e1ffcf
2021-11-16 18:57:56 +00:00
Alex Chau
442ba5476d Merge "Add letterboxInsets to TaskSnapshot" into sc-v2-dev 2021-11-16 18:40:31 +00:00
Winson Chung
6cc3a2989e Merge "Skip adding shell drop target window for virtual displays" into sc-v2-dev am: 91a8c3068b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16267066

Change-Id: I8768ca359202589a54af1bc0ac74f2291cbbe0f1
2021-11-16 17:55:55 +00:00