Commit Graph

1733 Commits

Author SHA1 Message Date
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
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
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
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
Bill Yi
999cc105b3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4f8eec1615c3f186a2db9bf316c038e4aa111ab1
2021-09-10 22:15:59 +00:00
Vinit Nayak
2d113fb2a3 Merge "Update split screen interface to indicate dismissing to top task" into sc-v2-dev 2021-09-09 20:19:19 +00:00
Bill Lin
08898e3dde 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
Bug: 198739184
Test: atest WMShellUnitTests
Change-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
Merged-Id: I3994ab89fd6163c283969cc3175877e29b44c67a
2021-09-08 16:52:47 +08:00
TreeHugger Robot
99ce862e47 Merge "Fix an issue with bubbles overlapping the taskbar" into sc-v2-dev 2021-09-07 18:51:24 +00:00
Wei Sheng Shih
50c8b2d994 Merge "Adding the SurfaceView on splash screen thread." into sc-v2-dev 2021-09-07 10:45:02 +00:00
Tony Huang
6fbb385f24 Merge "Reset cached values when reset divider position" into sc-v2-dev 2021-09-07 06:27:49 +00:00
TreeHugger Robot
f64f48c526 Merge "Prevent NPE when checking focused stage before root task is ready" into sc-v2-dev 2021-09-07 03:35:16 +00:00
wilsonshih
bcb99535f9 Adding the SurfaceView on splash screen thread.
The SurfaceView of the AVD icon should be create on splash screen
thread instead of worker thread, this can guarantee that the first
frame of the FrameLayout and AVD will be draw at the same frame.
And it also become faster by combining two view in same traversal
together.

Also stop the AVD animation after splash screen window removed.

Bug: 195736516
Test: verify no more Choreographer#doFrame on splash screen thread
after splash screen window removed.

Change-Id: I5942db8974f1272d9c26ac19b164312e4424be66
2021-09-07 10:46:38 +08:00
Jerry Chang
553f62019b Prevent NPE when checking focused stage before root task is ready
If the root task of the stage is not created, treat the stage as not
focused to prevent trowing NPE when traversing the root task and its
child.

Fix: 199060332
Test: manual check isFocused won't throw before root task is ready
Change-Id: I3869f934b641c8ffd77730452d0501d65063785c
2021-09-07 09:20:49 +08:00