Commit Graph

1604 Commits

Author SHA1 Message Date
Andy Wickham b55d5b279b Merge "Adds back gesture recognition to Sandbox." into ub-launcher3-master 2020-03-20 20:23:16 +00:00
Winson Chung 925639d881 Merge "Fixing TouchInteractionService referring destroyed activity" into ub-launcher3-master 2020-03-20 19:04:26 +00:00
Andy Wickham 3e34dd3791 Adds back gesture recognition to Sandbox.
This is used to step through the "happy path" of the existing
back tutorial steps (right edge and left edge). Unlike in the
Pixel Tips app, the tutorial only continues if you perform the
gesture from the correct edge of the screen.

This also lays the groundwork to provide helpful tips if the
expected gesture is performed incorrectly, although currently
such gestures are just ignored.

Demo: https://drive.google.com/open?id=12S42mZQITGzIWnj7mP1L__PCOgAQcjgp

Bug: 148542211
Change-Id: Ib2e0b2ff7c021db48c96d58e1370fa2e93330912
2020-03-20 01:01:49 +00:00
Jon Miranda 42e7c503e1 Polish app open scrim animation.
We used to hide the scrim animation immediately, now we fade it out along with
the rest of the draglayer.

Also uses staggered workspace animation when resuming launcher from other
means ie. back gesture -> home

Bug: 145242991
Change-Id: Ib2161746f79ae5eaceac02d1416aa9bd7ecfeac4
2020-03-19 11:59:59 -07:00
Tracy Zhou 269f30fb9b Merge "Set default value of gridName to current grid name in GridOptionsProvider" into ub-launcher3-master 2020-03-19 02:17:19 +00:00
Tracy Zhou 42255d22a7 Set default value of gridName to current grid name in GridOptionsProvider
With grid preview, a grid name is passed in when requesting preview under different grid setting. With wallpaper preview, no such grid name will be passed in, and it should be set to the current.

Bug: 145242344
Test: N/A
Change-Id: I282cb5341b7f3756d41c4abd8d97f986abaa6d27
2020-03-18 16:52:28 -07:00
Lucas Dupin 4918ed38d2 Add wallpaper zoom to areas that have blur
Whenever blurring, the wallpaper should also zoom out. This is the
mental model of our Depth System.

Test: manual
Bug: 149792636
Change-Id: I1783eb87fefeb6f917f0ba64f2c6ec8f1f2004fa
2020-03-18 13:29:58 -07:00
vadimt 5e46f072b4 Fixing TouchInteractionService referring destroyed activity
Bug: 139137636
Change-Id: I2d36bcd9478e070e21cb6c8e2cde617807af8dd1
2020-03-18 09:42:38 -07:00
Jon Miranda c298078241 Add staggered workspace animation to keyguard unlock animation.
Added behind FeatureFlag.KEYGUARD_ANIMATION due to dependency on
Ie94ab8ecd35e9dcc28d0b8f7aaeb058e15b0f80b.

Added dynamic resource unlock_staggered_velocity_dp_per_s so that the
animation can be tuned.

Bug: 151238866
Change-Id: I4d349d32cc7d86be3cdc582c2a7c565be2931444
2020-03-17 14:27:35 -07:00
TreeHugger Robot c73071281b Merge "Moving animation config so a separate class" into ub-launcher3-master 2020-03-17 03:39:41 +00:00
TreeHugger Robot 7ea4409ca7 Merge "Fixing LauncherAnimationRunning referring a destroyed activity" into ub-launcher3-master 2020-03-17 03:07:35 +00:00
TreeHugger Robot 9aa000e4aa Merge "Apply localBounds / screenSpaceBounds for RemoteAnimationTarget in Launcher" into ub-launcher3-master 2020-03-17 02:54:02 +00:00
Sunny Goyal f3ac703256 Moving animation config so a separate class
Using PendingAnimation for animation builder.
This will allow us to easily add SpringAnimation to stateAnimation

Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-16 19:36:36 -07:00
Tracy Zhou cfe7efb7e2 Merge "Use SurfaceView to render grid preview" into ub-launcher3-master 2020-03-16 18:44:28 +00:00
Govinda Wasserman 5c042b3539 Merge "Adds fling gesture suppression to Launcher" into ub-launcher3-master 2020-03-16 12:12:56 +00:00
vadimt 76205b06ed Fixing LauncherAnimationRunning referring a destroyed activity
Bug: 139137636
Change-Id: Id070a98103a7116179e7ee66fabeeb33fb19b1ff
2020-03-13 18:32:46 -07:00
Tracy Zhou 85f0c3b841 Use SurfaceView to render grid preview
Demo: https://drive.google.com/open?id=1wQ8dT5bfTxSh-NRQpNBwTCkKOtOOUMPj

Bug: 150224413
Test: Manual
Change-Id: I44e7baed1bcd15351e03dcbeb2b525bc1b325478
2020-03-12 23:06:36 -07:00
Tony Wickham b6bc08ad57 Merge "Invert playNonAtomicComponent() as onlyPlayAtomicComponent()" into ub-launcher3-master 2020-03-12 21:48:42 +00:00
Govinda Wasserman fb4fe0e972 Adds fling gesture suppression to Launcher
Test: Tested locally
BUG: 150688842
Change-Id: Ifa96bd01363de47cf1d8cdce34d81d525c8c2c04
2020-03-12 16:46:12 -04:00
Vinit Nayak b9ec9319c5 Add fixed_rotation_transform to home settings
This sets the feature flag on launcher side
and also updates the setting in Settings.Global
Launcher DOES NOT listen to the Settings.Global
change from adb anymore. This should take
preference over setting it from command line.

Also fix a related swipe to home animation bug
that happened w/ merge conflict.

Fixes: 150260456
Test: Set and unset, visually verified behavior.
Tested w/ autorotate on and off.
Checked Settings.Global value correctly updated
via "adb shell settings get global
fixed_rotation_transform"
TODO: Update tests to reflect this new
default-on fixed rotation behavior.

Change-Id: Id95f006eb1e92a59e24b05567298fd21b1409b13
2020-03-11 19:38:33 -07:00
Tony Wickham 984c01cbcd Invert playNonAtomicComponent() as onlyPlayAtomicComponent()
This avoids the double negative we use in a few places, so should be clearer.
Also added some comments to explain what the animComponents are used for.

Change-Id: Ibd25bd12efce6553b377bbd9c0651e4f4ac3e498
2020-03-11 18:21:53 -07:00
Sunny Goyal 003782f93c Removing some properties out of AnimationBuilder
AnimationBuilder and PendingAnimation have similar logic. This will
allow to unify the two classes

Change-Id: Id8c1d8a7020d132adbccdc6c80538ed6556cb75e
2020-03-11 16:35:36 -07:00
lumark 7d861dd15c Apply localBounds / screenSpaceBounds for RemoteAnimationTarget in Launcher
This is to fix in Hierarchical animation (i.e. the animation will
reparent to parent container's surface control rather then a fixed
fullscreen animation layer),

TaskView surface in overview screen the position will be shifted
when entering split-screen mode.

Test: manual as follow steps:
  - Launching app from launcher to split-screen secondary stack
  - Swipe up to overview screen and drag TaskView to see if the TaskView
    surface is shfted, expected is not.
Bug: 148780840
Change-Id: Ia7e9c2649ae3e35747859c211a4299198c16db00
2020-03-10 23:15:22 +00:00
Hyunyoung Song d7c8441676 Merge "DeviceFlag change is not detected when phenotype updates." into ub-launcher3-master 2020-03-10 19:15:37 +00:00
Sunny Goyal dbcc63edeb Removing some autoboxing during property animation
Change-Id: Ibd6f20c565a4d66dc6d606b3f0bbc96fec66fe56
2020-03-10 08:43:55 +00:00
TreeHugger Robot 7dfe1360ed Merge "Show drag handle indictor in 2 zone model" into ub-launcher3-master 2020-03-10 00:46:11 +00:00
Tony Wickham 79a352169f Show drag handle indictor in 2 zone model
Note this is just the tiny arrow we show in accessibility mode, will
probably need to get some updated visual treatment going forward.

Bug: 143361609
Change-Id: I65975727f101984429aadc35a650826e36d9c9aa
2020-03-09 17:15:49 -07:00
TreeHugger Robot 590914cc5e Merge "Dismisses system overlays for Home intent." into ub-launcher3-master 2020-03-09 22:00:20 +00:00
Hyunyoung Song 3c1db273be DeviceFlag change is not detected when phenotype updates.
Bug: 151025334
Test: adb shell device_config put launcher FOLDER_NAME_SUGGEST false

Change-Id: I5e478aebfea5847cf7cbe7c0cb6cb0c6f81481cb
2020-03-09 14:10:35 -07:00
Tony Wickham b365cc4387 Fix crash when dumping before user unlocks
Bug: 150864182
Bug: 151050221
Change-Id: I29ba2ef66b4359a47f866d02306498537c45236e
2020-03-09 13:20:04 -07:00
Sunny Goyal cfaa4889e6 Enabling springs for start dismiss animation
> Adding flag support for PendingAnimation which can be used
  to define custom behavior for various animations
> Using SpringAnimationBuild for spring animation instead of
  SpringObjectanimator

Change-Id: I41ca34b0574981bb3fc7894639a321c12e6feac1
2020-03-06 22:59:03 -08:00
Andy Wickham 65ced1b1d0 Dismisses system overlays for Home intent.
Test: Used Facebook chatheads (not system bubble).
Before the change, Home gesture didn't work. After
the change, it does work :)
Fixes: 146593239

Change-Id: Ib9c85de2f83f99d1ef53fb17fde5d0b3c514849a
2020-03-07 04:42:32 +00:00
Winson Chung f655f5cd16 Merge "Initial changes to support blur" into ub-launcher3-master 2020-03-06 23:33:26 +00:00
Winson Chung 8687bc2131 Initial changes to support blur
- Add a new controller to update the background blur on either the
  launcher or app surfaces based on state or transition

Bug: 149792636

Change-Id: I6103cd3d53a00c8025558dd49bb73137e2980014
2020-03-06 14:45:20 -08:00
Samuel Fufa a579ddc9c8 Refactor logging to capture Target hierarchy
Instead of creating a fixed number of targets, we now pass an ArrayList
of targets to. Any class implementing
LogContainerProviders#fillInLogContainerData can setup it's own target
and add it to the ArrayList, It can also pass the ArrayList to other
LogContainerProvider to capture full Target hierarchy.

Bug: 147305863
Change-Id: I0063c692120fb9e1cff2d8902c5da972d0623418
2020-03-06 13:49:19 -08:00
TreeHugger Robot 51e71c70cd Merge "Fixing unregistering mOtherHomeAppUpdateReceiver twice" into ub-launcher3-master 2020-03-05 18:29:24 +00:00
TreeHugger Robot 0d0dd812f6 Merge "Update pullback start and max progress based on RecentsView scale" into ub-launcher3-master 2020-03-05 03:06:38 +00:00
Tony Wickham 34e88d0999 Update pullback start and max progress based on RecentsView scale
Instead of having defined constants that are hard to tune, now we
calculate the factors at runtime based on the launcher animation scale.
This ensures the pullback always has reasonable values regardless of
orientation, feature flags, etc.

Bug: 149934536
Change-Id: If07e3b87475f8f9613e94df00c394430aad7d507
2020-03-04 18:20:52 -08:00
Riddle Hsu 7a7468fd39 Invalidate snapshot of home if its UI is changed
Snapshot may be enabled for home task when turning off
screen. If home UI has changed after screen off, the
snapshot should not be used to avoid ugly visual effect.

Bug: 140811348
Test: Lock/unlock device while home is on top with 4 cases:
      1. All apps is shown.
      2. Overview is shown.
      3. Options menu is shown.
      4. Quick search bar is active.
      The expected result should be no starting window
      when unlocking because the snapshot is dropped.

Change-Id: I4bd9926b6f9332ac16b1b3a25ffdd44706015a33
(cherry picked from commit 0ae61c8d29)
2020-03-05 01:39:18 +00:00
Winson Chung 67457275e0 Merge "Register/unregister all apps system action with accessibility" into ub-launcher3-master 2020-03-05 01:24:03 +00:00
Hongming Jin d91cb6e75f Register/unregister all apps system action with accessibility
Bug: 136286274
Change-Id: Ia43d30b7cf078f56cc9887c8b3fb31924ad2b1b0
2020-03-04 16:24:05 -08:00
Sreyas 321bfae905 OverviewActions: Creating single view instance.
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.

Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
2020-03-04 11:38:59 -08:00
Vinit Nayak 5fcf061cb9 Set default launcher orientation to portrait
Also stop OrientationTouchTransformer from
spamming logs
b/150214193 should track properly handling
this in the future

Fixes: 146176182
Test: New vertical layout showed up when
swiping to Overview w/ landscape app.
Works for both autorotate on and off.

Change-Id: I3707cf7b5693be0fcf4d63491901f4ec00793f4f
2020-03-03 16:54:08 -08:00
Tony Wickham 294238a2fa Dump GestureState and created overview activity
Bug: 150525635
Change-Id: I6f5bf0f9c917845b6e880323dbba99552a9c43ba
2020-03-02 22:08:31 -08:00
Vinit Nayak acaf0749b3 Adjust target and src rects for swipe to home animation
Floating icon animation runs entirely in portrait
since that's what orienation launcher starts in.
Current app window target rects are in landscape to
be able animate to Overview correctly (which is not
in portrait since the leash from WM is in the same
orientation as that of foreground app).
Invert that rect as the animation from app window
to floating icon progresses.

Fixes: 148528795
Change-Id: Ie1149a1a8904afc80bd1986f8d67b6f2d88c49f2
2020-03-02 18:02:52 -08:00
Vinit Nayak a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Vinit Nayak 1901939be7 Modify input points to register in correct swipe touch regions
While the recents task list is frozen, launcher
will continue to listen for touch regions in
all orientations of apps it has seen while frozen.
Ex. Start w/ portrait app, then quick switch to
90-deg landscape app, touches in the navbars of both
those orientations will be treated as valid.
Once the task list unfreezes, only the orientation
that is currently displayed will have a valid navbar
touch region

fixes: 140116135
Test: tested manually in all 4 orientations with
quickswitch, swipe to recents and swipe to home
Attempted to write unit tests, but only basic ones
since there are some limitations on the MotionEvent
API for mocking

Change-Id: I8d3751571a939497b44e0dd249a0248299ba5ceb
2020-03-02 15:28:38 -08:00
Sunny Goyal 424e7fdf6b Fixing unregistering mOtherHomeAppUpdateReceiver twice
mUpdateRegisteredPackage was not cleared when unregistering
mOtherHomeAppUpdateReceiver

Bug: 150543327
Change-Id: I1058c0262588cbeb1d6c61299cb4d4c38d622d98
2020-03-02 13:33:43 -08:00
Hongwei Wang b08f2d7222 Indicate PiP animation type from Launcher to SysUI
Also, need callback from SysUI to Launcher once the pip animation is
started to keep back compatibility.

Bug: 146594635
Test: manually
Merged-In: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
Change-Id: I617a17fd5f6049d9f1d49f9f834623a2bb49f6ca
(cherry picked from commit a1a91b0c50)
2020-02-27 17:15:18 -08:00
TreeHugger Robot 5991eb8337 Merge changes from topic "new-task-snapshots-ub-launcher3-master" into ub-launcher3-master
* changes:
  Toggle loading state based on config_lowResTaskSnapshotScale
  Add config to enable snapshot preloading
2020-02-26 17:42:40 +00:00