Commit Graph

1581 Commits

Author SHA1 Message Date
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
Evan Rosky e7e91fd60e Connect split-screen things to systemui divider
Since divider stuff lives in sysui instead of framework

Bug: 133381284
Test: Manual, open 2 apps in split and drag-up to show
      recents.
Change-Id: If6740b7ee4829bf4cac6e829e81943f16a41f977
(cherry picked from commit 3ef159becd)
2020-02-25 23:42:42 +00:00
Sunny Goyal 93c4de7413 Setting interpolator beforehand, instead of overriding it after the pending
animaiton is created

Change-Id: I7caec2eeb86084591fa627518d064b7ebb895d65
2020-02-24 16:45:11 -08:00
Sunny Goyal d2c56525bb Merge "Using LeastSquaresVelocityTrackerStrategy for calculating velocity when detecting motion pause events. This is the same logic used by the platform implementation VelocityTracker" into ub-launcher3-master 2020-02-24 18:30:13 +00:00
Sreyas a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Peter Kalauskas 5bb63c916e Toggle loading state based on config_lowResTaskSnapshotScale
Change high res loading state implementation to toggle on/off based on
config_lowResTaskSnapshotScale!=0 instead of ro.config.low_ram=true

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I316e553a8a13fe38f1224c38f7aa717a0f628f57
2020-02-21 23:36:58 +00:00
Peter Kalauskas 03c8f296cd Add config to enable snapshot preloading
Enable preloading if config_enableTaskSnapshotPreloading instead of
assuming it should be off for all low ram devices. This allows it to be
configured via an overlay.

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I9e3320dcff5b710e110cc7199c41c5a004991592
2020-02-21 23:35:37 +00:00
Sunny Goyal a173193afa Using LeastSquaresVelocityTrackerStrategy for calculating velocity
when detecting motion pause events. This is the same logic used by
the platform implementation VelocityTracker

Bug: 139750033
Change-Id: I87aabd46e58a5caa1395be3a63fd38d0ee75e355
2020-02-21 15:28:06 -08:00
Andy Wickham 63b7f36338 Renames BackGestureTutorialActivity to GestureSandboxActivity.
Bug: 148542211
Change-Id: Iaac537380b02f1c52f967748c30fe49ac36bb91e
2020-02-19 21:12:11 +00:00
Andy Wickham 1e33123a0b Merge "Allows multiple gesture blocking activities to be specified." into ub-launcher3-master 2020-02-19 21:11:20 +00:00
TreeHugger Robot 6eebaab5d6 Merge "Updating Pause detection to use motion events directly" into ub-launcher3-master 2020-02-19 20:10:59 +00:00
Samuel Fufa aeb185e744 Merge "Clean up work profile" into ub-launcher3-master 2020-02-19 19:53:38 +00:00
Samuel Fufa ccebfbe273 Clean up work profile
This includes
- Dismiss work edu on launcher state change
- Remove work tab flash on first setup
- Make edu bottom sheet adopt theme color
- Fix Work toggle bottom inset


Bug: 149200572
Bug: 149197172
Bug: 149199058
Bug: 149215103
Bug: 149198955
Bug: 145595763
Bug:149481723

Test: Manual
Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
2020-02-19 19:33:09 +00:00
Sunny Goyal c3bd4d0e75 Updating Pause detection to use motion events directly
Bug: 139750033
Change-Id: Ib261b203fec941f3c5303eafc1d435efdf3dbcaf
2020-02-19 11:32:20 -08:00
Andy Wickham 3b0c1f3aca Allows multiple gesture blocking activities to be specified.
Bug: 148542211
Change-Id: Ie299359eb2df60f5f08d156dc6882fa133fab27c
2020-02-19 18:12:41 +00:00
Andy Wickham 2d0f79b7bb Merge "Disables Back gesture while sandbox is running." into ub-launcher3-master 2020-02-19 17:12:26 +00:00
Andy Wickham 017c8d52d5 Disables Back gesture while sandbox is running.
We'll want to detect this gesture ourselves to distinguish
between left and right edge and update the UI accordingly.

Note: This exclusion only works if the sandbox is launched
into the same task as Launcher (i.e. from Launcher itself).
I haven't found a way to get this to happen over adb.

Test: Launched BackGestureTutorialActivity from Launcher
and verified Back gesture animations did not play and the
onBackPressed callback was not called. Verified these did
still work in other apps.

Bug: 148542211
Change-Id: Iebc3428738edbf8ebfcff157f5952b787eb46bac
2020-02-19 00:27:40 +00:00
Zak Cohen 3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Winson Chung a7c931dd49 Merge changes I29dab94f,Ie13db509 into ub-launcher3-master
* changes:
  Fix issue with out of order callbacks
  Skip setting end target if the recents animation was canceled or ended
2020-02-14 01:15:04 +00:00
vadimt 3a49aa090f Enable testQuickSwitchFromApp after fixing what caused it to fail
Bug: 143285809
Change-Id: Ic7895ab7d4ef3ab207fc77184eb53f0f6d8e9b23
2020-02-13 16:14:15 -08:00
Winson Chung b53573d651 Fix issue with out of order callbacks
- If any call to finish the recents animation comes in before
  onRecentsAnimationStarted, we'll clear the callbacks but the listener
  registered in startRecentsAnimation will persist.  Since the call
  to actually finish the animation with the system is posted on the
  main thread, if the animation started callback returns in that time,
  the controller will be set (via the listener) but the callbacks will
  be unset.  Instead, we can clear all the listeners from the previous
  callbacks when cleaning up the animation.

Bug: 145758818
Change-Id: I29dab94f5fb25f762a823d59ef318a361282b595
2020-02-13 16:07:44 -08:00
Zak Cohen 88ea05ad39 Overview actions - bring UI closer to redlines.
Test: local
Bug: 139828243
Change-Id: Ia1cb0fc1c111a6a22fa4b4a98b43cd9ac1869a2c
2020-02-13 14:29:24 -08:00
Tony Wickham f6dde3966a Add some more data to TouchInteractionService dumps
- Dump OverviewComponentObserver (to check if we're using 3P launcher)
- Dump current enabled and disabled plugins
- Dump all debug FeatureFlags instead of a few handpicked ones

Bug: 146174627
Change-Id: Ic8df899433b0e42d0e05eb1c80c87f62d3b936b6
2020-02-13 11:40:25 -08:00
TreeHugger Robot 6351eb4737 Merge "Reset launcher on shortcutconfig activity minimize" into ub-launcher3-master 2020-02-12 23:43:10 +00:00