Also use this code path to reset translation when going from an app to
launcher.
Test: swipe up from overview, goes home without hotseat jumping
Fixes: 262826748
Change-Id: If8a4278a61e3786cfe16c388eabefacc63e8f327
- We need to reset icon alignment whenever icon layout bound
changes. This fixes the issue where we build an icon
alignment animator before any of the views are laid out.
- Separated animation logic between.
createTransientAnimToIsStashed and createAnimToIsStashed
* The values still require a bit more tuning but this gets us
a lot closer to spec for many of the motion polish.
Bug: 267806083
Bug: 246634367
Bug: 246635237
Test: manual
Change-Id: Id122134b22ef4e418ce632e4a8137239dc8bb313
* Created b/268120202 to track other states of split
selection that are unhandled on 3P launchers
Test: Able to initiate split in overview with 3P launcher
Fixes: 264576761
Change-Id: I0311fe83380bf914fa79956b2565b61cc5eab916
* Consolidated init calls in SplitSelectStateController
* Also add support to launch from taskbar all apps
* Add logic in SplitSelectStateController to know whether
or not we need to dismiss existing TaskView vs relying
on mSplitHiddenTaskView null check
* Default click handling for SplitShortcut is to start
split selection mode
Bug: 251747761
Test: Initiated split from smart actions, thumbnail app
icon, home, taskbar in overview, all apps. Saw it choose
the latest thumbnail
Change-Id: Ib4f64e619c97615af458a19a9c0efd86c92979d9
> Making the state animator nonNull to avoid null checks at caller
> Updating the methods names to explicitely indication animation
being started or not
Bug: 265352919
Test: Verified on device
Change-Id: I1f5b47921f831ed0b202aced10825c8e1d39a4dc
We are moving AnimatedFloat to launcher to be able to use this in class in launcher. Having it in launcher will allow us to do restore icon treatment animations to do with scaling the icon size
Bug: 254858049
Test: verified that the device still works
Change-Id: I1c4c47ab436c389a94abf7c910c1a44724efc955
- Added isHotseatIconTopWhenAligned to control both iconAlignment and stash animation to just fade in if hotseat icon isn't on top of the screen in the aligned state
Fix: 257355864
Fix: 213455090
Test: Launch apps from/back to home, taskbar animate from/to hotseat
Test: Launch apps from/back to AllApps/-1, taskbar fade in/out
Test: Repeat aboth with transient or persistent taskbar
Change-Id: I6bdae615ff9e199d23cbfe2d26c8d46a08fbc436
If another animation is created while one is occurring, we should clean
up the previous one.
Test: Manual
Fix: 233868461
Change-Id: Idf0e33ae95cbf19741ee943e450d478b1e18716b
* Don't close TaskbarAllApps once drag starts
(see comment in code regarding needing multiple shared drag
layers)
* Hide app menu split options for taskbar in overview
* One TODO is that the animation needs to be tweaked
because the scale of the icon when it's returned is too large.
* I think maybe we have to change the
TaskbarDragController#mDragIconSize since that gets directly
set from a resource. Unclear.
Test: Dragged in TaskbarAllApps in overivew and in split
select, app returned to original position and not taskbar
Bug: 251747761
Change-Id: I785f34b0bdb0b0abfc440450494074f8dfe7c31a
- Roundness will be 0 in Launcher, and 1 in an app
Bug: 250645563
Test: With and without taskbar in overview, switch between home/overview/app and observe the round corners above taskbar
Test: Ensure corner above taskbar is correct in overview and in app when chat bubble is active
Change-Id: I1f4911626c8e79fce8d81a76a9bd0d0670d111da
* Still need to disable drag from all apps in overview
* Disallow any taskbar icon long click when in split select
Bug: 251747761
Test: Drag from hotseat and predicted icons in overview,
snaps back to position
Change-Id: Ib9b068e4914b9197614c8e8f49b7899bb964f92b
- Use a single iconAlignment animation
- Introduced isInLauncher/goingToLauncher/FLAGS_LAUNCHER as combined FLAG_RESUMED|FLAG_RECENTS_ANIMATION_RUNNING
- iconAlignment is now centralized in onStateChangeApplied with single source of truth
Bug: 245320601
Test: Home<->Overview, Home<->App, App<->Overview, Home->Overview->App->Home, Home->App->Overview->Home, Overview->Home->App->Overview, Overview->App->Home->Overview, App->Overview->Home->App, App->Home->Overview->App
Test: Go to AllApps, call KEYCODE_HOME, go to app and taskbar should be there
Test: App->Overview->Select->Home->App
Test: QuickSwitch -> App
Test: Repeat above with taskbarStashed on/off
Test: Repeat above with gesture and 3-button
Change-Id: Ie51b602394c155aca060a84585eb0e677e23425c
The motivation ternary `alpha > 0 ? 0 : 1` was not immediately clear, so adding some clarification for future readers.
Test: No
Change-Id: I558e86153e68572a519317dba7fbba180cb5678e
Fix: 239074423
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