Commit Graph

4197 Commits

Author SHA1 Message Date
TreeHugger Robot
3b37a141de Merge "Remove check for preventing re-parenting non-split apps" into tm-dev am: b9fc2e8d7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17779267

Change-Id: I77f4540e138d3a38f6301f97c50f4a76d09a4511
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 20:09:17 +00:00
TreeHugger Robot
b9fc2e8d7e Merge "Remove check for preventing re-parenting non-split apps" into tm-dev 2022-04-22 20:03:37 +00:00
Bill Yi
e8fe645ac9 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-dev 2022-04-22 00:17:18 +00:00
Vinit Nayak
5444cdda33 Remove check for preventing re-parenting non-split apps
* Removed the check and the original use-case it was
there for still works.

Bug: 223396876
Change-Id: I01590e53c612e00780d58c3dc7bcd32168fb885f
2022-04-21 11:51:41 -07:00
Ben Lin
2435054474 Merge "PiP: Re-attach PiP menu when display changes." into tm-dev am: ec56afe31b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17871121

Change-Id: I9601f9f94dcd694069b6b5b9d16e9fdf11890a56
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 18:31:35 +00:00
Ben Lin
ec56afe31b Merge "PiP: Re-attach PiP menu when display changes." into tm-dev 2022-04-21 18:05:03 +00:00
Nataniel Borges
524c0913f9 Merge "Disable failing PIP expand assertion" into tm-dev am: 03465b1e10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17884332

Change-Id: I1990aa27a8af6810d98539808537673960b5811f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:26:38 +00:00
Nataniel Borges
03465b1e10 Merge "Disable failing PIP expand assertion" into tm-dev 2022-04-21 13:54:05 +00:00
Tony Huang
9b03025e83 Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev am: 64202a268d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17518067

Change-Id: I9b4cab836233a30cfa4b5a3a59a3d92064959568
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 11:53:33 +00:00
Tony Huang
64202a268d Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev 2022-04-21 11:31:22 +00:00
Nataniel Borges
fd9e7d529f Disable failing PIP expand assertion
The PIP layer shrinks for 1 frame while expanding (flaky)

Bug: 197726610
Test: atest WMShellFlickerTests
Change-Id: Ibc27fe345722223f6dd29277f5d70abff8ab5a89
2022-04-21 11:41:57 +02:00
Ben Lin
7c64525d1c PiP: Re-attach PiP menu when display changes.
When changing the display (e.g. foldables that fold/unfolds) while the
menu is showing, it seems the SF layers go through some changes that get
the menu in a bad state and no longer renders correctly. Just teardown
and recreate/re-attach the menu instead.

Bug: 218987352
Test: Unfold/fold device while menu is showing, menu still shows up
afterwards

Change-Id: I4255191c3298cf663b6a0428ece6f34fd96ff3a6
2022-04-20 14:14:36 -07:00
Hongwei Wang
180cc87897 Merge "Revert "Remove getSfInstance usage from ViewRootImpl"" into tm-dev am: cf168898be
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17806474

Change-Id: I7500cd879736e555c0b5c24f268760b5b012bfff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 19:36:47 +00:00
Hongwei Wang
057881d271 Merge "Revert "Deprecate getSfInstance usage in PiP component"" into tm-dev am: 654c80a2df
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17805905

Change-Id: Ief03f74867bf725a92b93ff3a67281c545e83f5f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 19:36:44 +00:00
Hongwei Wang
cf168898be Merge "Revert "Remove getSfInstance usage from ViewRootImpl"" into tm-dev 2022-04-20 19:31:59 +00:00
Hongwei Wang
654c80a2df Merge "Revert "Deprecate getSfInstance usage in PiP component"" into tm-dev 2022-04-20 19:31:59 +00:00
Hongwei Wang
cd2b77c796 Merge "Implement PiP custom close action on phone" into tm-dev am: 500043a457
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17716552

Change-Id: Ic1842e1427fbd4c5baba2f5b31d0ff6a3029bab1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 17:44:07 +00:00
Shawn Lin
feac07a0e9 Merge "Support scaled cutout & roundedcorners when resolution is overridden" into tm-dev am: 88ed5ca17a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17232290

Change-Id: Iac2cc1fa5bb1b41a9fc2ad630925a7cc69b7c795
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 17:42:19 +00:00
Hongwei Wang
500043a457 Merge "Implement PiP custom close action on phone" into tm-dev 2022-04-20 17:37:44 +00:00
Shawn Lin
88ed5ca17a Merge "Support scaled cutout & roundedcorners when resolution is overridden" into tm-dev 2022-04-20 16:56:28 +00:00
Chilun Huang
b8a3a1987d Merge "Use the icon size of starting surface for split decor" into tm-dev am: dc7c91de99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17750240

Change-Id: I0faa0eda566e3d4c06ab9639d1ec026ce688d650
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 14:23:19 +00:00
Hongwei Wang
83c72ad868 Merge "Validate target view surface in PipDismissTargetHandler" into tm-dev am: 5cb6c5a9c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17821975

Change-Id: Ia835ed023a0ea3ef64147f5c6499e2fee71822cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 12:48:21 +00:00
Mady Mellor
854d2116de Merge "Collapse bubbles when drag and drop is initiated" into tm-dev am: ef1cc8850f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17715693

Change-Id: I2894040d4913c26f480f874e2c8dc63f05c4ff0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 12:36:33 +00:00
Chilun Huang
dc7c91de99 Merge "Use the icon size of starting surface for split decor" into tm-dev 2022-04-20 08:44:33 +00:00
Jerry Chang
1a14fc4a5e Add jank instrument support for split screen enter and exit transition
Bug: 203439850
Test: build passed
Test: verified with systrace dump
Change-Id: I9c4464126af2d7631f49d0b001307782d4c01787
2022-04-20 16:36:53 +08:00
Hongwei Wang
dd51f86fd4 Implement PiP custom close action on phone
To use this new custom close action on Phone
- We expect app providing actions via
  PictureInPictureParams.Builder#setActions as they normally do
- We also expect app providing a custom close action via
  PictureInPictureParams.Builder#setCloseAction
- The custom close action is used on Phone only if it matches one of the
  actions listed in setActions (by comparing the PendingIntent)

SysUI will render the custom close action with a highlighted background
and ensures the PiP dismisses after certain timeout if the app fails to
respond in time.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/fR0hxeorlYrxXyzfZ02btK
Bug: 223896879
Test: see video
Change-Id: I65c585ae3224061311e476753bc4c72f00c4fa33
2022-04-19 23:55:06 -07:00
shawnlin
bcea9fd89e Support scaled cutout & roundedcorners when resolution is overridden
In current desgin, the confgis for cutout and rounded corner are based
on the original display size. If the display resolution is overridden,
cutous and rounded corners will be drawn in incorrect places with
incorrect size.

We should load the cutout & rounded corners with the orignal display
size and then scale the results with the display ratio which is
calculated by dividing current size with original size.

Bug: 209592558
Test: manual:
      1. Go Settings-> Display-> Screen Resolution
      2. Switch between FHD+ and QHD+
      3. Check if the cutout and rounded corner looks the same as they
	 are in the original display size.
Test: manual:
      1. adb shell wm size 1080x2340
      2. Check if the cutout and rounded corner looks the same as they
         are in the original display size.
Test: atest DisplayCutoutTest LocalDisplayAdapterTest
          ScreenDecorationsTest RoundedCornerResDelegateTest
Change-Id: Iea42b73c0276b82983c1ddbce9455355afdc164d
2022-04-20 10:03:19 +08:00
Bill Yi
30c131f520 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I6b8fba0c3b8a6891397e13a65cc08a36da443f58
2022-04-19 19:56:22 +00:00
Hongwei Wang
a6cf936798 Validate target view surface in PipDismissTargetHandler
Bug: 228969163
Test: N/A, will monitor the crash dashboard
Change-Id: I255c53c67b5e2df22a5049b43933aeb824b6fd45
2022-04-19 11:35:02 -07:00
Hongwei Wang
9e5b4ec816 Revert "Remove getSfInstance usage from ViewRootImpl"
This reverts commit a825a5c0d9.

Reason for revert: regression as b/228282275

Bug: 222696368
Bug: 228282275
Change-Id: Iba99b5a9ab53a829ce4928cccc47293e62f76162
2022-04-19 11:09:27 -07:00
Mady Mellor
ef1cc8850f Merge "Collapse bubbles when drag and drop is initiated" into tm-dev 2022-04-19 17:08:36 +00:00
Wei Sheng Shih
055bd999ed Merge "Do not show task snapshot window if task bounds has changed." into tm-dev am: a944a2c1ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17712244

Change-Id: I3fb10a69551d9077e66e87c473a3c941fc93f194
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-19 02:23:11 +00:00
Wei Sheng Shih
a944a2c1ad Merge "Do not show task snapshot window if task bounds has changed." into tm-dev 2022-04-19 02:07:46 +00:00
Hongwei Wang
1afd093567 Revert "Deprecate getSfInstance usage in PiP component"
This reverts commit 74092d1e49.

Reason for revert: regression as b/228282275

Bug: 222697646
Bug: 228282275
Change-Id: If21af3b5bf993fa0ed3760bb5c68d23ba0b4cfd5
2022-04-18 22:59:19 +00:00
Mady Mellor
528db439de Collapse bubbles when drag and drop is initiated
Dragging a notification into split screen would fail if bubbles
were expanded while performing this action. I think it makes sense
to collapse the stack if its open when drag and drop for an app
starts.

Bug: 223909931
Test: atest DragAndDropControllerTest
Test: manual - have bubbles expanded
             - swipe down the shade, long press on a notification
               and drag it
             => bubbles are collapsed and the notif is able to be
                put into split screen.
Change-Id: Ib5160b3d772452f1cdd704926887bd38a5fd1ef1
2022-04-18 22:52:59 +00:00
Mady Mellor
286e08fee4 Merge "Fix drag to split in RTL" into tm-dev am: 1970f8ddd2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17725414

Change-Id: I62bdc4d02757fceed4354708d885dbd47441c444
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 17:23:27 +00:00
Mady Mellor
1970f8ddd2 Merge "Fix drag to split in RTL" into tm-dev 2022-04-18 17:11:23 +00:00
Tony Huang
005adaef4f Merge "Fix recents thumbnail wrong while swipe up" into tm-dev am: 0b87da7195
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17767846

Change-Id: I56fe9748a90b97cc566cbe69c89d5215be51c419
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 04:02:49 +00:00
Shawn Lin
4ef7bb163e Merge "Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer" into tm-dev am: 8b8de88b3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17665878

Change-Id: I74983e91a7d6215a7d317aec15d1ed7750d16fa1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 04:02:41 +00:00
Tony Huang
0b87da7195 Merge "Fix recents thumbnail wrong while swipe up" into tm-dev 2022-04-18 03:44:15 +00:00
Shawn Lin
8b8de88b3e Merge "Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer" into tm-dev 2022-04-18 03:41:27 +00:00
TreeHugger Robot
528ea61d07 Merge "Make BackEvent#getTouchX and BackEvent#getTouchY floats." into tm-dev am: e16244c3cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17650054

Change-Id: I86e622e8603d4fca97192b0a5f66834be6d0f42d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 02:29:40 +00:00
TreeHugger Robot
e16244c3cd Merge "Make BackEvent#getTouchX and BackEvent#getTouchY floats." into tm-dev 2022-04-16 01:51:10 +00:00
Hongwei Wang
3a7f5bf8b5 Merge "Reset PiP shadow radius in onTaskVanished" into tm-dev am: 4384a4b74c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17766824

Change-Id: If40fde640755803f05f7c614cccffb2fde1e3359
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 01:00:16 +00:00
Hongwei Wang
e4f4f107f3 Reset PiP shadow radius in onTaskVanished
This is a follow-up of ag/17527240 in which we do not cover the case
that a Task in pinned mode is directly removed via Task#moveTaskToBack

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cMG5Uh1kLC7EyAs2EbDVkM
Bug: 228793904
Test: follow the reproduce step in bug, see video
Test: atest WMShellUnitTests:PipTaskOrganizerTest
Change-Id: Ib7472908a81d56d34216ca272afbd9f1a2668b89
2022-04-15 13:51:30 -07:00
Mady Mellor
8c7e52269f Merge "Skip onTaskMovedToFront if the bubble selection is animating" into tm-dev am: 4008e21f0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17769043

Change-Id: I43af721bb799596e3575221018a626e2b4100f1e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 16:55:56 +00:00
Mady Mellor
4008e21f0a Merge "Skip onTaskMovedToFront if the bubble selection is animating" into tm-dev 2022-04-15 16:25:02 +00:00
Tony Huang
9220937682 Fix recents thumbnail wrong while swipe up
This bug occured when it has multiple visible app targets need to
show. If surface didn't have specific layer, their display order
will be determined by create timing. By such rule, we should create
their animation leash by down to top rather than top to down.

This patch also fix wrong logic to create RecentsAnimationSplitTasks,
we should only do that when split is active.

Fix: 223396876
Fix: 207390696
Test: manual
Test: pass existing tests
Change-Id: I74a33cdc28d370f1db3910ebda8577c72416bc97
2022-04-15 15:15:44 +08:00
TreeHugger Robot
930d5fc2b0 Merge "Fix bubble expanded view jumping to the left when switching bubbles" into tm-dev am: 3d69ea8e74
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17767631

Change-Id: I5af8053ea02b6bc151b81a4d7ec8a659b5e2fa03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-15 04:46:05 +00:00
TreeHugger Robot
3d69ea8e74 Merge "Fix bubble expanded view jumping to the left when switching bubbles" into tm-dev 2022-04-15 04:41:57 +00:00