Add a specific view for Go's icon recents. We also add a few properties
for use in future refactors.
Bug: 114136250
Test: Build Launcher3GoIconRecents
Change-Id: I9852679256158344ab276d1c477f55b7dd2d6a52
Split out the logic in PortraitOverviewStateTouchHelper that is
dependent on the recents view implementation. This is done through a
separate helper class that we override on Go to stub out most of the
behavior.
This results in the Go version not supporting swipe transitions from
the recents state which is desired since we would otherwise risk
confusion over whether the swipe should go to the view or to the
transition (note that we will also take out the hotseat in this state).
Bug: 114136250
Test: Manual test NexusLauncher and l3goWithQuickstep
Test: Build l3goWithQuickstepIconRecents
Change-Id: I9b0e9c05171d279d03bbcb7f05344fa425f34b3e
This reverts commit dad8d4434d.
Reason for revert: Bottom scrim is still visible so it creates a hard line when animation starts
Change-Id: If3e2a8e0965d40924a475f077d3c42e64d4d382d
- Ensure we update the background paint whenever the thumbnail is
bound to the task view (we still draw with the background paint when the
thumbnail has not yet loaded)
- Ensure that the dim is applied to the background paint even before
the thumbnail has loaded
Bug: 122612839
Test: Kill launcher, launch overview
Change-Id: Ia09ff49e4641b6a02a37cec3f94f74c2b0b8fd24
This CL splits out RecentsView specific logic from UiFactory and
overrides it in the Go IconRecents version, stubbing out much of the
functionality.
Bug: 114136250
Test: Manual test NexusLauncher, Launcher3GoQuickstep
Test: Build Launcher3GoIconRecents
Change-Id: I043f7f2b2581831f1a74a80110e9c4c25231c046
- With live tiles disabled, we are still calling
LauncherLayoutListener.update with shouldFinish=true, which can cause
the layout listener to be closed prior to the screenshot being taken
and shown. When we enable live tiles, it should obliviate the need to
switching to screenshot as well.
Bug: 122612839
Change-Id: I5c951ba2a486051016e9fed49e7f8f5dd015f8ea
Since we update the progress of the launcher anim when
recents scrolls, we were essentially jumping back to
the overview state every couple frames. Now we don't
update that shift once we're in long swipe mode.
Bug: 111926330
Change-Id: Ib751becb70df71679ff7557f113d6339a39777d0
Removed the workaround we had for animating sysui scrim based on SCREEN_OFF
and USER_PRESENT, since it is now properly handled via the unlock animation.
Bug: 65162781
Change-Id: I5341cc1d3b4f0761b8cf58fdc9fc1b895f2a128e
- Punch a hole (by erasing part of launcher where current task is rendered) to reveal app surface drawn underneath using surface transform. We use LauncherLayoutListener before reaching OVERVIEW threshold, and TaskView after threshold due to layering constraint (it's above Overview but below All Apps)
- Render live tile following user-trigger scrolling (horizontal and vertical) by tracking the task view rect.
- When user launches the current running app (through the live tile or icon in the app drawer), finish recents animation to app.
- When user launches another app (through Overview or other entry points where user opens an app), take a screenshot of the current running app, switch to screenshot mode and launch the other app.
- Refactor ClipAnimationController#ApplyTransform to consolidate transforming by progress and by getting the current rect of the app on the screen.
Bug: 111697218
Test: manual test
Change-Id: I0ad764399e872f181a9d65dc453f0175f2b58dd1
Split out overview_panel from recents and override it with IconRecents
version to replace the recents view entirely.
Currently, on the IconRecents build variant, as expected, this hits a
class cast exception since many quickstep classes assume the overview
panel is an instance of RecentsView. All other variants build and push
fine.
Bug: 114136250
Test: Build + push NexusLauncherDebug, Launcher3Go,
Launcher3GoQuickstep, Launcher3GoQuickstepIconRecents
Change-Id: I3ac7331772e53ee81cb1735a709b4fb7b3bdb78c
> Using that task stach changes for maintaining the task order instead of
using the UI load signals.
> On fast task switches, temporary task changes do not contribute to the task
order. Only the final task is braught to the top of the list
> Removing and add tasks do not reset the order
Change-Id: I576cb4ffeec66e115acd327d58c59920c149aaca
This CL sets up the source directories to build a Go version of
quickstep recents/icon recents. This is accomplished by splitting the
quickstep resources/sources into two groups: the base source and
sources that should be overridden (recents_ui_overrides). The new Go
recents variant then takes the base and combines it with the sources
in go/quickstep which should replace the ones in recents_ui_overrides.
As of now, no classes have been moved yet, so there
are only placeholder files.
In addition, this modifies the make and gradle files to reflect the new
sources.
Bug: 114136250
Test: build all targets via tapas, build all APKs from IDE
Change-Id: I6d0a4d93ab1c38d4ffc28fd21823caadd96d23f7
- Swiping straight up and down works the same as before.
- We dispatch the MotionEvents to RecentsView so that it scrolls if you
swipe side to side as you swipe up.
- As RecentsView scrolls, we offset the window to match the position of
the first task
- If you scroll or fling towards the previous app, it will settle on it
and launch it.
Bug: 111699315
Change-Id: I1ff160cfc3ca66302a2506d18a4788015de75b94
* changes:
SyncRtTransactionApplier -> SyncRtTransactionApplierCompat
Track when plugins are disabled due to crashes.
Updating shared lib for context wrapper.
> Using the scroll of the current page instead of page 0
> Starting switch from current page instead of page 0
> Disable task flip animation accordingly
Change-Id: I29b9c6dafca1e856e634f471aa2b1b667158a790
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