* changes:
Remove redundant resumeLastTaskForQuickstep() and use resumeLastTask() directly
Fix some state issues with home and quick switch gestures
Apply spring forces to animate to the final position for swipe home
Now that we don't have quick scrub, the only state that has a non-zero translation is all apps,
which just uses that to have a slight parallax. This is much simpler to define in terms of pixels
like other states do.
Change-Id: I108c8505d85591399256b3475f7566ff51e2c5ad
We only send onAnimationEnd() if both object animator and spring animator have
ended. However, we also initialized mSpringEnded = false to begin with, which
meant we would never send onAnimationEnd() if the spring animator was never
started. Now we treat the animators as ended until they are started.
Example test:
0: Enable SWIPE_HOME and QUICKSTEP_SPRINGS flags
1: Swipe up and hold on home to go to overview
2: Tap outside overview to go home
3. Swipe up to all apps
4. Swipe down
Expected: animates to home, not overview. Before this change, however, it went
to overview because the state manager never got onAnimationEnd() and therefore
never set the last stable state to NORMAL instead of OVERVIEW.
Change-Id: I7add42eedbc15b3a6a08ac69570da4edd57b5417
Now instead of an incorrect hack that simulated accelerating to the target,
we actually apply spring forces to make it feel realistic and work no matter
where the target is.
Added two helper classes for this:
- FlingSpringAnim handles the fling, applying friction until reaching the target,
then a spring to pull towards the final position (also applies if fling wasn't
in the right direction or strong enough to reach the target).
- RectFSpringAnim uses 2 FlingSpringAnims (x + y) to animate from a starting rect
to a target rect. It also has an animation to scale from the start rect to the
target rect, sending progress update callbacks to the caller.
Bug: 123900446
Change-Id: Iafa89db1d55c42816acfa9f1bb84a7519b69ff12
Also moving test provider to Quickstep to have access to the new info;
and now Launcher3 doesn't have it.
Bug: 123904290
Change-Id: I653376610e83839d102beb9c0604950dd314e8ba
This reverts commit 7c8fb786fa.
Reason for revert: Chatted with Sunny, the concern was brought up that this is risky and will create potential for dogfood confusion with the new gesture navigation that is getting rolled out soon. So we can try to reland this in a few weeks.
Change-Id: I4f09cc9982164195dc42cd6e4714ede767cce786
- Added ConstantState support for FolderAdaptiveIcon and
ShiftedBitmapDrawable.
- Quick fix for NPE in Workspace#mapOverCellLayout while I investigate
further.
Bug: 128460496
Change-Id: I5ec02e25dcf9f17aeb37928e675a033bdc8819ae
Fade animation is no longer required as the transform is also handled on
the main thread. So we will get the RecentsAnimaiton always after Launcher
has drawn
Change-Id: Ieb05406c9a5b9132b0518155bdbda16c1f73a6ec
Now that the "hook" gesture is supported for old quickstep to switch
apps, we need to fade out the QSB so it doesn't overlap the TaskView we
are switching to.
Bug: 111926330
Change-Id: Ie04c7909f6b96d12c810b438db89eedf8ea5bdeb
Replace the current callback logic in WorkspaceTouchListener with the
use of GestureDetector.
That means, platform api is now going to be used for detecting long
press.
There now are some unused variables and unneeded code in this file. It
will be cleaned up in a follow-up CL.
Test: long press on empty home screen
Bug: 126596502
Change-Id: I57302b403f7d7118f2156166d8c707ab3f9ccefd
- We update the ranks of all folder items after loading, to ensure there are
no gaps caused by removed folder items. This also ensures that we load
the high resolution icons for all preview items.
- FolderIconPreviewVerifier#setFolderInfo was not always called
- Init mGridSize with [1, 1] to prevent divide by zero error in case
setFolderInfo is not called
Bug: 126268196
Change-Id: I856489968665a39303e2922c78cf90f2b3ee6ebb
> Removing unnecessary check when binding model data as its safe to bind old data,
we should just not persist it (that check is already there in model writer)
> Adding additional check in model bind to skip old bind if there are multiple binds
Bug: 126259547
Bug: 118441555
Change-Id: Ic250d2af13797d3e70c6e1fc70da65ebe6ab8d70
- getFirstMatchForAppClose now only looks at the current page, since switching
pages is disruptive and the animation for app closing to an icon on a
different page is unclear.
- Searches for package name and user id (in case of work profile app)
instead of component name to handle shortcuts and trampoline activities.
- Adaptive icon background drawable is now always centered
- Fix crash that occurs when ADAPTIVE_ICON_WINDOW_ANIM is off. We were trying
to set FolderAdaptiveIcon as the background drawable. Simplest solution is
to not use folder as a search criteria when the flag is off.
- Similar to DragView, FloatingIconView now uses BubbleTextView icon when
adaptive icon support is not available. This handles legacy-treated apps.
Bug: 123900446
Change-Id: Idaf292bb39d78db511cf2ee04a16b191454846b3
In case events come out of order, the list is not properly initialized
which can lead to missing invalid states
Bug: 127282292
Change-Id: I3b4784b8e3eec890e80e62c2ea613e1ba84b6c95
- Needed to account for the preview bounds (similar to BubbleTextView icon
bounds)
- Also needed to update the bitmap shift amount so that it is re-centered
- Moved ShiftedBitmapDrawable to its own class in graphics package
Bug: 123900446
Change-Id: Ifa9e3f688e55d017cf86a0285f5cdb1b014f01e6