Commit Graph

4079 Commits

Author SHA1 Message Date
Leon Scroggins
866f67dc94 Merge "Propagate HDR information to screenshot animation." into tm-dev 2022-04-29 15:16:21 +00:00
Jerry Chang
535fbd5b46 Merge "Skip running app pair flicker tests since it's deprecated" into tm-dev 2022-04-29 06:56:20 +00:00
Tony Huang
af014f9eb6 Merge "Support exit to full screen to non-split app" into tm-dev 2022-04-29 06:28:58 +00:00
Chilun Huang
6efe0b12b5 Merge "Set the correct size to the container of icon view" into tm-dev 2022-04-28 02:12:01 +00:00
Alec Mouri
3d03ed3626 Propagate HDR information to screenshot animation.
The screenshot animation must know whether the screenshot contains HDR
layers so that it can correctly inform SurfaceFlinger whether its layer
can be dimmed.

This is due to the interplay of the following:
1. Devices are now able to configure DisplayManager to send
   significantly lower SDR white points relative to display brightness
   to SurfaceFlinger when HDR is simultaneously on-screen.
2. AIDL composer is required to support per-layer dimming, so that SDR
   layers may be dimmed to preserve the relative luminance of HDR video
   content.
3. Because the screenshot does not contain an HDR transfer function,
   SurfaceFlinger will treat the layer as SDR, and attempt to dim it.
4. Screen rotations containing HDR layers must request SurfaceFlinger to
   present the rotated screenshot at display brightness, to override
   (3) above. Otherwise, HDR content captured in the screenshot will
   suddenly dim during the rotation animation.
5. Also due to (3), DisplayManager no longer thinks that there is HDR
   content on screen, so a prior patch treated layers that requested to
   to be dimmed to be reported as HDR
   (I1d1b0dcaf230300ca34b84ea407d0817feb2c664). Otherwise, the display
   brightness will decrease during the animation and ramp back up
   afterwards.
6. But because of (5), screenshots that only contained SDR layers were
   incorrectly treated as HDR, which caused the display brightness to
   ramp up during the animation.

This patch fixes (6) by allowing for the screenshot animation to learn
whether the screenshot contains HDR layers, and request dimming
capabilities accordingly.

Bug: 230068567
Test: screen rotation
Change-Id: I6bbb2433f976e368bfe2c04e084e110cfb551c15
2022-04-27 21:43:48 +00:00
Jerry Chang
37f8c719fe Skip running app pair flicker tests since it's deprecated
Remove app-pair flicker tests from presubmit and mark them with @Ignore
since app-pair is not currently used but kept in codebase for backup.

Fix: 223076688
Fix: 226869067
Fix: 214190843
Fix: 200778092
Fix: 200777653
Test: atest WMShellFlickerTests
Change-Id: I328d87f87bf9c5f01d86474b850d7d3056aa3ed9
2022-04-27 18:01:38 +00:00
Shawn Lin
b9109dd6ae Merge "Move kids mode relative logic to wm shell" into tm-dev 2022-04-27 08:18:55 +00:00
Chilun Huang
1620411503 Set the correct size to the container of icon view
Wrong container size causes some icon to be cropped. Set the icon size specified by spec as the container size to correct it.

Bug: 228928242
Bug: 229954549
Test: Manual resize the split and check the icon on both phone and large
      screen device.
      Manual drag to split and check the icon on both phone and large
      screen device.
Change-Id: I556f2c1a44852439242a16a6216121036b8aed5e
2022-04-27 05:11:01 +00:00
Shan Huang
4e612ce971 Merge "Remove the occasionally crashy MotionEvent logging." into tm-dev 2022-04-26 15:20:53 +00:00
Robert Horvath
943ffdb6c1 Merge "Improve handling of TV PiPs bigger than movement bounds" into tm-dev 2022-04-26 08:28:52 +00:00
Mariia Sandrikova
42f304140f Merge "Exception for Kids Mode from ignoreOrientationRequest." into tm-dev 2022-04-25 14:11:11 +00:00
shawnlin
402727731f Move kids mode relative logic to wm shell
1. Move KidsModeSettingsObservor to wm shell.
2. Create a ForceShowNavBarSettingsOberver for wm core.

Bug: 230072077
Test: atest KidsModeTaskOrganizerTest
Change-Id: I1b3edf1fc804b9dac190fcc92b7b62bfc3366d64
2022-04-25 20:10:41 +08:00
Mariia Sandrikova
9182b74df1 Exception for Kids Mode from ignoreOrientationRequest.
Fix: 229304143
Test: manual and DisplayContentTests
Change-Id: I3136db620afdf016a900f3441ee3010ae9662f0f
2022-04-24 16:28:31 +00:00
Santiago Etchebehere
791c612714 Merge "Revert "Remove check for preventing re-parenting non-split apps"" into tm-dev 2022-04-22 21:07:18 +00:00
Santiago Etchebehere
d7816f0bba Revert "Remove check for preventing re-parenting non-split apps"
Revert "Use new onStartSplitLegacy when starting split from overview"

Revert submission 17779173-startSplitLegacy

Reason for revert: Broken build: b/230129218
Reverted Changes:
I01590e53c:Remove check for preventing re-parenting non-split...
I696749f76:Use new onStartSplitLegacy when starting split fro...

Change-Id: I754bc308f37eea2fc50eda2b9df068adf711a268
2022-04-22 21:02:22 +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
Shan Huang
ab2fc4970b Remove the occasionally crashy MotionEvent logging.
Bug: 230097019
Test: mp sysuig. Swipe back in various places and make sure nothing crashes.
Change-Id: I54dfaff912e12205fb5b6ca9b8a8fa4682e2e05b
2022-04-22 17:27:25 +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
ec56afe31b Merge "PiP: Re-attach PiP menu when display changes." into tm-dev 2022-04-21 18:05:03 +00:00
Nataniel Borges
03465b1e10 Merge "Disable failing PIP expand assertion" into tm-dev 2022-04-21 13:54:05 +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
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
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
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
Tony Huang
f8b022ef0f Support exit to full screen to non-split app
When a task no longer supports multi-window, we should dismiss split
to the task so users can continue interacting with the task to prevent
bad UX. We should exit split and extand the side
NoLongerSupportMultiWindow let user could interact continuously.

Fix: 221255438
Test: manual
Test: pass existing tests
Change-Id: Iae61d821028755dcca96edb904912495b268bf8c
Merged-In: Iae61d821028755dcca96edb904912495b268bf8c
2022-04-19 04:46:23 +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
1970f8ddd2 Merge "Fix drag to split in RTL" into tm-dev 2022-04-18 17:11:23 +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
e16244c3cd Merge "Make BackEvent#getTouchX and BackEvent#getTouchY floats." into tm-dev 2022-04-16 01:51:10 +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
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
3d69ea8e74 Merge "Fix bubble expanded view jumping to the left when switching bubbles" into tm-dev 2022-04-15 04:41:57 +00:00
Wei Sheng Shih
2aac68104f Merge "Clear the system bars color when removing the splash screen window." into tm-dev 2022-04-15 02:18:23 +00:00
Mady Mellor
6827e13a2d Skip onTaskMovedToFront if the bubble selection is animating
When a bubble gets dismissed while the stack is expanded, we should
select the next available bubble. Instead, we are collapsing.
This is because we get an onTaskMovedToFront event for the app
behind bubbles moving to the front, which causes the stack to
collapse. To fix this I add a check to see if the switch animation
is running, and if so we skip the collapse in onTaskMovedToFront.

Bug: 208648025
Test: manual - have multiple bubbles, expand the stack, visit each
               bubble
             - dismiss each bubble by dragging to dismiss target
             => observe that after dismissing each bubble, the next
                bubble is selected (if available)
Change-Id: If82c004ecd1ec8920e934dbae2107b4c37853cb5
2022-04-14 23:54:28 +00:00