Commit Graph

1542 Commits

Author SHA1 Message Date
Jerry Chang
da44526b9b Fix the content of the bottom split being truncated while showing IME
Freeze the configuration size when shifting split layout so that client
apps can calculate insets properly and won't get config or relaunch.

Fix: 192410210
Test: atest WMShellUnitTests
Test: verified the content of the bottom split won't be truncated when
adjusting split layout with IME and won't get relaunch.

Change-Id: I38da063ffacc19b691c14b74d118949293414492
2021-07-30 16:00:57 +08:00
Tony Huang
ff254dd71f Merge "Add api for systemUi getting split visibility" into sc-v2-dev 2021-07-26 07:54:03 +00:00
TreeHugger Robot
f14036160e Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-07-23 17:53:33 +00:00
Bill Yi
a81a5aefe9 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I42bee20dd7e0a9fb93eb366fd51be58d4fcba2f2
2021-07-23 13:35:10 +00:00
Tony Huang
d69d28659b Add api for systemUi getting split visibility
Bug: 193713566
Test: manual
Change-Id: I6dddfb5ae213da8a7da0b1b9eba45ed7dfff6983
2021-07-23 17:17:33 +08:00
Tony Huang
c7efed22c4 Merge "Make sure divider show after DA info changed" into sc-v2-dev 2021-07-23 06:26:43 +00:00
TreeHugger Robot
c739eabbd3 Merge "Prevent NPE when dropping app icon to split" into sc-v2-dev 2021-07-23 03:37:23 +00:00
Tony Huang
2ac27f9e10 Make sure divider show after DA info changed
Currently it will not receive stage visibility changed callback
after display info changed, the divider will not show even if it
has re-initialized.

Fix this by add applyVisibility call when display info changed.

Fix: 194159070
Test: active stage split and rotate phone
Change-Id: I2b9d6849300bc8a594cdbe658a7f7a663fd949a7
2021-07-23 10:58:09 +08:00
TreeHugger Robot
8dbc900327 Merge "Skip operation on content overlay if task's vanished" into sc-v2-dev 2021-07-22 21:28:20 +00:00
Ben Lin
9e8c821a32 Merge "PiP: Implement auto-rotate w/ button nav for Shell Transitions." into sc-v2-dev 2021-07-22 21:25:07 +00:00
TreeHugger Robot
aff5acf765 Merge "PiP: Fully disable dismiss target." into sc-v2-dev 2021-07-22 19:29:10 +00:00
Hongwei Wang
0a0718c677 Skip operation on content overlay if task's vanished
The stack trace in b/194344478 and b/194280568 is actually from the
preceding ActivityThreadTest test, which does not fail but does crash
certain test cases after that.

Since we may set a start delay on the content overlay fading out
animation, there is chance that onTaskVanished happens before it is
actually started. It's also possible that onTaskVanished happens during
the content overlay fadeout. This CL should have addressed both cases.

Bug: 194344478
Bug: 194280568
Test: atest --iteration 5 \
      ActivityThreadTest#testHandlePictureInPictureRequested_overriddenToEnter \
      ScreenshotTests#testScreenshotSecureLayers \
      TaskStackChangedListenerTest#testTaskChangeCallBacks
Change-Id: I81c0622966df32e02db7cb5aa3cd42d7c4af735e
2021-07-22 10:28:15 -07:00
Wei Sheng Shih
36b1a17984 Merge "Using BaseIconFactory to draw legacy icon." into sc-dev am: 61d71ccaae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15301161

Change-Id: I55e6322b3df07fd54b0455d8de70c5a5875834b8
2021-07-22 10:25:53 +00:00
Wei Sheng Shih
61d71ccaae Merge "Using BaseIconFactory to draw legacy icon." into sc-dev 2021-07-22 10:06:34 +00:00
Ben Lin
b829d18bfa PiP: Fully disable dismiss target.
When the flag is not enabled, we should not run any code even in
onReleaseInTarget.

Bug: 177038582
Test: None
Change-Id: Iebf12d4405e462411aacfd4a3f38e566abafb858
2021-07-21 18:39:39 -07:00
wilsonshih
45abb0b357 Using BaseIconFactory to draw legacy icon.
Use the shared launcher library to draw legacy icon.

Bug: 193780874
Test: launch app which still using legacy icon from Launcher.
Change-Id: Id8ccb5b6c532880ff207526fd754e92fdd08e284
2021-07-21 21:25:51 +08:00
Jerry Chang
603bda15e8 Prevent NPE when dropping app icon to split
Fix: 194154810
Test: drop to split won't trow NPE.
Change-Id: Ie3a6e9a606206cc1c5c26da131551616e29d03da
2021-07-21 15:48:26 +08:00
TreeHugger Robot
73ef335c0f Merge "Fix entering PiP transition in button navigation mode" into sc-dev 2021-07-21 02:48:29 +00:00
Hongwei Wang
33c3fcc671 Fix entering PiP transition in button navigation mode
Included in this CL
- when there is no source rect hint, use a content overlay during the transition
- otherwise, take account the display cutout to offset/inset the source
  rect hint

Test with following variants when entering PiP in button nav
- from 0 / 90 / 270 rotation
- with or without source rect hint
- display cutout mode set to default or shortEdge

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cxk4vy8VenQPSv83vHEs22
Bug: 191310680
Test: manual, see the test cases listed and video above
Change-Id: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
Merged-In: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
2021-07-20 23:43:23 +00:00
Hongwei Wang
e2a5a72266 Merge "Fix entering PiP transition in button navigation mode" into sc-v2-dev 2021-07-20 23:30:26 +00:00
Ben Lin
9b550d2c36 Merge "PiP: Allow customization of PiP minimum size." into sc-dev am: c312c6481b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14077517

Change-Id: I69aff8f023f206d42b9c09d593a880c6fa7b9b90
2021-07-20 20:56:26 +00:00
Hongwei Wang
1ce14dda7e Fix entering PiP transition in button navigation mode
Included in this CL
- when there is no source rect hint, use a content overlay during the transition
- otherwise, take account the display cutout to offset/inset the source
  rect hint

Test with following variants when entering PiP in button nav
- from 0 / 90 / 270 rotation
- with or without source rect hint
- display cutout mode set to default or shortEdge

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cxk4vy8VenQPSv83vHEs22
Bug: 191310680
Test: manual, see the test cases listed and video above
Change-Id: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
2021-07-20 13:39:47 -07:00
Ben Lin
c312c6481b Merge "PiP: Allow customization of PiP minimum size." into sc-dev 2021-07-20 20:35:36 +00:00
Ben Lin
c6ea2a5a2e PiP: Implement auto-rotate w/ button nav for Shell Transitions.
Bug: 193836477
Test: enter PIP while in landscape
Change-Id: I27424f3e044c5ea2db555724e6f0fc59c23bf4cd
2021-07-19 12:45:33 -07:00
Evan Rosky
6f56237160 Merge changes I710805c8,Ie26d634b into sc-v2-dev
* changes:
  Create a LegacyTransitions to manage combined WCT + remoteanimation
  Aggregate stage-split operations into WCT
2021-07-19 15:31:15 +00:00
TreeHugger Robot
ae942fcf7d Merge "Fix OHM H/W key shortcut dosn't work appropriately" into sc-v2-dev 2021-07-19 03:23:57 +00:00
TreeHugger Robot
989aee5581 Merge "Fix One-handed tutorial looks janky on entering transition" into sc-dev am: ed889bb867
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15283490

Change-Id: I3136887f13ca30c8ec72d6288b2c17e9a321c85f
2021-07-18 17:45:53 +00:00
Evan Rosky
6139cf51b2 Create a LegacyTransitions to manage combined WCT + remoteanimation
Use this to implement Drag-to-split transition

BYPASS_INCLUSIVE_LANGUAGE_REASON=using existing API.

Bug: 192291727
Test: drag from taskbar into split and observe. Also,
      drag same-app into split and observe no-op.
Change-Id: I710805c85c7d57ae8eebe18e5df7fca899f1b882
2021-07-16 19:06:14 -07:00
Evan Rosky
e9f13e1341 Aggregate stage-split operations into WCT
Previously different operations were just applying transactions
as they were called. We need better control over this for
synchronization purposes, so we basically pass wct into these
operations so that everything can be aggregated into one WCT
if desired.

Bug: 192291727
Test: existing tests pass (this is a refactor)
Change-Id: Ie26d634bcd3ab6baf4d2a4788986689914a58c13
2021-07-16 17:17:33 -07:00
Mady Mellor
6de523e30b Merge "Only load the overflow data once" into sc-v2-dev 2021-07-16 17:59:01 +00:00
Bill Lin
500e2b146d Fix One-handed tutorial looks janky on entering transition
According to systrace, one-handed-tutorial-overlay got
jank problem(SurfaceFlinger GPU Deadline Missed,
App Deadline Missed, Buffer stuffing).

1.setLayerType(LAYER_TYPE_HARDWARE) when create targetViewContainer
  setLayerType(LAYER_TYPE_NONE) when removeTutorialFromWindowManager
2.Rename isShowing() to isAttached()
3.Remove redundant float casting
4.Remove redundant increment param

Test: manual trigger OHM
Test: atest WMShellUnitTests
Bug: 193589897
Change-Id: Ieec397795b46dee9ca04375bfc26b09441688d08
2021-07-16 19:21:15 +08:00
Bill Lin
420036710b Fix OHM H/W key shortcut dosn't work appropriately
When one-handed mode disabled
1. Turn on the shortcut of the OHM with hold volume keys
2. Hold the volume keys
Should trigger one-anded mode

Due to S/W & H/W shortcut keys are mapping to different settings
S/W : ACCESSIBILITY_BUTTON_TARGETS
H/W : ACCESSIBILITY_SHORTCUT_TARGET_SERVICE
We should check both status of the them.

Bug: 193411296
Test: atest WMShellUnitTests
Change-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
2021-07-16 11:09:57 +00:00
Mady Mellor
c88902ca0b Only load the overflow data once
We would also try loading the overflow data if it was empty
but this works poorly if it's becoming empty due to an app
cancel because we could load contents that are about to be
removed.

I think this can safely work if we just load it based on
the flag.

Adds a test related to this that was only in BubblesTest to
 NewNotifPipelineBubblesTest as well

Test: atest BubblesTest NewNotifPipelineBubblesTest
Test: - have nothing in bubble overflow
      - post 3 bubbles, cancel all, get a bubble, look in the overflow
      => the 3 bubbles shouldn't be there
Bug: 193560795
Change-Id: I1ec2d637281807ae3a2ec7430cff6627b074fa78
2021-07-15 22:13:04 +00:00
Mady Mellor
5474359369 Fix dismiss not working in landscape
In stack animation controller only one target would ever
be added so when the target is re-created after rotating
then it wouldn't be used.

Test: - have some bubbles, drag them around, rotate device, try to
        dismiss them => they can be dismissed in landscape
      - get more bubbles, rotate back to portrait, try to dismiss
        them => they can be dismissed in portrait
      - drag the stack around the edges of the screen and verify that
        the only magnetic spot is where the dismiss target is
Fixes: 193008696
Change-Id: I6b24b1f9d301d37749dc67c95392fd6c8451df00
2021-07-15 19:21:45 +00:00
Ben Lin
f75fffdc20 PiP: Allow customization of PiP minimum size.
Bug: 171596717
Test: None.
Change-Id: I9bb6f2740d25fce99a436f938e7b3cca819ffa98
2021-07-15 12:21:30 -07:00
Tony Huang
f6b894be70 Merge "Migrate rotation animation to shell transition" into sc-v2-dev 2021-07-15 05:48:27 +00:00
Tony Huang
b9559a6f80 Migrate rotation animation to shell transition
Migrate rotation animation in wm core to wm shell and used in
shell transition.

Bug: 190002115
Test: manual rotation the device
Change-Id: Ib3404eeb7ac647774ea3be2707c9515371ab0976
2021-07-15 10:33:49 +08:00
Tony Huang
dda8850a7e Fix main stage full screen after lock phone
We will set main stage to full screen when it visible but side
stage not visible, but we should not do it when phone unlock.
Add isSleeping check to avoid such problem.

Fix: 193605614
Test: pick any 2 apps to stage split then lock and unlock phone.
Change-Id: I0fd99960ca0c5a10ac33b23f92f01d9b48877379
2021-07-14 17:38:05 +08:00
TreeHugger Robot
2bd69d1eda Merge "Add adb command to toggle side stage outline border" into sc-v2-dev 2021-07-14 04:03:59 +00:00
Wei Sheng Shih
76d20eedf6 Merge "Get starting window background color directly." into sc-dev am: a9a861134d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15020163

Change-Id: I46ebb85f40dab8cd27f520fbdac81656fea52d51
2021-07-14 01:50:27 +00:00
Jerry Chang
0b106a923d Add adb command to toggle side stage outline border
Make the outline boarder of the side stage default off. Add an adb
command to toggle on/off the boarder.

$adb shell dumpsys activity service SystemUIService WMShell
setSideStateOutline <true/false>

Bug: 189839391
Test: verified the adb command could toggle on/off side stage outline
border.

Change-Id: I4c09b072b384badd206f0e81eca6daa033ac8565
2021-07-14 01:09:22 +00:00
wilsonshih
3be521ad48 Get starting window background color directly.
SystemUI does not need to re-calculate background color of starting
window because Shell library is bound to SystemUI, so status bar can
get background color directly, also this can support to get the
background color from snapshot starting window.

Also fix the starting window listener did not receiveing background
color successful because makeSplashScreenContentView is execute on
another background thread, so there should block the splash screen
thread until the background color is estimated.

Bug: 192213918
Bug: 192659309
Test: manual launch apps from Notification and Launcher, ensure the
color is correctly send to SystemUI or Launcher.

Change-Id: I626cb23d7aebfe4e032fad285bfad374c0e11cea
2021-07-13 18:53:19 +08:00
Ben Lin
26ab789b77 Merge "PiP Transition: Support auto-enter PIP" into sc-v2-dev 2021-07-12 18:02:57 +00:00
TreeHugger Robot
a48cf0c2ea Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-07-12 14:05:17 +00:00
Bill Yi
fa14bbb966 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Iaf7e215a10a33572728d0cd72df17e79271e44e4
2021-07-12 11:55:14 +00:00
Tony Huang
152f01c18f Merge "Set stage outline layer to top" into sc-v2-dev 2021-07-12 10:17:33 +00:00
Tony Huang
efbc8c1028 Set stage outline layer to top
Outline do not set layer before so it will show behind tasks layer
then it will be invisible. Set its layer to top to ensure it's
visible.

Also fix context error message bug by replacing display context to
window context.

Fix: 192902371
Fix: 192527238
Test: Enable spilt and disable it many times and check outline display
Test: Check ContextImpl log
Change-Id: Ic1796965d7254d2276d4c05c662e940820c8d995
2021-07-12 16:44:23 +08:00
Chris Li
56f9dc1299 Skip AppPairs and LegacySplit flicker tests when Shell transition is on
AppPairs: no plan to update to Shell transition soon
LegacySplit: will be replaced by StageSplit in sc-v2

Bug: 183993924
Test: pass existing
Change-Id: I1cd485126356ae5d628b13cc33f883d61430285d
2021-07-11 13:02:01 -07:00
Bill Lin
6412447d27 Merge "Redesign One-haned tutorial UX behavior" into sc-dev am: 5ad4a8093c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15187818

Change-Id: Iaaa00752187baa50b75e14aedd25c08cfbc31e98
2021-07-10 01:10:53 +00:00
Bill Lin
1e1856fc4d Merge "Improve SystemUIBootiming_StartServices_avg" into sc-dev am: 1334cfb90d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15243692

Change-Id: Ibcef8192752d2a20bf9b047e2d02f925a23346d9
2021-07-10 01:10:49 +00:00