Commit Graph

1742 Commits

Author SHA1 Message Date
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
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
Evan Rosky
b8e297fb73 Merge "Use binder for remote unregister comparison" into sc-v2-dev 2021-09-21 00:26:29 +00:00
Jerry Chang
d13ce08d6b Merge "Align rounded corners beside divider bar with display and task bar" into sc-v2-dev 2021-09-18 01:54:45 +00:00
Jerry Chang
8675afb2c4 Align rounded corners beside divider bar with display and task bar
Use the same way to draw rounded corners beside divider bar with
display and task bar to make sure all rounded corners share the same
style.

Bug: 196272915
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I566ef5233dc345e0229fd9637c3b05705ba35864
2021-09-17 22:58:27 +08:00
Jerry Chang
754976361b Merge "Use screen-based coordinates to calculate divier bar dragging velocity" into sc-v2-dev 2021-09-17 07:44:13 +00:00
Evan Rosky
22076636ea Use binder for remote unregister comparison
Only the binder objects match, so use those for finding
which filters to unregister.

Bug: 200213691
Test: atest CloseAppHomeButtonTest
      change gesture modes and observe continuing functional anims
Change-Id: Id6e35bd9181462be5594ff8fb6898604df6d9bff
2021-09-16 18:00:03 -07:00
Tony Huang
d0c4ac7948 Fix split cannot active
It was mistake on previos change, we should exit split when both
stages are invisible.

Bug: 199369390
Test: manual
Test: pass existing tests
Change-Id: I9f237155fd75b4ee16db647f4849f929cbba1056
2021-09-16 09:26:32 +00:00
TreeHugger Robot
d2f034f1d5 Merge "Fix flicker when task move to back" into sc-v2-dev 2021-09-16 08:10:30 +00:00
Jerry Chang
a2267025b5 Use screen-based coordinates to calculate divier bar dragging velocity
Fix: 199468325
Test: atest WMShellUnitTests
Test: manual check the snapping behavior of divider bar.
Change-Id: I1256dbe8cb6fbfefdfdaa15c884c2ade4029e256
2021-09-16 14:40:03 +08:00
TreeHugger Robot
bd64fd9f66 Merge "Fix divider display issue" into sc-v2-dev 2021-09-16 06:06:30 +00:00
Tony Huang
3ad28efb88 Fix flicker when task move to back
When task move to back, the task visibility will be invisible
temporarily because visile app task reparent to TDA and below task
still not move to front.

Because this visibility change, we will hide divider and stage root
task then it cause flicker.

Fix this by only update divider and stage visibility when both stage
visible or invisible.

Bug: 199369390
Test: manual
Test: pass existing tests
Change-Id: Ide0b277e26e03ea3d7fb20132ff0e21807eee332
2021-09-16 11:50:35 +08:00
Tony Huang
76522e9938 Fix divider display issue
onDisplayAreaInfoChanged might callback many times in one action
such like fold to unfold, it might cause some issues because we
don't use lastet config resources to set SplitLayout.

Another bug is we cannot get divider leash immediately after we
init it because leash is built after attachToParentSurface.

Fix both bug by always do whole SplitLayout setting if any cared
configs changed. And add a callback after divider leash build,
show the leash on this callback to ensure we got null leash.

Fix: 198581512
Fix: 197296095
Test: manual
Test: pass existing tests
Change-Id: I06a4093927d6469a85b2104b36c16d6e16519a51
2021-09-16 11:39:13 +08:00
TreeHugger Robot
d7039b4222 Merge "Fix OHM H/W key shortcut dosn't work appropriately" into sc-qpr1-dev am: 9a57cd553b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15581982

Change-Id: I5a94baf43fdeb18f90d73eba9e88762c6c86f0d3
2021-09-16 00:49:14 +00:00
TreeHugger Robot
9a57cd553b Merge "Fix OHM H/W key shortcut dosn't work appropriately" into sc-qpr1-dev 2021-09-16 00:40:58 +00:00
Yunfan Chen
ca4709e72b Merge "Make requested visibility available in snapshot starting window" into sc-v2-dev 2021-09-15 08:22:34 +00:00
Yunfan Chen
049e2a46aa Make requested visibility available in snapshot starting window
This change make the snapshot starting window holds the requested
visibilities when created from the task. Such that, when the window get
back from the background, the insets state in the window state can have
the correct visibilities.

Test: check getInsetsStateWithVisibilityOverride as described in the bug.
Bug: 196637509
Bug: 185729224
Change-Id: I54ab0791b169331c22cd89f7e6da640322bf7dd3
2021-09-15 06:28:09 +00:00
TreeHugger Robot
5b04dc7c7e Merge "More improve IME transition during task switch" into sc-v2-dev 2021-09-15 01:05:12 +00:00
TreeHugger Robot
32efa155f4 Merge "RESTRICT AUTOMERGE: More improve IME transition during task switch" into sc-qpr1-dev 2021-09-15 01:04:13 +00:00
Mady Mellor
fd0437eea3 Merge "Only do things if the window inset changed" into sc-v2-dev 2021-09-14 22:56:51 +00:00
Mady Mellor
e176359fa4 Merge changes I477f34de,I74b0d66c,I3c93e472 into sc-v2-dev
* changes:
  Animate the pointer when IME comes up
  Hide the overflow when the IME comes up sometimes
  Shift bubbles for IME on large screens
2021-09-14 22:24:02 +00:00
Mady Mellor
079d53ccbe Only do things if the window inset changed
Test: manual - expand the stack, select the overflow,
               collapse the stack
             => verify that there isn't a weird animation
Bug: 199781565
Change-Id: I408ae5e32a0f9f335fda6a6743134bc52e348d4e
2021-09-14 12:48:53 -07:00
Mady Mellor
ec77b60fe6 Animate the pointer when IME comes up
* Removes some unnecessary methods off Bubble, these can
  be called directly on the expanded view.
* Add some code to animate the pointer
* Fade the pointer with the TaskView

Test: manual - check that the pointer animates with the
               bubble when the IME comes in / out
Bug: 193911220
Change-Id: I477f34de3611eea79f933958ec6e09f68eb93179
2021-09-14 12:02:42 -07:00
Mady Mellor
56b1b2d2d5 Hide the overflow when the IME comes up sometimes
If there isn't enough space to show all the bubbles
when the IME is up on large screens, then hide the
overflow.

Really the overflow isn't hidden, it just doesn't
get shifted up above the IME like the actual bubbles.

Made a little helper class to hold stack state info
and pass that around.

Test: manual - on large screen that can't fit max #
               of bubbles when IME is up, select the
               last bubble & check that IME shifts
               all the bubbles but the overflow
Bug: 193911220
Change-Id: I74b0d66cedf70cca40a36b07933ebf6466da63b7
2021-09-14 12:02:36 -07:00
Mady Mellor
cba1b858d5 Shift bubbles for IME on large screens
* Incorporate IME state when calculating the x/y position
  of the bubbles -- if the IME is up, shift the bubbles
  so they don't overlap it (if possible).
* When the IME visibility changes:
    - positioner saves the state
    - stackview animates the bubbles to their new position

Test: manual - open the IME with bubbles on a large screen
             - check that the IME pushes the bubbles up
	       so they are not overlapping
             - check that IME on phone portrait & landscape
               works as it did before
Bug: 193911220
Change-Id: I3c93e472353cde5c938e33edf2d1ae7a4141db0e
2021-09-13 14:43:18 -07:00
Ming-Shin Lu
8169ca0188 More improve IME transition during task switch
This CL aims to optimize the previous CL[1] to schedule removing
tasksnapshot after a fixed timeout according the tasksnapshot:
    - With IME snapshot: 350ms
    - Without IME snapshot: 100ms

As the previous approach has some cons espically when the tasksnapshot
has IME shown:
1) It lacks a signal or callback to notify WmShell to dismiss
tasksnapshot when IME is actually drawn on the task and always
dismissed after the timeout.

2) The timing to schedule tasksnapsit removal is when
ActivityRecord#onWindowFirstDrawn, which is much eariler than the
window focused (about 100-150ms), and it may easier to see flickering
when the task is showing IME.

The reason is that IME is drawn after window focused and started input
connection. Also, starts from R, IME insets visiblity
is handled by the app's UI thread, so if the schedule removal timing
been triggered too early and if IME / App takes more time to handle IME
surface layout, then user might aware the app task flickering when
tasksnapshot dismissed, since IME is not yet be drawn and then it
show up again when the next layout finished.

In this CL, we made the following changes to improve the above cons
- Postpone the schedule removing tasksnapshot (with IME) timing to
  after the app task has focused.
- Modify the tasksnapshot removal timeout (with IME)  from 350ms to
  450ms (with renaming to MAX_DELAY_REMOVAL_TIME_IME_VISIBLE),
  in case some edge cases may take longer time to process IME layout.
- add ITaskOrganizer#onImeDrawnOnTask(taskId) to notify the shell
  task organizer to properly remove the tasksnapshot without waiting
  until the max timeout.

[1]:  I5fb0fa3a1e6a5e6210d3baf400a84c5892bd2e34

Fix: 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: I81031f64966b1aeb55cc09f381d4d83ec3460dc9
2021-09-13 18:04:05 +08:00
Ming-Shin Lu
278e944fd5 RESTRICT AUTOMERGE: More improve IME transition during task switch
This CL aims to optimize the previous CL[1] to schedule removing
tasksnapshot after a fixed timeout according the tasksnapshot:
    - With IME snapshot: 350ms
    - Without IME snapshot: 100ms

As the previous approach has some cons espically when the tasksnapshot
has IME shown:
1) It lacks a signal or callback to notify WmShell to dismiss
tasksnapshot when IME is actually drawn on the task and always
dismissed after the timeout.

2) The timing to schedule tasksnapsit removal is when
ActivityRecord#onWindowFirstDrawn, which is much eariler than the
window focused (about 100-150ms), and it may easier to see flickering
when the task is showing IME.

The reason is that IME is drawn after window focused and started input
connection. Also, starts from R, IME insets visiblity
is handled by the app's UI thread, so if the schedule removal timing
been triggered too early and if IME / App takes more time to handle IME
surface layout, then user might aware the app task flickering when
tasksnapshot dismissed, since IME is not yet be drawn and then it
show up again when the next layout finished.

In this CL, we made the following changes to improve the above cons
- Postpone the schedule removing tasksnapshot (with IME) timing to
  after the app task has focused.
- Modify the tasksnapshot removal timeout (with IME)  from 350ms to
  450ms (with renaming to MAX_DELAY_REMOVAL_TIME_IME_VISIBLE),
  in case some edge cases may take longer time to process IME layout.
- add ITaskOrganizer#onImeDrawnOnTask(taskId) to notify the shell
  task organizer to properly remove the tasksnapshot without waiting
  until the max timeout.

[1]: I7865e17b57961e12a0cdcf068e412195123a6ec7

Fix: 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: I81031f64966b1aeb55cc09f381d4d83ec3460dc9
2021-09-13 18:01:56 +08:00
Bill Yi
d33678aeda Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I07982d191fa21baf91580868663b0937263ff855
2021-09-10 22:17:28 +00:00