Commit Graph

1768 Commits

Author SHA1 Message Date
Tony Huang
62c6c83f57 Make split screen only reparent top task
Follow latest split screen UX model, it should only reparent
the top task to split for app-pair model.

Fix: 201480664
Bug: 202740040
Test: manual
Test: pass existing tests
Change-Id: I4b360a31ce8e7366a77216a94b5f1b19bba848e9
2021-10-14 15:37:00 +08:00
Tony Huang
7d3fcc6fe2 Copy current split codes to stagesplit package
Backup current split screen implementation

Fix: 202740656
Test: build pass
Test: pass existing tests
Change-Id: I0dcd3ba5b48a43dab902f10c60e840e0ecccddbe
2021-10-12 12:26:58 +08:00
Nataniel Borges
2af16463ee [DO NOT MERGE] Compatibilize flicker from master to sc-v2-dev
This is necessary to fix  "Unable to save trace file /sdcard/flicker/startRotationServiceTest_layers_trace.winscope" in the library self tests

Bug: 202288112
Bug: 202366188
Bug: 188993244
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I9d6d6025be8b659d2f062771cfbd2f6c0982c2be
2021-10-11 10:47:19 +00:00
Nick Chameyev
0cc4156bbc Merge "Add split screen unfold animation" into sc-v2-dev 2021-10-08 10:09:57 +00:00
Nataniel Borges
2461e951b9 Merge changes from topic "sync-flicker-sc-v2-dev" into sc-v2-dev
* changes:
  [DO NOT MERGE] Dump windowing mode in Winscope traces
  [DO NOT MERGE] Dump SurfaceControl's layerId to proto
  [DO NOT MERGE] Dump WindowContainer SurfaceControls to proto
  [DO NOT MERGE] Expose SurfaceControl's native mLayerId property to Java
  [DO NOT MERGE] Sync flicker from master to sc-v2
2021-10-08 08:51:10 +00:00
Mady Mellor
f1e8bc69c0 Merge "Fix an issue that caused an NPE" into sc-v2-dev 2021-10-08 06:15:17 +00:00
TreeHugger Robot
93e22893e8 Merge "Fix layout been truncated after activated split screen" into sc-v2-dev 2021-10-08 01:58:27 +00:00
Mady Mellor
5981b9fa27 Fix an issue that caused an NPE
If the overflow is empty when the last bubble
is dismissed we collapse the stack. If it's not empty
we show the overflow contents.

We were overflowing bubbles AFTER making the choice
to select the overflow or collapse the stack which
causes problems.

Test: atest BubbleDataTest
Test: manual - have 1 bubble and an empty overflow
             - navigate to the overflow, dismiss the bubble
             => no crash
Bug: 202320538
Change-Id: Ic838c5c61bcd714d8de94672d3c4ed753d4f6fa6
2021-10-07 18:19:28 -07:00
Evan Rosky
7a23b1517d Merge "Unrotate going-away apps during a launch-into-orientation transition" into sc-v2-dev 2021-10-07 17:08:20 +00:00
Nick Chameyev
f96ed6b6a1 Add split screen unfold animation
Creates controllers in the Shell that manipulate
SurfaceControl leashes of the current active
split screen surfaces based on the current
unfold transition progress.

Bug: 193795566
Test: manual
Change-Id: Ib80807c632444b2939e9b075fb24fd40cc14648a
2021-10-07 14:25:25 +01:00
Jerry Chang
bb7abee972 Fix layout been truncated after activated split screen
Stop cropping root surfaces when dismissing split screen, so the next
time entering split screen won't apply remaining crop setup
unexpectedly.

Fix: 202368189
Fix: 202358094
Test: atest WMShellUnitTests
Change-Id: Idf079b6cb04f1ced1d7cdf166fe54309dd64f163
2021-10-07 19:48:21 +08:00
Wei Sheng Shih
e921c7a282 Merge "Fix snapshot starting window stuck if the task never gain focus" into sc-v2-dev 2021-10-06 03:00:48 +00:00
Evan Rosky
14ea8c60f5 Unrotate going-away apps during a launch-into-orientation transition
When going from a non-launcher task to another non-launcher task
that is in a different orientation, we just animate the new task
opening in the new orientation (no screen rotation animation). To
make this work, though, we need to unrotate all the going-away
windows because they are in the old orientation.

Added CounterRotator to a utility area in shell so it can be
shared with other components (like Sysui shared lib).

Bug: 183993924
Test: atest OpenAppColdTest
Change-Id: I0263dfb8d529b6fc3dfbe3775e3e6e0b77f6ca8a
2021-10-05 16:23:47 -07:00
TreeHugger Robot
59cc5f2f31 Merge "Add app window unfold animation" into sc-v2-dev 2021-10-05 15:39:12 +00:00
wilsonshih
9987513af6 Fix snapshot starting window stuck if the task never gain focus
The tasksnapshot starting window could stuck on task if the task never
gain focus, this could happen when launch multiple tasks to front, e.g.
split screen, or add snapshot starting window to a pip task.

As using task focus to judge the task snapshot removal may error-prone.
(i.e. unexpected window focus in/lost, non-focusable task window..)

To ensure the tasksnapshot removal works stable, extanding
MAX_DELAY_REMOVAL_TIME_IME_VISIBLE timeout from 450ms to 600ms and also
reference mayImeShowOnLaunchingActivity to know whether IME showing on
this activity.

Bug: 199377815
Bug: 201264769
Bug: 200778734
Test: atest ActivityRecordTests StartingSurfaceDrawerTests
SplashscreenTests
Test: manual launch apps with IME from Recents.
Test: enter pip, power on/off, verify starting window is removed.
Test: manual enter split screen, verify starting window is removed.

Change-Id: I81b048a655124923a5f19e7f236511502bbf4c91
(cherry picked from commit a4f760bee7)
2021-10-05 20:43:35 +08:00
TreeHugger Robot
1717119fcf Merge "Consolidate app-pair divider bar behavior" into sc-v2-dev 2021-10-05 03:27:55 +00:00
Jerry Chang
5a62d8a71e Consolidate app-pair divider bar behavior
Set divider bar surface position after the corresponding leash ready.
Make sure app pair renders rounded corners with proper insets. And
prevent re-inflating divider bar redundantedly.

Fix: 201966641
Fix: 201966626
Test: atest WMShellUnitTests
Test: manual check divider bar behavior while in app pair split.
Change-Id: I70305df9ab8d77a8b474f573cea82026b9eb5298
2021-10-05 08:47:42 +08:00
Jerry Chang
49c02984b8 Merge "Consolidate the behavior and style of side stage outline" into sc-v2-dev 2021-10-05 00:46:36 +00:00
Jerry Chang
08ac74f125 Consolidate the behavior and style of side stage outline
Update the style of side stage outline to match the current design. And
make sure the outline will interact properly with task bar expanding,
collapsing, swipe up, drag to split, recents shortcut to split and drag
divider bar to resize gestures.

Bug: 200850654
Test: atest WMShellUnitTests
Test: enable side stage outline, observed it behaves properly.
Change-Id: I3f0795adc34a0efb19d35b78d54364da4189a043
2021-10-04 11:06:59 +08:00
Yuncheol Heo
a03582ad10 Merge "Fix addListenerForType/removeListener in ShellTaskOranizer." into sc-v2-dev 2021-10-01 22:10:39 +00:00
Nick Chameyev
8cc478d5d6 Add app window unfold animation
Creates a controller in the Shell that manipulates
SurfaceControl leash of the current active full
screen task and animates it based on the current
unfold transition progress.

Bug: 193795714
Test: manual
Test: atest com.android.wm.shell.fullscreen.FullscreenTaskListenerTest
Change-Id: I8b9f4e0530042b333c3b6b793d39049932878bb8
2021-10-01 18:09:05 +01:00
Jason Chang
323e305540 Merge "Fix switching "Swipe down from Show notification" to "Pull screen into reach" will not able to trigger it at first time" into sc-v2-dev 2021-09-30 17:43:32 +00:00
Yuncheol Heo
55ef320bb3 Fix addListenerForType/removeListener in ShellTaskOranizer.
This CL fixes the following issues:
- addListenerForType for multi-types can invoke onTaskAppeared
  more than once.
- removeListener for mulit-types listener removes the first type only.

Bug: 200322591
Test: atest ShellTaskOrganizerTests
Change-Id: If53085ab229e3a1525b36aa3d964def0f228200c
2021-09-30 10:15:26 -07:00
Nataniel Borges
2f28af9c44 [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 183993924
Change-Id: Icf40d1aa707ffe80e46dcfd2c616355cf48e6719
2021-09-30 13:30:32 +00:00
Jerry Chang
8366d0347c Merge "Fix surface got offsetted twice while entering split" into sc-v2-dev 2021-09-30 00:29:46 +00:00
Jason Chang
337ccfd36a Fix switching "Swipe down from Show notification" to "Pull screen
into reach" will not able to trigger it at first time

Update notifyShortcutStateChanged() when swipe down from Show
notification settings changed.

Bug: 198395550

Test: manual switch shortcut FAB to test
Test: Test: atest WMShellUnitTests
Change-Id: Ic550586c651a0a6c61f7f672afffbcb83ccf25ff
2021-09-29 07:21:27 +00:00
Jerry Chang
a0c224dba7 Fix surface got offsetted twice while entering split
Split surface might be offsetted twice by RemoteAnimationController and
StageCoordinator#onStageVisibilityChanged. This removes surface
positioning from onStageVisibilityChanged because the split surface
should have been offsetted already by remote animation.

Bug: 199377815
Test: atest WMShellUnitTests
Test: trigger split from recent shortcut, observed split surfces are
      placed properly.
Test: drag to split, observed split surfaces been placed correctly.
Test: shell cmd to split, observed split surfaces been placed correctly.
Change-Id: I2ae1223eec130fa849e2aaa6d2e73ec3c9a845f2
2021-09-28 11:27:10 +08:00
Jason Chang
94ec7e0d2a Merge "Fix One-handed mode truncated screen when device rotates in multiple user mode" into sc-v2-dev 2021-09-28 00:09:09 +00:00
Ming-Shin Lu
a2ac25e907 Merge "Modify TaskSnapshotWindow#scheduleRemove" into sc-qpr1-dev am: d820697e08
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15896148

Change-Id: I6d3b1cb42081ace36e03c9ee1c7a804222d8b4bd
2021-09-27 16:01:22 +00:00
Winson Chung
0ce4fb604b Merge "Ensure wm is fetched on the shell thread" into sc-qpr1-dev am: 938b7d01f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15881354

Change-Id: I5c5c6f45eeab257d8cc17b1e9321fa51f4893132
2021-09-27 15:41:27 +00:00
Riddle Hsu
ff81161318 Merge "Use rotation transition to handle display config change" into sc-v2-dev 2021-09-27 02:38:56 +00:00
Jason Chang
0de284fff6 Fix One-handed mode truncated screen when device rotates in
multiple user mode

User id mismatch when switching to multi-user, refactor some
switch multiple user code.

Bug: 199748164

Test: Manually switch to multiple users to test.
Test: atest WMShellUnitTests
Change-Id: I6ac4d13c5251141d2c65a3ef2b6e2f1f0ca0f650
2021-09-26 12:07:45 +08:00
TreeHugger Robot
12740ad577 Merge "Use the same animation setup in InsetsController for rounded corners" into sc-v2-dev 2021-09-25 09:18:28 +00:00
Mady Mellor
b6eb3821b3 Merge "Ensure bubbles + pip dismiss view is above navbar" into sc-v2-dev 2021-09-24 17:15:03 +00:00
TreeHugger Robot
b4b9b584b5 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-09-24 16:46:06 +00:00
TreeHugger Robot
7d7e666f09 Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev 2021-09-24 16:44:21 +00:00
Tony Huang
6bb4d07b6a Merge "Fix split dim when IME shown" into sc-v2-dev 2021-09-24 05:39:40 +00:00
Jerry Chang
b25bb96223 Use the same animation setup in InsetsController for rounded corners
Uses the same animation setup in InsetsController when animate rounded
corners with insets changed. Also remove divider bar expanding animation
to prevent it overlapping with rounded corners and stage outline.

Bug: 200850654
Bug: 196272915
Test: atest WMShellUnitTests
Test: manul check the behavior of rounded corners when
      expanding/collapsing task bar.
Change-Id: I00449e1c25ca717305be7be9704f5805667adf45
2021-09-24 13:24:04 +08:00
Ming-Shin Lu
102c525452 Modify TaskSnapshotWindow#scheduleRemove
As code review in CL[1] from sc-dev, we should preserve the previous
logic to remove home task snapshot immediately, in order to show latest
content as soon as possible for unlocking to home.

Note that this CL is to sync the logic CL[1] in sc-dev for the
downstream branch (qpr1 and v2, and internal master)

[1] I81031f64966b1aeb55cc09f381d4d83ec3460dc9 (sc-dev)

Bug: 192065018
Test: ateset StartingSurfaceDrawerTests#\
        testRemoveTaskSnapshotWithImeSurfaceWhenOnImeDrawn
Test: manual tests by
   1) launching Android Message with focusing an editor
   2) swiping out to home and launch another apps (e.g. chrome)
   3) swiping up to overview, tapping Android Message task
   4) verify if IME is flickering after switched back.
Change-Id: Ic0cb07504acc11707327360051612df9cce565bd
2021-09-24 04:58:07 +00:00
Bill Yi
3cfe672b7c Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7c6e3994003785054fa38b5fe3b048b901fc4b26
2021-09-24 01:26:14 +00:00
Bill Yi
c628f725fc Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: If9ce97f19063e7d98595b9efdd26e451c0e007a7
2021-09-24 01:20:38 +00:00
TreeHugger Robot
16bd3c23c4 Merge "Update split screen divider to match new taskbar color" into sc-v2-dev 2021-09-24 00:52:48 +00:00
Mady Mellor
ae3d83be77 Ensure bubbles + pip dismiss view is above navbar
- Include the bottom nav inset when placing the dismiss
  view for bubbles + pip.
- Add a window inset listener in pip.
- Make sure a couple of res values were being updated
  in bubble's dismiss view.

Bug: 197119627
Test: manual - have a bubble & drag to dismiss
             - ensure the dismiss target is completely
               visible & above any navbar & changes
               if navbar visibility changes
Change-Id: Ib05e294eade874bbdbdd025d412d0841314f8d7d
2021-09-23 16:05:59 -07:00
Tony Wickham
f082ff8f4a Update split screen divider to match new taskbar color
Test: theoretical (didn't sync and run both changes yet)
Bug: 197321290
Change-Id: I8f5762b386eb0384ac0f00611f7814f9b3e51116
2021-09-23 10:44:35 -07:00
Mady Mellor
a7efb5e025 Merge "Fix possible NPE" into sc-v2-dev 2021-09-23 14:40:12 +00:00
Riddle Hsu
570b2eb491 Use rotation transition to handle display config change
1. Support fade animation with rotation delta 0.
   Rotation animation is also used to cover display configuration
   change, e.g. density, font size.
2. Use normal rotation animation when app requests orientation,
   e.g. from Activity#setRequestedOrientation.
3. Fix flickering of rotation animation
   The layers are:
     Transition Root
       - Animation leash
         - RotationLayer
       - Windowing layer
   So the higher layer should be leash instead of RotationLayer.

Bug: 199836343
Test: ShellTransitionTests
Test: setprop persist.debug.shell_transit 1; reboot
      Change font size in Settings, there should be a fade
      out animation for transiting to new configuration.
      Toggle portrait and landscape from app without specifying
      rotation animation type, seamless rotation should not
      be used.

Change-Id: I7ec9553cc8df2b98f89b6fbda67c3834d018883b
2021-09-23 12:36:27 +00:00
Tony Huang
13e9fc1916 Fix split dim when IME shown
ImePositionProcessor didn't handle dim if it didn't not offset
layout, but when landscape, the layout will not offset. It cause
dim value didn't apply.

Fix this by checking both offset and dim value.

Fix: 200757897
Test: manual
Test: pass existing tests
Change-Id: I709b69c8e2d102d0e8237998b26f45c70805bf23
2021-09-23 15:38:19 +08:00
Mady Mellor
120e6068e2 Fix possible NPE
No user report of this but found in CTS.

I haven't been able to repro this, I think the
expanded view needs to be animating when the bubble
is removed but I haven't been able to reproduce this
via the unit tests or manually to confirm.

Bug: 200603814
Test: atest NotificationManagerTest watch logs and make sure there
      isn't an exception
Change-Id: I70c286a67410d4cd6bbd272a4f27562a5ae1cb99
2021-09-22 19:55:07 +00:00
wilsonshih
a18586cc1b Fix missing check empty style splash screen when task switch.
Bug: 200771843
Test: show empty splash screen when launch a trampoline activity
from notification.
Change-Id: Ib167a3b66a8c4274a96faaa3ff4c2e902e929dab
2021-09-22 12:35:36 +00:00
Winson Chung
da6e8a5f77 Ensure wm is fetched on the shell thread
Bug: 199700116
Test: atest PinnedStackTests
Change-Id: I1aa925bc2ee2bd093b82f18432b548f785f232f4
2021-09-21 21:29:15 +00:00