Fixes: 277271088
Test: be in app
swipe up from bottom to top of screen without pausing then release
observe taskbar -> hotseat handoff
observe no jump
Change-Id: I2bb9d93d39215ca3653e2e4353391b50b7ab6417
When entering the dreaming state, the TaskbarDragLayer is faded out.
Upon wake up, a slight delay is added to allow the SFPS reader to do
its magic, so the lockscreen-navbar does not pop-in just to be removed
again.
Bug: 271440683
Bug: 275319714
Fixes: 271440683
Test: manual (http://shortn/_cQudGXDSDU)
Change-Id: I34e02f02288bace39626d531d115fc994b11f371
This is a better fit for the signal in launcher, since it identifies
whether the device is awake or asleep, where asleep also inclues AoD
Test: manual, unit tests
Bug: 275319714
Change-Id: I6d6a6694ab018d182606c5554377caec1986bc08
This is a follow-up to ag/21699905, which caused the nav-bar to be visible after a device-restart alongside the hotseat, until an app was launched.
Currently, when restarting launcher (for example a device restart), there is no guarantee when the SysUI flags are received for the first time. The current init-codepath expects the launcher to be fully initialized at the time. From there, only deltas are processed:
- during the initial resume, launcher is not considered active because the screen is still off
- the SCREEN_ON event itself is not processed to update the FLAG_IN_APP
Before: http://shortn/_MGQjGFRIaB
After: http://shortn/_awiv2CxFn9
Bug: 261418621
Test: manual (http://shortn/_ty9EDuLM97), tapl
Change-Id: Ie3b3ba1ebe249efe8fc43850052bc9956cafcd24
The spring animation was getting cancelled by the reset
animation.
Added a check to avoid creating a new reset animation if we
are already animating to the final value.
Bug: 273961611
Change-Id: I3afb62b89b5f6fbe920906499db2497ef8e94069
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
The unstash is ignored by TaskbarStashController, while the TaskbarLauncherStateController positions the hotseat on the launcher correctly without animation.
Since the TaskbarStashController is used even with 3p launchers, both of these actors keep track of whether the device is locked independently, based on the SysUI flags.
Bug: 270139677, 266890635, 274084408
Test: manually, Tapl
Change-Id: Iae94522b5d57cc89c9a4d219ad1254b150a3400d
This change caches whether launcher was active at the time of the screen
off, and assumes this last state when the screen is actually off.
While trying to understand the code, I renamed a couple class-internal
methods and flags, plus added comments. If they are not accurate, its
due to a misunderstanding on my part, and I will gladly revisit and
check whether all the assumptions I made still hold.
Bug: 261418621
Test: manually
Change-Id: I2ad25caf478100781a063c356c5fd2d20d3e1917
Merged-In: I2ad25caf478100781a063c356c5fd2d20d3e1917
Instead of making the icons themselves move faster, we change
the startDelay/duration of the taskbar bg alpha animation
so that the taskbar is only visible when the icons are within
the taskbar bounds.
This is still an approximation. For U+, we should support taskbar
width change to fit the icons when they are in the 'hotseat'
alignment.
Bug: 273961611
Test: home <-> overview
home <-> app
stash <-> unstash
foldable/tablet
RTL
Change-Id: I39bedafac4afd641d250f7c97abf1e2de070d646
We only set qsb alpha if isQsbInline = true, since that is when
we draw/animate the qsb in the taskbar.
Fixes: 269164187
Test: isQsbInline = true / false
Change-Id: I92022135e74f734a8e50c606dc9c605df39a9f97
This variable is now mutable, making the uppercase format misleading.
For instance, users might assume they can use this value in other
immutable properties, when they really should be accessing the latest
value every time they need it.
Context: https://source.android.com/docs/setup/contribute/code-style#follow-field-naming-conventions
Test: Manual
Bug: 271160958
Change-Id: Iaaa51d9153cb8a7d686c72e1210b1948029dcfd5
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
Bug: 269409332
Test: Switch display with and without Tasxkbar at home and in-app, Taskbar and Hotseat visibility are correct
Change-Id: I598f618c336067bf795b77ccdf3b03f420634047
- BackgroundAppState extends OverviewState, so in some cases we will
transition to background app, which inadvertently triggers global
drag and drop from being enabled
Bug: 269819279
Test: Enter split, cycle the screen and try to drag an app from the
transient bar
Change-Id: I0e8c5e8bbaa0220fc870d2db866152864253010f
- 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