Added new SpringObjectAnimator class that wraps an ObjectAnimator so the
Object can be controlled via the Animator or via a SpringAnimation. It extends
ValueAnimator so that it remains compatible with AnimatorPlaybackController.
Code is behind feature flag toggle QUICKSTEP_SPRINGS.
Bug: 111698021
Change-Id: I1b20179ede37e89a6a6bb2a45d407cc74c99ac4e
- Set padding based on insets (same as noraml nav) rather than
available height (more than normal nav)
- Fill whole screen for quick switch
Bug: 111699315
Change-Id: Ia1392cc0b1ed3600635dbce76d8b945f0337d7cf
This will help keep the code clean when we add more params, e.g. for
live tiles and for the scrolling gesture.
Bug: 111699315
Change-Id: Ia9df40ae85fe29911b957bd9b06b8c8a31f3be39
This way we can update the insets of the adjacent task throughout
the swipe up from an app.
Bug: 111699315
Change-Id: Ieeaa5b6667e44f82e7e097acb9f0552609b15809
This would guaranteed to repro b/118441555 before it was fixed.
The test doesn't use the most powerful feature of race condition
reproducer, which is enumerating all possible event sequences.
Instead, it uses explicit repro sequences, which makes the test much
faster.
Bug: 120628042
Test: The added test
Change-Id: I89a7a9964f160a8a20ba3d9dda2f248237713014
Activity manager can report launcher activity as running when is hasn't
yet been resumed.
Bug: 120628042
Test: TaplTests, Fallback tests, manual tests
Change-Id: I6b382b17d05066a63360acc19e094674ecca7130
- When the launcher activity is killed, the next init will attempt to
create a sync applier, which uses the ViewRootImpl of the target
view. But when onActivityInit() is called, the recents view has not
been attached to the hierarchy so the view root is not accessible.
The SyncRtSurfaceTransactionApplier also ignores scheduling all
updates when it has a non-existant view root, which leads to the
app surface getting stuck midway during a swipe up (only affects the
duration of the animation)
Bug: 119661847
Test: adb shell am force-stop com.google.android.apps.nexuslauncher
then try and swipe up slowly
Change-Id: I8eef9fe38c55c0cb438d63b41c335f78679278a3
The size of the window changes during the animation progress, making the
window look rounded for longer. What we want is to animate it from the
shape of the icon to the shape of the display.
Change-Id: Ib4889b697bf78cdc37c160130fde961650080fb7
Fixes: 120553563
Test: visual
Navigation bar can show on non-default display now. So the caller
should specify which display the desired navigation bar is on.
Bug: 117474929
Test: atest Launcher3Tests
Change-Id: Ibb22e51730ab145a42a129b4d964299acd4efd56
(cherry picked from commit f1bb3a4d4c)
Test: Manualy launch an app
Test: Press home when activity is on top of the stack
Test: Quick scrub
Test: Swipe up on the home button, swipe down
Bug: 111514493
Fixes: 116745318
Change-Id: I66d25bc433061ede46107ea9651c198614306692
(cherry picked from commit faa443308e)
Previously we were comparing the controller's progress at the time of
the end of the animation... which is always 1. Instead, we should be
comparing the effective final progress based on the interpolator.
Change-Id: I18110b5a3b914839860931187f39cfa11182b3e2
Using View#getDisplay().getDisplayId() into
IWindowManager.overridePendingAppTransitionMultiThumbFuture()
for multi-display support.
Bug: 119530958
Test: manual
Change-Id: Icde73b2545f879771a62030c8151a86a324fa593
(cherry picked from commit 233622d907)
No UX spec is ready, so using some placeholder layout.
No attention to string localization since I feel that strings may
change, compared to current mocks.
Not using remaining-time API, as it is not ready.
Bug:118319143
Test: Manual
Change-Id: I50cff9099677db543e95963f058d3e89eab07d8f
When the developer option for freeform is enabled, provides
a "Freeform" option in the recents task overlay menu. This
is sort-of an analog to the freeform option in N recents;
however, since recents now is part of home, there's no
straightforward way to have multiple freeforms at a time,
so this really is only useful for developers.
Bug: None
Test: manual - enable freeform in dev settings, then pick
Freeform from recent task overlay menu.
Change-Id: I5d8e95aaffb8fe43e655f705cacdd51859c95d3b
(cherry picked from commit 9beb6bf251)
It used to be an invalid state to create a new dismiss animation while
one was pending, because the only way to do it was to swipe up. However,
now there are a number of places we create the dismiss animation, e.g.:
- When entering split screen
- Clear all
- Uninstalling an app
So now, instead of calling this an illegal state, we simply cancel the
previous pending dismiss if it exists.
Bug: 118880699
Bug: 118400078
Change-Id: I4d073f7e9d50e832ba4ae55391530040a0fac50c
Deferring the window tracking when touching down on the back button means that
we don't set isQuickSwitch before setting the state to FAST_OVERVIEW, making it
not scale up to be full screen. To fix this, we reapply the state when preparing
QuickScrubController for quick switch.
Change-Id: Ib3dcf300c45a00673ff9337f98d16d4e8cdf1ea0
There was a race condition where we were getting onQuickScrubProgress
before onQuickScrubStart. If we got enough of those, we were jumping
some pages before the block is set in onQuickScrubStart (which also adds
its own page jump). Now we don't send any onQuickScrubProgress() to
QuickScrubController until we have sent onQuickScrubStart()
Bug: 118636260
Change-Id: I60084850b0b1baad34112ab5945fce81cc3a3c53
- The click listener should be removed, otherwise, it can still active
and clickable when the TaskView is bound to a new Task whose icon
has not yet been loaded, which can cause crash.
Bug: 118834133
Change-Id: Ifd9fd8fe99b6177851d366f0c21f8fad59f1950e
setAlphaComponent throws expetion for invalid range, which can cause brashes in overshoot
interpolation
Bug: 118390004
Change-Id: Ic9c5ff3d660eba353b982c4c47ccfaf329b3e296
This removes some crass dependency on Launcher compat implementation
making it easier to move iconCache to a separate library
Change-Id: If5fab0c82d98089cde6f54b6a374fb7bb2db5ae8
Since the DragLayer translates downwards, we no longer need the scrim fade
animation to avoid the hard scrim line.
Bug: 117677608
Change-Id: I4cd524d798579289d61bfe296f6de42bd22b0cb7
- Scale down current task and translate it to the left
- Translate previous task in from the left
- This is a toggle; quick switch again returns to the first task
Currently this is implemented by repurposing onQuickScrub(progress) to update the positions
of the first two pages. This makes tracking velocity a bit difficult; if we want to go down
this path in the long run we should probably track velocity properly on MotionEvents.
Change-Id: I4445b5f08b6e88e71cbb5e30b1f1d45c5f1edc68
In QuickScrub mode, the right task gets clipped out at the end of the animation. This is because LauncherLayoutListener continues to clear out where CurrentRect is, while the app surface is not displaying. We want to finish the listener after the transition animation.
Bug: 111697218
Test: Manual test
Change-Id: I4dd5f5cbcec0574082fd1463e07c116a9e9305d3
> Combining both preference into a single screen
> Adding plugin preference screen so quickstep build
Change-Id: I3d2ff3ebdac3c774659e79ecb81be6f75f765eb0
- Place Launcher above app surface.
- Use LauncherLayoutListener to clear the area where the current task is in order to punch a hole and reveal the app view underneath
Bug: 111697218
Test: Manual test
Change-Id: I4d4e0f1113a8e60566257c030ae9b591789eb3b3
Will transition to an API for opening settings if this CL lands:
ag/5338673.
Bug: 118319143
Test: manual test on a prototype
Change-Id: Ia40576e0cd6196bfb0a0e8657916bbadff4c0b59
- Clarify caching policy, we only cache the last N task snapshots
- Pull out necessary logic from RecentsTaskLoadPlan (deprecated) into
launcher class RecentTasksList which also manages the invalidation of
the last loaded list
- Pull out logic from task loading logic in the shared lib into separate
classes TaskThumbnailCache and TaskIconCache, and have each task view
manage the load request for data
Bug: 117603579
Test: Thumbnails still load
Change-Id: I938e4dea19e7f5d24724c32194d254ca003e89aa
Sometimes onStateSetImmediately gets called upon swipe up, especially when the phone just get unlocked.
Will add a test following this change.
Change-Id: I2d7117ae919663385b300433eceb063af09a5431
BUG: 113629419
Test: Manual
and remote animation callback comes after threshold is crossed
The transition length is updated when removeAnimations is received.
If the gesture delta is crossed before that, we were ending up in
long-swipe mode as due to an incomplete check.
Bug: 117549010
Change-Id: If5471c538ac51b84f176a1fad42112e84046da63
- Apply the initial scale to overview while it is in the backround app
state to ensure the side pages are positioned accordingly. Since this
affects the computation of the target rects for the overview
animation, also ensure that we calculate those with the final target
overview scale applied.
Bug: 117439562
Change-Id: I5e00cf1683e31b22cf937b966d52f8cbe745aaba
> getBitmapInfo() is called on background thead which blocks
on the main thread to get InvariantDeviceProfile
> getDefaultIcon() can be called on the main thread, which
would get blocked on a previous call of getBitmapInfo()
Bug: 117588621
Change-Id: I6549398c7e0a49284fe59950965495074ab8cdd0
- Skip handling loading visible task data after resetting overview, we
currently keep the tasks bound to their task views (some calls are not
synchronous with the lifecycle of recents, can be changed later), so
the next call to loadVisibleTasks before the tasks have been loaded would
load snapshots for old tasks
- Skip loading tasks if the previously requested load plan is still valid,
this can happen because setCurrentTask() will be called multiple times
during swipe up
Bug: 117603579
Change-Id: Ie58ded14dedbb3934d08163ca7939d89310c3ecf
- Add libs/plugin_core.jar
- Include plugin_core in Launcher3 build (it is already present other
builds as part of the updated shared lib)
- Add PluginEnablerImpl that uses SharedPrefs to enable/disable plugin
components
- Add src_plugins, where plugin interfaces will live. It has a build
rule to create a jar that plugin projects will depend on.
- Copy PluginPreferencesFragment from sysui but using our implementation
for PluginEnabler
Bug: 115877296
Change-Id: I3db54677eaceb10f92018c0f9d18920ad9ffac39
Also, fix rotation as Portrait as starting poin for all tests, to avoid
tests running in unexpected configuration.
Bug: 115645301
Test: run all Nexus tests
Change-Id: I3ab0e91db111eeefda77af2960c43962a119de0c
- Return the user to their previous state if quickscrub fails to launch
the new task (ie. if it finishes itself mid-launch).
Bug: 117163033
Change-Id: If03cf0431be40d9b81dfcc5dffcb2bf4844bbbd2
- Now that we are controlling the launcher app surface as well while
swiping up into overview, skip applying the crop to any opening
remote animation targets.
Bug: 70341013
Test: Swipe up, and ensure everything still works
Change-Id: I87b4021c0fc0e2997185d4d12f26b2e06999ff57
- Keep rudimentary log of the last few gestures for dumping with the BR
- Also renaming updateInteractionType since we only use it to change
to the quickscrub starting interaction type now, which is less
confusing
Bug: 112783625
Change-Id: Ic024684caf2841cd7c09df9481163ea0c0ae03bd
Bug: 115891474
Sending out the package name changing CL first before I make
LauncherIconsHandler and tests around it.
Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
If for some reason, the animation is not created (eg in case of forced rotation),
we should also skip scaling down the icon so that the final UI is always in
a consistent state.
Bug: 78793089
Change-Id: Ie3e8b6d14b05ee983bc5e12401c1fa078034e392
This fixes the issue where dragging down on full screen apps was
offset by the status bar even though it shouldn't be.
Bug: 77979532
Change-Id: I8cb17778c4ae66b1821e86dd757626f875a27d2d
When controlling from launcher activtiy, there is no activity focus change, and rotation
lock is not required.
Bug: 114074832
Change-Id: Ia976f9daa9b0f87d3493138d12cb37a490b8b1bd
When using overview button, we skip the activtiy animation, which leads
to wrong state. Instead always running the animation and changing the endpoints
accordingly.
Change-Id: Id071b4e74da42c78760519aa29644621afc822e2
This makes is simpler to control the swipe to overview UI, and ties the
transition with the state machine
Bug: 113287120
Bug: 79755195
Bug: 112203163
Change-Id: I3041dbb659b46ccea6284855addc91e370815be6
- It can cause a deadlock with other synchronized calls on a background
thread that use a MainThreadInitializedObject
Bug: 112744388
Change-Id: Icbfe6fe84de41eeb19f68014905154dfca988288
- Offset distance based on where gesture started, so that the shelf is
always under your finger even if you swiped up high on the nav bar
- Use the same distance when swiping down to launch a task as we use for
swiping up from an app (so that the swipe feels more reversible)
- Allow swiping up in the gap between hotseat and overview, so there's
no "dead zone"
Bug: 109709720
Change-Id: I828d82e8feb250fd31e382d42aeefcb11d4a07d5
- Also move some allocations in ColorExtractor into thread locals to reduce
allocations
Bug: 78777731
Change-Id: I8819106d476a9af02e864135a2f44b55fe9219cd
Static dependency does not work in the presence of multiple activities and
when the main activity is not Launcher (eg in fallback recents). Instead
creating FirstFrameAnimatorHelper on demand for individual animations.
Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)
Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.
Instead associating a target with various animations which automatically
cancels the animations when that target goes away.
Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
Now that pressing back launches the previously running task, it's
possible to get TaskView#launch() when the TaskView is not on the
screen (i.e. user scrolled before pressing back). In this case, we
shouldn't use the launch-from-recents animation, as that animation
assumes the task view is the current page or an adjacent one.
Change-Id: I7bec91c9437954061affdedc8cd9e48820ce7357
Smaller devices or landscape with splitscreen can show more than one
task icon in overview. Tapping the icon when not in the middle will
scroll the task into the middle and open at the same time.
Change-Id: I0fe261e9a1b8ab6ad7e6c6ea64125a9c7b38da39
Fixes: 110371874
Fixes: 111446332
Test: splitscreen, overview in landscape, tap non-centered task icon
It appears large because the pressed state of the view increases the scale,
and we want to leave the pressed state until the activity is launched.
With the remote app transitions, we now have a callback for when the activity
is done launching so we then cancel the "stayPressed" state.
Bug: 111742067
Change-Id: I25725e908b12f4dd1256294a26232b289db2d057
The public API of the library has finalized; flakiness has been removed;
code polished.
Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
When swiping up to overview from an app, we scale down RecentsView in
launcher, synchronized with the app window. In rare cases, however,
there may not be any TaskViews in launcher, so we should just ignore
the launcher component in this case. For example, this happens in
LockTask mode.
Bug: 110703110
Change-Id: Ib6f836581a3e12babf4e26e272b77bb529f86fd4
- When hitting the home button, we may be loading high-res thumbnails
unnecessarily since the high-res loader is already enabled when
Launcher is started.
Bug: 111515602
Bug: 111156069
Change-Id: I367993b4ddf653b816355df005c745caed5e794a
Use scale listeners to track each other's icon scale to match them.
Test: go to recents and long press icon
Fixes: 110789415
Change-Id: I9bba3130ecf1d099db9708c84e709d16f5906c36
transition is not complete
> This state change causes the RecentsView to get reset making the first
task visible
Bug: 111404703
Change-Id: I8ff2577bf965fb4cdf736fb18683ded63ade1872
While swipe-up animation is running, the user can quickly start
another touch gesture. In that case we keep the recents transtion active
and proxy all touch events to launcher.
Bug: 110901700
Change-Id: Ie3b448dfea00473082dc9143423d3596504a3fcc
* changes:
[automerger] Workaround for flicker between handoff from app to task view am: 35a6848fa8
Workaround for flicker between handoff from app to task view
- Defer finishing the recents animation for a couple frames until the
frame has likely been pushed to sf and drawn, otherwise the reparenting
of the app surface may happen before the task view is visible in
Launcher.
Bug: 111299394
Test: Swipe up repeatedly from an app
Change-Id: I627dc085a5e376436b2b8eb5841c45fd36deff42
There is no events from nav bar to send to drag layer until crossing the touch
slop on move. If up occurs, sending the touch down event will clear floating
objects such as the folders.
Change-Id: I6095506f505535e04d59c403e539f37e27295470
Fixes: 111008382
Test: open folder, touch an empty space on nav bar
> Separating the task icon animation and setter into 2 separate methods and calling each appropriately
> Using taskId instead of TaskView for ignoreSet as taskView can be reassigned
Bug: 110893730
Change-Id: I7bc958e53becffdf633766373b257ead2eeef2ad
- We can request the locked orientation for quickscrub only when we
start quickscrub
Bug: 80500702
Change-Id: I2e83ff916f92959fccf79f1d6b987806338512f5
Separating InvarantDeviceProfile out of LauncherAppState and creating
LauncherAppState only when it is actually used
Change-Id: I2ee55f53cae01f11203f94675bb5f70c65ad2b9d
Round the y and x values to get correct position without showing a small
line when opening the task menu.
Test: increase the display and font size to large, go to overview and
tap icon
Fixes: 110415497
Change-Id: Ia41378863fb08fc72f5cd14b40f45769ab612d22
> Using {packageName} instead of hardcoding com.android.launcher3 in AndroidManifest.xml
for strings which are dependent on packageName
> Adding proguard rule to prevent obfuscating any overridable class
> Making it easier to extend SettingsActivity by overriding the fragment class
Change-Id: I5668c3f33b4cf20ad01d7f54b3d79cc0d268d391
Instead of using an OvershootInterpolator, we adjust the end progress to > 1 and
add a second interpolator to settle back to 1. That way, even if the animation runs
starting very late, e.g. 1.0, it still has room to overshoot. We use this same
OvershootParams class to calculate an overshoot for a blocked long fling as well.
Bug: 109709720
Change-Id: I43152237e4350f93e7c462c22e68d09d05c1dd57
There is also a deadzone area around the clear all button to tap easier.
Test: start overview click anywhere that is not the shelf or task
Change-Id: I187ff264444da542aca111b57d94c8199f5a0384
Fixes: 110232233
> Preloading assist data after the touch interaction is complete
> Fixing swipe-up callbacks called in case of quickscrub
Bug: 110532258
Change-Id: I472884ec96be877db5f38098fd0165d464e836ed
* changes:
[automerger] Allow clear all button in overview be clickable if visible am: 330a634648
Allow clear all button in overview be clickable if visible
- All apps content fades in quickly so that icons are opaque by the time
they are on screen
- Recents fades out late so that we don't see it as translucent while
the transition is continuing (the translucent icon top of tranclucent
task view looks bad, for instance)
- Fix colored scrim that appears over recents - was using 0 to 1 instead
of 255
Bug: 79867407
Change-Id: I4f50423157f7870c8d0708f586a72e3e5a7b6559
The "spring" is actually three sequential animations: 1) a slide,
2) an oscillation, and 3) a settle.
Bug: 109828964
Change-Id: I0a2c55f877446a6408952a1201636760283be57b
Test: enter overview, make sure clear all button is invisible, try to
tap its location
Fixes: 110432640
Change-Id: I7531e4c6cfdcc9a29d98da24a73c32b8080e013c