1) Add OneHandedEventCallback for WMShell to register
callback, and if one handed mode settings set show
notifications, when user tap one handed mode shortcut
notify WMShell send KEYCODE_SYSTEM_NAVIGATION_DOWN
through OneHandedEventCallback with SysUIMainExecutor.
2) Add isReady() flag in OneHandedDisplayAreaOrganizer
and Simplify the flow of onActivatedActionChanged()
to prevent potential race problem while auto-enable
One-handed and immeditately startOneHanded(), however,
DisplayAreaOrganizer#onDisplayAreaAppeared() may not
ready for transtion yet, and result mState keep in
unfinsihed STATE_ENTERING.
3) Adjust the transiton duration from 800ms to 600ms
800ms is a little bit long to affect timing of
apply runtime overlay package.
4) DelayExecute setEnabledGesturalOverlay() until
transition finised and at most delay once.
- onSwipeToNotificationEnabledChanged() : DelayExecute
- onEnabledSettingChanged() : DelayExecute
- Ctor setupGesturalOverlay() : No DelayExecute
- mState.isTransitioning() : DelayExecute
Test: WMShellUnitTests
Bug: 182425480
Change-Id: I2615c3b30ad95a858510b4bcc73d8f343843fc96
Included in this CL
- Increase the corner radius from 8dp to 16dp
- Scale the round corner radius in transition
Tested with the following scenarios
- Enter PiP in button navigation mode
- Double-tap to resize PiP
- Pinch to resize PiP
TODO
- Round corner when enter PiP with auto-enter being enabled
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gA2dQNBNTA8xFExWqmOkRY
Bug: 187441996
Test: manual, see video
Change-Id: I43db31f966007795351a8e2ca7dd08417f6f0df7
- large colored circle, uses same accent color that launcher
has for remove / uninstall
- added a shrink animation for the target when the bubble is
stuck via the magnet
- no longer desaturate the bubble being dismissed but rather add
a bit of an alpha
Bug: 183657564
Test: manual - get a bubble, drag it around & dismiss it, notice
the animation
Change-Id: If0d0d86b7389f0fa3314598266cd83ecabdc6a9b
* adjust the default spacing so that its small enough that 5 bubbles
can show on crosshatch (5 is the default)
* Add max bubbles to BubblePositioner, replace the other usages
Test: atest BubbleDataTest
Test: manual - have 5 bubbles
- adjust screen size to largest
- open the stack
=> notice that the number of bubbles have changed and
they all fit on the screen without overlap
- repeat & check the different densities
Bug: 187715444
Change-Id: I4794ed89541eeb573c367748f980cf7ffe45d3f3
* Update sizes of badge & bubble; also simplify some of the sizing
code, we can do it with just the overall size
* Simplified things, instead of the inner / outer sizes just use
the overall size
Test: visual - create a bubble and look at the size of the bubble and
badge
visual - have some bubbles, change display size, create a new
bubble & verify that all of the sizes are the same
Bug: 183657577
Change-Id: Ibd8609a8737bb0a57519fa70fba17138bb69b379
* 16dp on either side / from edge of screen for the bubble view
* 16dp between bubble row & expanded bubble rect (works out to 5dp
in code: 16dp - 2dp (badge overhang) - 9dp (pointer height)
* max 8dp between the bubbles in the top row
* manage button has some adjustments - 8dp above & below and is total
32dp from edge of screen; ensure manage button is centered between
bottom inset & bottom of expanded view
* fixes a bug where there was extra padding being at top of expanded
view in landscape mode
* removed an unused layout file & unused dimens
Test: visual - expand a bubble, look at spacing of everything on
screen; do the same in landscape from left and right
edges of the screen.
Bug: 187715439
Bug: 183658029
Change-Id: I29e699aaf9b6e7bf75447dac6aa6b00a7b272b8b
Let the icon size can be read accorss Launcher and WMShell.
Devices can overlay these values if needed.
Bug: 177264697
Test: Manual verify icon size on splash screen.
Change-Id: Ia9f76cd3f4a9869ae2966d59d9204e4df94119e5
- no longer show a pointer with the flyout
- use the same color as the notifications
- increase the padding slightly
Test: manual - create some bubbles and observe the
flyout
Bug: 183657745
Change-Id: I21ac5c1ce187e553e94ec41c81f9b43e8e914658
- Launcher will create a new surface which is faded in over the app,
and as it finishes the recents animation, we transfer the overlay
from the leash to the task (as with the transform), and when the
pip task organizer receives it, it can fade out and remove the
surface
- Fixes flash of status bar colors when going from light status bar
to home (dark status bar) by deferring whether a task affects the
sysui flag until it enters pip (only for autoenter)
https://recall.googleplex.com/projects/e3f080d7-2818-43f0-a087-405000b8fdf5/sessions/971a84c8-a622-4b34-a9de-4e595595da42
Bug: 184703546
Test: Swipe up from app with auto-enter but no source hint rect
Change-Id: I0a00cdb98d0a599ef065206e0cd2cfc0e6cc72b1
Bug: 186479769
Test: Use talkback, open up menu, tap on "Stash", see PIP stashes;
tap on "Unstash", see it unstashes
Change-Id: I617f078cee888ea4f592173c67b25d43fb4e9cd1
This CL polishes the app reveal animation after a cold start. It does so
by:
1. Fading out the icon during 233ms before revealing the app, as spec'ed
in the direct [1].
2. Animating the reveal gradient opacity from 0 too 100% (instead of
starting at 100% opacity directly).
See b/184830058#comment7 and #comment13 for before/after videos.
[1] https://direct.googleplex.com/#/spec/241550001
Bug: 184830058
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ie4561887a259eec398f8f347050f27a094026945
- Add a temp flag persist.debug.enable_reveal_animation so user can
enable reveal animation.
- Remove icon shift animation.
- For shift up animation, use AnimationAdapter to capture the surface
control and pass to Shell, then cancel the animation when
WindowState#removeIfPossible for starting window.
- Fix the flicker test fail issue caused from shift up animation, the
surface control should be release after the last frame was commit.
- Use SyncRtSurfaceTransactionApplier to synchronize the shift-up
animation, and use vsyncId to ensure the transaction doesn't applyied
too early.
- Do not play reveal animation for empty splash screen.
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Bug: 183004107
Bug: 182815506
Bug: 184830058
Change-Id: I4fc8456633b3f4ecd69b168e0222915945210426
* Width is restricted via padding applied to the view when the device
is considered large screen
* Adjusted animation code so bubbles slide in from edges when showing
vertically
* Overflow uses max height available when on a large screen
* Fixed a bug where overflow height wasn't being updated correctly
since it's no longer using an activity
* Fixed a bug where when the view was expanded & you rotated its
position could be off
Test: manual - expand bubble on large screen from left / right edges
in landscape & portrait
=> bubbles should be anchored to edge they are opened from
& positioned vertically along the edge
- expand bubble on phone in portrait
=> bubbles should be anchored to the top edge &
horizontally
- expand bubble on phone in landscape, check overflow
=> bubbles should be anchored to the edge they are opened
from & positioned vertically along the edge, the
overflow should have a restricted width
Bug: 175211639
Change-Id: I7c3f3024260a08ebdf4c6e7c7724e51fbc480f61
Per discussion, will keep the two classes in Launcher and WMShell as for
now and re-address the unification in next release. In this change
- deprecate config_pipEnableRoundCorner since it's now behind a system
property and waiting to be turned on
- pass the corner radius value from WMShell to Launcher
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dmUy8qBEMxHShFcFKB3cT3
Bug: 171721389
Test: make sure autoEnterPip has round corner support, see video
Change-Id: If978ee6c3b0307a7423fe51b996f535d7009e74c
Enlarge the basic icon visible size to 160dp, and loading higher icon
drawable if available. For replaced icon we also enlarge the visible
area.
And if the icon does not need to draw the background, apply another 1.3
times scale than normal case.
TODO: need to handle legacy icon.
Bug: 182883560
Test: atest SplashscreenTests
Change-Id: Ia72a72a743a7ef5f80f247393c1a5bd0b6653a48
To provide a new Interpolator formula for One-Handed transition
animation.
Bug: 178355565
Test: manual
Test: atest WMShellUnitTests
Change-Id: I78d998569618dc52c8b6fce6cb4a71f13ad01ba8
This is done by disabling all the trigger points (the 4 corners). Will
hold off on removing the entire code until later in case needed.
Bug: 179299163
Test: Manual. Dragging from the corner no longer works
Change-Id: I4ed931245cbb49647feeff8b37174f6502fe9c5e
- Skip hiding the menu when not resizing and going from CLOSE -> FULL
state
- Separate enter/resize/exit animation durations, make the button
dismiss anim a little faster as per mocks (will probably need to be
tweaked further)
- Remove the slow menu fade as well to get closer to mocks, it's
already got a fade out interpolator
Bug: 183756396
Test: Show/hide the pip menu
Change-Id: Ie10d03cb3e26253498d668ffde1a822530bbf598
Implement default exit animation on the view of splash screen, there
will be a two layers switch happen when playing exit animation. For
the detail please reference
go/improved_app_launch_animations and go/app-startup
Note: For this version we skip shift-up animation, need to fix the
flicker test so we can enable it.
Note2: Fix the possible missing splash screen view issue, but could
make the first window draw slower, keep tracking.
Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests ShellTaskOrganizerTests
WindowOrganizerTests SplashscreenTests
Change-Id: I796811d010ac70f256169dd03d5e05ef0ed79d28
- Decreases the menu action size
- Wraps custom actions into PipMenuActionView and restricts the size
to be identical to other PiP actions such as settings and dismiss
- Removed unused pip_menu_activity.xml layout
Screenshot: https://screenshot.googleplex.com/6LFk5WJFfC4FQyA.png
Bug: 179312210
Test: Enter PiP and tap to show controls, see screenshot
Change-Id: I9de63be60ff66ee5198785885a28d495f1fb7af3
Create new APIs for developer to customize starting window
- windowSplashScreenBackground: specify the background color
- windowSplashScreenAnimatedIcon: replace center icon on starting
window, and it can be animatable.
- windowSplashScreenAnimationDuration: the animation duration if
the replace icon is animatable, it cannot exceed
max_starting_window_intro_icon_anim_duration.
Support ADV to replace the icon on starting window.
Ref doc: go/improved_app_launch_animations
Bug: 73289295
Test: build/flash
Test: check splash screen starting window.
Test: atest StartingSurfaceDrawerTests SplashscreenTests
Test: atest ShellTaskOrganizerTests
Change-Id: Id3de3e9b57d769f096baf43713c1e3c327ecfdc8
Refactor SizeCompatModeActivityController to WM Shell. The old one will
be removed in separate cl as there are some dependencies in other
packages.
This cl is mainly for refactor. Major change will come after.
Besides refactor, also changed the mActiveButtons key to TaskId, because
launcher Task will also trigger onTaskInfoChanged, but should not remove
the restart button on the same display.
Bug: 176061101
Bug: 178327644
Test: manually verify that the size compat restart button works as usual
Test: atest WMShellUnitTests:SizeCompatUIControllerTest
Test: atest WmTests:SizeCompatTests
Change-Id: I9143e079a1a945b76c3c56596976dd6ad2802897
PiP window stays same on tap if it's large enough to hold all the
actions within it. Ignore the artifacts in demo video such as the shift
of settings button and menu resize out of sync, they are tracked in
separate bugs.
Video: http://rcll/aaaaaabFQoRHlzixHdtY/hkQgdmbuBhNT0WdKW8aegL
Bug: 175055101
Test: See video
Change-Id: Ie19b30dd1e8ba716095b76a3f341b5ab2a51399b
the screen has entered one handed mode
Add a new DisplayArea feature color background layer to fix it.
Bug: 157124724
Test: manual
Test: atest WMShellUnitTests
Test: atest DisplayAreaPolicyBuilderTest
Change-Id: I16beddb182125551621d0083dba2f259140d7b78
This is the first step towards moving letterbox gravity logic from WM Shell to WM Core. It's important to do this even before the new implementation in WM Core is ready because surface repositioning in WM Shell causes visible flickering on rotation for all apps on devices with cutout.
Fix: 174632285
Bug: 175212232
Fix: 173440321
Test: atest WMShellUnitTests
Change-Id: I2b3706a1a46bb2c7ee4bb3789fb09b216e32f290
This will enable some stuff for taskbar & hopefully make customizations by
ARC++ easier??
- BubblePositioner now tracks the size of the bubble & bitmap within it.
Have to use a multiplier to derive the size of a couple of things now
(e.g. bitmap size)
- BubblePositioner now tracks the position of the bubble stack & allows
a way to override / set a fixed position. If something is in fixed
location, it is not draggable (however when expanded you can still
drag individual bubbles to dismiss)
- BubblePositioner tracks some taskbar related info
- Rather than checking for "isLandscape" we want "showBubblesVertically"
(e.g. device might not be landscape but should be vertical if taskbar)
- Fixes an animation issue where bubbles super-overshoot the y position
when expanding vertically.
Bug: 167413172
Test: a lot of manual testing
Test: atest WMShellTest SystemUITests
Change-Id: I79948a4bd6b58fb3aa2f52e2553f3dfc31630cf1
Move bubbles package and related resources to shell package,
also copied some used codes and resources.
Bug: 161980186
Test: atest SystemUITests
Test: atest WMShellUnitTests
Change-Id: Ia108bd4149b3c3bf86631ba1a7a6bce0e76af78f
- Add private window flag INTERCEPT_GLOBAL_DRAG_AND_DROP (protected by
MANAGE_ACTIVITY_STACKS permission) to be considered as a part of the
normal flow for global drag and drops even if the window is not
visible. In addition, the window with the flag receives the clip
data on DRAG_STARTED and the drag surface on DROP. If the window
consumes the drop, then it will relinquish cleanup of the drag surface
from the system.
- Add MIMETYPE_APPLICATION_ACTIVITY for an app to report that they are
starting a global drag of an activity. The associated data must
include an intent with the pending intent and user to launch the
activity for.
- Add a test drag handler on the shell end to receive the drag, setup a
drag layout, and just launch the intent (for now).
Bug: 169894807
Test: atest DragDropControllerTest
Test: atest DragDropTest
Change-Id: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Merged-In: I7f5cdca3cf515b693a8f1e507e90e22a670b5fa6
Signed-off-by: Winson Chung <winsonc@google.com>
or left the one-handed mode
Add start/stop one-handed mode text to an AccessibilityEvent
enabling Talkback talks.
Bug: 157121791
Test: manual
Test: atest SystemUITests
Change-Id: I29fa8d7221ecb661df90a3c929e36815aa989ae2
Move OneHanded related codes, res and tests to WM shell.
Some tests add ignored currently due to permission issue.
Add another bug to trace it.
Also fix animation issue caused by wrong logic.
Bug: 161980408
Fix: 168074363
Test: manual check one handed function
Test: atest WMShellUnitTests
Test: atest SystemUITests
Test: make ArcSystemUI; make ArcSystemUITests
Test: make CarSystemUI; make CarSystemUITests
Change-Id: Ib25661d010278202ffe15fd9c4962e76e6698c21