Bug: 231213105
Test: from home, opened recents, then went back home, then went back to recents, resumed an app, then went back to recents and resumed the same app (both in 3-button and gesture nav)
Change-Id: I83b1b33cafb95353f36a126b93fcaf3b536d3bf4
Fixes: 232033354
Test: switched between split and unsplit tasks using 3 button nav and gesture nav
Change-Id: I9a4e2eb08e9970540093e3dc60b64a372be2052f
- Added a QSB to taskbar to be animated between inline QSB and taskbar
- Passed endValue of taskbar animator to TaskbarController to have aniamtion variation between home -> app and app -> home
- Tuned duartion of taskbar animation and also stagger animation when taskbar is present
- Disabled scaling down of taskbar and inline QSB for home -> app
- Disabled stagger animation of taskbar and inline QSB for app -> home
Bug: 220733187
Test: manual
Change-Id: I4aac0bbc343b992a0472298595770e2bf2a55990
- Apply additional translation on TaskbarView to account for difference between taskbar icon to bottom spacing compared to hotseat icon to bottom spacing
- Call updateIconAlignment outside of synchronizeNextDraw's then block, which get run after the synchronization
Bug: 204850744
Test: manual
Change-Id: Id65842f506eb342105082649446eb694cd5c33a4
* Extends hitbox when recents is tapped
when going from taskbar to overview.
* Extended region lasts for 400ms after
the animation ends.
Fixes: 225885714
Test: Manual, added unit test
Change-Id: I8766279c1a5bf6867f8d69ddd3af2aa3565deec2
If launcher is paused and resumed in overview, goingToUnstashedLauncherStateChanged doesn't change, so we should not use goingToUnstashedLauncherState as a signal for the end value of mIconAlignmentForResumedState anim
Bug: 223109070
Test: go to overview, use the share functionality, share to drive, and make sure task bar ends up in stashed state. Making sure that it never unstashes is out of scope for this change
Change-Id: I5684be6b58279a9b41e257dd72591f7d692c2fbc
aka launcher is not resumed but recents animation is running
Fixes: 210047102
Test: Go to overview in live tile mode, tap on somewhere outside any task in overview, and make sure icon alignment animation is played.
Change-Id: Ic300ee296049b6fdcdf6d2595916cc84c09d95fa
The issue is that we always assume finishedToApp = true when recents animation is cancelled and use that to set FLAG_IN_APP. However, we don't return to app in overview after the device is rotated. Ideally we want to get signal from onRecentsAnimationCancelled, but at this point in the release it's probably ok to use launcher state to determine it.
Fixes: 227565959
Test: manual
Change-Id: I6be800aff8108b382ca3947cd1d0a45c9e9571eb
+ Do not allow sync during tests
Bug: 223443781
Bug: 202507555
Test: open/close apps in hotseat/taskbar
Change-Id: I2f434d440a26999219e785b8671768e27d0dcad3
One way to reproduce this issue is to run `adb shell input keyevent KEYCODE_HOME`, which happens to pause and immediately resume launcher. For example, let's say we run this while in All Apps. Because the isResumed=true comes before the state transition to Normal, we behave as if we are still going to All Apps, specifically goingToUnstashedState = false (since we stash in All Apps). To fix this, we now listen to state changes while the resume alignment animation is playing, and update it if necessary.
Also did the same correction for the gesture alignment animation, though I don't have a specific repo for that.
Finally, because there are now more triggers for alignment animations to play, we add a check to only play them if it's not animating to the same value it's already animating towards. One notable experience this improves is swiping down from All Apps to home; if you do it quick enough, the state animation ends before the taskbar unstash animation, and thus the unstash animation would cancel and start again with the full duration, making it look laggy/disjointed (this behavior existed before this change as well).
Test: TaplTestsQuickstep
Test: Go to All Apps, run `adb shell input keyevent KEYCODE_HOME`, open an app and ensure taskbar icons are visible
Test: Quick switch from home when taskbar is present in apps, but instead go to overview; ensure no jump when taskbar stashes
Test: Swipe down quickly from All Apps, ensure taskbar unstashing doesn't slow down when reaching the end of the state transition
Fixes: 214562370
Change-Id: Ie0c6140e14186e41c7e4748dc745f87349b084fe
- Added ArrowPopup#OnPopupClosedCallback to automatically remove Taskbar focus when the popup closes.
Fixes: 209917078
Test: opened popup in taskbar and closed it with switch access, touching anywhere on the screen and using the back gesture. went home to check if focus was removed.
Change-Id: Ie7aafc9cf0f03fadaa44e77818508e9e1d8db610
Fixes: 208802276
Test: drag from all apps to normal, and the task bar doesn't stash until the user releases their finger
Change-Id: I53133cc80749bdc62e77d858b5714ae32facbd1d
- Update FLAG_IN_APP to account for setup state to ensure that the
stashed state is correct. This needs to be done in the stash
controller since SUW is the home activity on startup and the
launcher state controller will not be initialized until after
SUW finishes
- Initialize the launcher state and resumed flags in case Launcher
restarts while another app is resumed
Bug: 204384193
Test: Run through SUW, ensure the background is not visible
Change-Id: I5ce061ad16e79226c8428339ccd0b5ac55c07205
We set mIconAlignmentForResumedState in endGestureStateOverride(), but then we call applyState() which might aniamte mIAFRS to a different value. To avoid this, set it after applyState() instead.
Specific repro:
1. Open Calculator
2. Go to Overview
3. Dismiss Calculator
3a. This calls endGestureStateOverride() because the running tile ends
3b. Previously, we called mIAFRS.updateValue(1) but then applyState() animated it to 0 because we're still in Overview which is an unstashed state. Now the animation to 0 is before setting explicitly to 1.
4. Go home (this sets mIconAlignmentForLauncherState = 1)
5. Open Calculator again. Previously, mIAFRS was already 0 so animating to 0 was ignored. Now, mIAFRS starts at 1 (which is right since launcher is resumed).
Test: see above
Fixes: 210109500
Change-Id: I13f40908f8636291d63ef4b885ac9d08bbf4d393
- Add LauncherState#isTaskbarAlignedWithHotseat() which defaults to !isTaskbarStashed(), but is always false for quick switch from home
- Replaced FLAG_TRANSITION_STATE_START_STASHED and FLAG_TRANSITION_STATE_COMMITTED_STASHED with FLAG_STATE_TRANSITION_RUNNING and a reference to mLauncherState. STATE_START is equivalent to TRANSITION_RUNNING changing to true, and STATE_COMMITTED is equivalent to TRANSITION_RUNNING changing to false. Then can get details from the state such as whether taskbar is stashed and icon alignment from mLauncherState
Test: quick switch from home, both with taskbar stashed in apps and not
Fixes: 194728611
Bug: 204657916
Change-Id: I6cf84ec73a4036e14cc7268667c6f62100884c27
- Clearly distinguish Home <-> App icon alignment (ForResumedState and ForGestureState) from Home <-> Home states (ForLauncherState) by renaming onIconAlignmentRatioChanged() to onIconAlignmentRatioChangedForAppAndHomeTransition (for the former)
- Make sure initial state is properly applied by treating all flags as changed
- onIconAlignmentRatioChangedForStateTransition only runs when launcher is resumed (fixes 208648294)
- Animate taskbar background alpha when going between home and app, separate from icon alignment (bug: 204657916)
- Only copy hotseat's alpha to taskbar when hotseat is originally visible (also bug: 204657916)
Test: Open an app on small screen, open large screen and ensure taskbar stays at the bottom instead of aligning with non-present hotseat (bug: 208648294)
Test: Swipe up and down on home scren, ensure taskbar background never appears and there's no jump between taskbar and hotseat
Change-Id: Iea59965118f2bdbd8ce49279f76fb01fbd61f60b
Keep taskbar unaligned with hotseat if we're stashing anyway
Test: Swipe up from app with taskbar present to overview, check frame by frame to ensure icons morph directly into the handle instead of above it
Fixes: 208697792
Change-Id: If3238286b3383e75eb71fbd3b97d34bb3b44340b
- Set resumed state immediately when finishing recents controller to launcher, otherwise there's a race where we start animating gesture state to 0 before animating resumed state to 1, which causes the jump in the bug
Test: Swipe from app to home 10 times, no jump
Fixes: 203725820
Change-Id: Ie8a1add29902a9961ba4d7861ba5424ab656f1c8
Instead use setTaskbarViewVisible directly. Now that we stash when going to overview, we shouldn't have any launcher state where we need to fade out TaskbarView icons
Test: quick switch from home (follow up CL)
Bug: 194728611
Change-Id: I03e1fa4037b7e8a08494f6b7e065d144c4bc4e1b
TODO:
- Consider delaying animating task bar to stashed towards all apps state until user releasing their finger (tho in this change heuristic is applied for stashing and unstashing respectively)
- Further consolidate some animation logic
Bug: 204220602
Test: manual
Change-Id: I58b4d035fcf65a9f5c68e69c129eae95b89b1c4a