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
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
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
The FrameLayout and SplashScreenView are only used as container in
StartingSurfaceDrawer, so they do not need to be inflated by app's
context, which could be affected by app's resources.
Bug: 197936273
Test: cold launch test app and show splash screen.
Test: launch several apps to verify that everything is fine.
Test: atest StartingSurfaceDrawerTests
Change-Id: I6de444546b5dfba23fc1d7c9c4deb12787d667c5
This is in preparation for attaching some extra meta information
to remote transitions (eg. process token). Most of this refactor
just replaces references to the raw interface with references
to the wrapper class.
There is also a small refactor in RemoteTransitionHandler to
better-manage death-recipients. It is possible to have >1 filter
and >1 pendings referencing the same remote simultaneously, so
this arrangement properly handles the 1-to-many possibility.
Bug: 183993977
Test: refactor, so existing tests pass
Change-Id: Icae8f2128e0ffdf7aee51284cba106963450e3e7
Merged-In: Icae8f2128e0ffdf7aee51284cba106963450e3e7
- This ensures that the caller can synchronously initialize the existing
displays without waiting for the onDisplayAdded() callback, which can
happen asynchronously (since the callback is oneway).
Bug: 196186963
Test: atest WMShellUnitTests
Test: atest ActivityTaskManagerServiceTests
Change-Id: I0a8d5f9b4ede7b487a8de14bdb6eaacae7d03d9f
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: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
Draw rounded corners beside divider bar which inset with task bar if
the task bar is expanded.
Bug: 196272915
Bug: 182511830
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I14c5a9416d52bf06b3e4c8ac843c5a65c0b940b8
Ignore PipLegacySplitScreenTest if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.
Bug: 189245318
Test: atest PipLegacySplitScreenTest
Change-Id: I6243f0b0990265c96867cb7ee87b6bd0b90330c7
Ignore legacy split flicker tests if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.
Bug: 189245318
Test: pass existing tests
Change-Id: Ic3dfbe849e7fcc9f25e44b7ff37ad00fdee60e9a
- Log split enter/resize/swap/change/exit as per
go/dragdrop_splitscreen_logging
- Pass drag session id and drop info to splitscreen controller
Bug: 191686897
Test: statsd_testdrive -e -terse 388 (and verify events from manual
interaction)
Test: atest WMShellUnitTests
Change-Id: I2d11bffa2fa41a2cd77e78b12d94082d19dc2d6c
When we collapse we'd update the selected state from the overflow to
the top bubble. This would update mExpandedView in stackView which
would mean the top bubble view would be told to animate instead of
the overflow even though it's still what's visually selected.
This changes the selected state to be set to the top bubble the
next time the stack is expanded instead of while its collapsing.
Bug: 196444758
Test: atest BubbleDataTest
Test: manual - navigate to the bubble overflow and tap outside, verify
that the overflow animates out just like if you were
collapsing from a convo bubble.
Change-Id: I1182d48916013dcc8aa15fb188543d8689b1f8a6
Previously bubbles were anchored to the edge they were
expanded on, with the expanded view next to it.
This CL modifies it such that the bubble expanded view
will be centered, and the bubbles will be anchored to
the expanded view.
BubblePositioner is updated to return the x,y of the
bubble. This allows an x value to be specified
to inset the bubble positions on large screens.
Updates phone landscape layout to have padding at the
top (to match with tablet layouts). The bubble
overflow is modified to be full height with top &
bottom padding in phone landscape.
Fixes an issue where we were scaling more than needed
in landscape.
Test: manual - check expanded layout in phone, phone
landscape, and tablet.
- check with gesture nav & 3 button
- check everything looks fine after a
display size & orientation change
Bug: 193910391
Change-Id: Iba4a3ac0932f716eea929fc0d8e8ef7f1b1e3f5e
From code flow, when onConfigurationChanged() by rotating
OneHandedBackgroundPanelOrganizer#showBackgroundPanelLayer()
will be invoked and then create one-handed-background-panel
even though OHM is not activated.
Besides, this could introduce overhead on SF.
Test: manual rotate and dumpsys check HWC layers
Test: atest WMShellUnitTests
Bug: 196306312
Change-Id: Ia766078d5c76b08ab5b24e0ce965ad1d085e4686
Before, when KEYGUARD_GOING_AWAY is called before WAKE starts,it will
not be passed to the keyguard service to dimiss keyguard. Now, we
merge the flags and add check for that.
Bug: 193564917
Test: check with/without sEnableRemoteKeyguardAnimation
Change-Id: I28d40664b4fbdc0ea199baa32ccefba7dea473f8
- Moved into DisplayInsetsController so that other shell components
can listen to changes as well
- Expose the insets to DisplayController's DisplayLayout so that we
can account for the extra nav bar insets from the task bar
Bug: 182905588
Test: atest DisplayInsetsControllerTest
Change-Id: Ie481282c9a71e02a77ce6b2cf8c2dcf4b8e452c6
Bug: 195699800
Test: dismissing stage split with divider bar will fling the divider bar
smoothly to the edge of the screen before split been dismissed.
Change-Id: Ic3bb2d9bc6da82773b7818c70dc535a5cea8e437
Shell owns the whole display rotation animation now. So, we
can just provide enough information for it to decide when
seamless is requested/appropriate. The default behavior (when
not explicitly animating) is already a jump-cut/seamless, so
just skip the rotation animation if we are doing seamless
Bug: 194693472
Test: atest SeamlessAppRotationTest ShellTransitionTests
Change-Id: I64748f5910c04784fd9818818b029fa5f1339c6c
On phone we use 60% of the screen which is huge on
tablet. This change uses 30% of the screen for the
flyout on large screens & enforces a minimum for
that value.
Test: manual - get a long message in a bubble on a
tablet, it should have similar width
as it does on phone.
Bug: 186776550
Change-Id: I500c566edd9941dc2bd149692eaf95c6e6f4aa61
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
These are needed for keyguard transitions. The ones added are:
A NOT requirement which will reject transitions with a matching
change.
The ability to match containers that aren't independent.
Checks for global transition flags as well as individual change
flags.
Match only if container is a task.
Bug: 191799478
Test: atest ShellTransitionTests
Change-Id: I963c6c91cdfc0b71a75ba9656261bb0e237f11f1
- Removing some tests related to dragging tasks to fullscreen and
dragging non-resizeable tasks (supported now)
Bug: 182981887
Test: atest DragAndDropPolicyTest
Change-Id: I492b69ab81964e94db2e23b3ee11093e62040a35
1. Fix bug in the legacy code flow
- Obtain color from contextThemeWrapper Theme_DeviceDefault_DayNight
- In OneHandedDisplayAreaOrganizer#finishOffset()
Remove redundant call "cb.onStartTransition" due to
ambugiuous.
2. Improve performance
- Remove redundunt callbacks.
- Avoid create/remove leash on each start/end cycle.
- Dispatch Transaction to bkg leash through onAnimationUpdate()
bkg leash apply the same Transaction of display area.
- Adjust animation duration of Tutorial panel.
- Move bkg leash depend on yPos value to reduce SF
componsition overhead.
3. Improve code readibility
- Code flow : Register -> onStart() -> show background ->
detach background -> Unregister -> remove leash.
- Remove redundant synchronization due to wmshell already
guarantee thread safe.
- Move getTranslationFraction to SettingsUtil.
- Move getTransitionDuration to SettingsUtil.
Bug: 194507756
Bug: 193589897
Test: Local verify when changing dark theme and wallpaper theme.
Test: atest WMShellUnitTests
Change-Id: Ib55753be9e9f4665c20ad34437f86bf80cc9f3b4
The top activity in TaskActivitiesReport can be filter out if the state
of top activity is INITIALIZING, this doesn't make sense for splash
screen, because the state of the top activity do can be INITIALIZING.
Create a filed targetActivityInfo in StartingWindowInfo to specify the
starting activity info.
Bug: 193459277
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ifec7aff644013a0426e0622162ab24f6b9fb3d8f