Commit Graph

136 Commits

Author SHA1 Message Date
Mike Schneider
94f46e14f4 Do not play unstash animation when unlocking the device
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
2023-03-22 09:10:03 +01:00
Mike Schneider
42a8fe91db Merge "Do not perform invisible transitions while the screen is off." into tm-qpr-dev 2023-03-22 08:04:09 +00:00
Mike Schneider
308b7849db Do not perform invisible transitions while the screen is off.
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
2023-03-21 21:02:55 +00:00
Jon Miranda
3344ec7004 Add spring animation when stashing transient taskbar.
Bug: 273961611
Change-Id: I35a658a5e30a155094a48effdefc3895f45e0483
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
2023-03-21 10:25:48 -07:00
Mike Schneider
a79d460736 Add optional debug logging to on flag changes
FlagDebugUtils.formatFlagChange() utility to always write the set of
updated flags, with a list of actual changes applied. Examples:

[allow_gesture|device_dozing] +[device_dozing]
[] -[state_started]

Additionally, moved the appendFlag utility to the new FlagDebugUtils

Test: manually verifed the output in logcat
Bug: 261418621
Change-Id: Ie4f2cfcd4b34f0a816db7845e1df4331babed07a
2023-03-15 13:36:18 +01:00
Brian Isganitis
201a8f5ea3 Merge "Log when FLAG_STASHED_IN_APP_AUTO changes." into tm-qpr-dev 2023-03-14 17:16:43 +00:00
Jagrut Desai
5cef4b83d5 Merge "Make TaskbarStashController aware of accesseibilty time to action settings." into tm-qpr-dev 2023-03-09 19:49:18 +00:00
Jon Miranda
4c368373cb Merge "Polish taskbar un/stash animation." into tm-qpr-dev 2023-03-09 03:33:39 +00:00
Jon Miranda
67d4b0ed6b Polish taskbar un/stash animation.
- When QSB is inline, we add it to the reveal animation
  so that it moves in coordination with the rest of the
  taskbar icons
- Hide All Apps button when transitioning from Home -> App
  to match spec
- Shorten duration icons move in x duration so that they
  stay within the taskbar background bounds.

Bug: 267806083
Bug: 246635237
Bug: 246660243
Test: transient taskbar
      with isQsbInline = true and false

Change-Id: Ie6b866311cc2ceba88cdf01652b30fee457d0359
Merged-In: Ie6b866311cc2ceba88cdf01652b30fee457d0359
2023-03-08 23:47:29 +00:00
Jagrut Desai
4ddd20c53d Make TaskbarStashController aware of accesseibilty time to action settings.
Test: Manual
Bug: 265594904
Bug: 265755827
Change-Id: Id71a6343a0a014933c4468c971ae3e8c4dd9f806
2023-03-08 09:55:43 -08:00
Jagrut Desai
1dc99f3848 Announce for accessiblity when taskbar is invoked/closed
Test: Manual
Bug: 265620540
Change-Id: I6660be7716ec59c765f3d54f8fe9889eaaf56e10
2023-03-08 09:54:10 -08:00
Brian Isganitis
cdc13fc4e8 Log when FLAG_STASHED_IN_APP_AUTO changes.
Bug: 261177876
Test: wwdebug & wwlogcat
Change-Id: If2d2a3d38f3128a60d551bca9f4cdf64f2bcb032
2023-03-07 03:12:45 +00:00
Brian Isganitis
d2d2913812 Merge changes from topic "running-in-test-camel" into tm-qpr-dev
* changes:
  Expose IS_RUNNING_IN_TEST_HARNESS as static method.
  Make isTooltipEnabled a getter due to its mutable dependencies.
2023-03-03 23:15:38 +00:00
Brian Isganitis
fdd044e16e Expose IS_RUNNING_IN_TEST_HARNESS as static method.
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
2023-03-03 00:17:33 +00:00
Jon Miranda
f01ca85c20 Prevent QSB from being a part of the icon reveal animation.
Fixes: 270694593
Test: taskbar on foldable and tablet
Change-Id: I1782f715454da1240174be1b4f496c910be3764a
2023-03-01 17:17:36 -08:00
Jagrut Desai
3fbaaf9628 Prevent Taskbar from stashing in immersive mode overview.
Test: Visual, Video in Buganizer
Bug: 262589756
Change-Id: Ifbdfb3a4104817e5f50833c42c3c6fc5964388b7
2023-02-23 14:19:10 -08:00
Jon Miranda
13e9b9f889 Translate the taskbar icons to match nav handle shape.
- 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
2023-02-17 10:56:59 -08:00
Jagrut Desai
202c68c8a2 Merge "Removing ENABLE_ALL_APPS_IN_TASKBAR and FLAG_STASHED_IN_APP_EMPTY Test: Visual(pics in buganizer) Bug: 265462138 Bug: 267382941" into tm-qpr-dev 2023-02-16 17:39:35 +00:00
Jagrut Desai
ec0b4e1693 Removing ENABLE_ALL_APPS_IN_TASKBAR and FLAG_STASHED_IN_APP_EMPTY
Test: Visual(pics in buganizer)
Bug: 265462138
Bug: 267382941

Change-Id: I223cd5ea7e5b553619dfc81c36f1be93e399639d
2023-02-13 13:34:23 -08:00
Jon Miranda
11b47c542e Crop taskbar icons during stash/unstash animation.
When we stash, we crop the taskbar icons to the height of the
stashed handle.

In a follow up CL we will translate the icons so that at the
end of the stash animation, the icons will overlap with the
stashed handle for a more seamless handoff.

This will be good to get in first so that we can see if there is
any performance regression by running multiple outline
animations at the same time.

Test: stash/unstash observe cropping
Bug: 267806083
Change-Id: I19b05647a669c11376ac1d3267fd600131246be8
2023-02-03 15:14:42 -08:00
Winson Chung
537c380bcb Merge "Revert "Include SysUI state in stashing check"" into tm-qpr-dev 2023-02-03 18:02:17 +00:00
Jon Miranda
554c431d40 Merge "Iterative improvement to the taskbar stash animation." into tm-qpr-dev 2023-02-03 02:39:10 +00:00
Jon Miranda
b1e85e9b70 Iterative improvement to the taskbar stash animation.
Test: manual
Bug: 246632728
Change-Id: I4e4051faaf699a462c90acf87afcee11a0b4165b
2023-02-02 23:52:23 +00:00
Winson Chung
0499f31aa5 Revert "Include SysUI state in stashing check"
This reverts commit 62c74f9633.

Reason for revert: b/267543857

Change-Id: Ifc2fc3abfc07c92acef560fd3eef7d799f3e28bf
2023-02-02 23:33:15 +00:00
TreeHugger Robot
6e21d310c1 Merge changes I865871e5,Ie655de7a into tm-qpr-dev
* changes:
  Fixes to VoiceInteractionWindowController
  Fix TaskbarBackgroundRenderer not being applied correctly in 2 cases
2023-01-31 17:52:55 +00:00
Alex Chau
f6c231d575 Let createSetStateAnimator return null when needed
- This is to fix a regression from http://ag/20968628. Instead of returning null and change the behavior, return null and do null checks on callers

Fix: 266109700
Test: Swipe AllApps from home on tablets, no flicker on taskbar, for gesture and 3-button
Change-Id: Ic1900ef396b00187ce9eced906c4628436481213
2023-01-30 16:59:43 +00:00
Winson Chung
62c74f9633 Include SysUI state in stashing check
Fixes: 266890635
Test: Open home controls over lockscreen, go back
Change-Id: Ic486ccdc4698f53507bc56875ccebef06826a6a4
2023-01-29 05:57:39 +00:00
Tony Wickham
b9ecff07e4 Fix TaskbarBackgroundRenderer not being applied correctly in 2 cases
- Rename isInAppAndNotStashed to areTaskbarIconsVisibleAndNotStashing,
  and check taskbarViewController.areIconsVisible() accordingly. This
  effectively handles the same as before, but also handles Overview,
  which is not inApp but does have areIconsVisible()
  - This fixes bubble scrim over overview taskbar, as well as showing
    taskbar background behind assistant in 3 button mode.
- Also fix nav bar button dark density changing when applying the
  separate background for assistant

Test: Open bubble and invoke assistant in overview, over IME, inside
an app, over home
Fixes: 266715337

Change-Id: Ie655de7abd1634e2165543d57664d7c7e054a986
2023-01-26 00:53:01 +00:00
Brian Isganitis
b21ad2da8c Implement initial transient Taskbar EDU tooltips.
Since this tooltip looks and behaves differently than the existing EDU
sheet, it has its own view and controller implementations (I also may
have wanted to write some Kotlin).

To keep transient taskbar open while on the second EDU step, another
autohide suspend flag is defined. Additionally, special casing is added
to avoid hiding transient taskbar if autohiding is currently suspended.

Tooltips use the same assets as the bottom sheet for now, and are scaled
down to fit the tooltip dimensions.

Reset `Taskbar Education` in Developer Options to try EDU again.

[Demos]
- First: https://screenshot.googleplex.com/ASBeGvrb2EA5wEF.png
- Second: https://screenshot.googleplex.com/7fnfcTh9bMYezDc.png

Test: Manual
Test: Open app, see swipe-up tooltip.
Test: Swipe up to show transient taskbar, see features tooltip.
Bug: 263157739
Fix: 258460203
Change-Id: I473f5fccbae279db0614763b640da0a120b6b7f7
2023-01-20 15:16:12 -08:00
Sunny Goyal
a34521e434 Updating TaskbarStashController API
> 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
2023-01-14 08:07:44 -08:00
Jagrut Desai
50f1e8dfc2 Adding margin height for transient taskbar to allow users to stash taskbar from full height.
Test: visual(video in buganizer)
Fix: 263526574
Change-Id: I21fd1273b83a4e5efdf7aeacae1303513b9b4d97
2023-01-11 04:16:07 +00:00
Alex Chau
d79e53a5c8 Merge "Add transientTaskbarMargin above taskbar in overview" into tm-qpr-dev 2022-12-20 18:40:48 +00:00
Alex Chau
1b276a1ba7 Add transientTaskbarMargin above taskbar in overview
- Also removed transient_taskbar_two_panels_size and use sw720dp override instead, to be consistent with how we handle small vs large tablet in overview
- Also made isTransientTaskbar mockable so we can test that in DeviceProfileDumpTest

Bug: 260596114
Test: DeviceProfileDumpTest
Change-Id: I3c2236b95d91246e9581531478e3c97601cfb2ec
2022-12-19 17:23:27 +00:00
Alex Chau
bd535c46d7 Only skip stash animation when going to/from Launcher
- Added a cehck on chagnedFlags before skipping stash animation, in additional to !isHotseatIconOnTopWhenAligned check

Fix: 262835548
Test: manual
Change-Id: I5a90213bc0b3f34609a074ba887adbf113e04120
2022-12-19 17:16:08 +00:00
Jon Miranda
a76222d209 Merge "Better support transient and persistent taskbar in taskbar's overlays." into tm-qpr-dev 2022-12-10 02:02:54 +00:00
Brian Isganitis
85ccf120f2 Better support transient and persistent taskbar in taskbar's overlays.
- Transient taskbar nav threshold now works in overlays.
- Delay closing overlay to transient app-window threshold if necessary.
- Persistent taskbar no longer stashes for EDU overlay.
- EDU overlay provides enough bottom padding for transient and
  persistent taskbar.

Test: Manual
Bug: 217261955
Change-Id: I2ae5612ef70a6d09e22f83f8117cdbf2a0a053b8
Fix: 260769010
2022-12-09 11:24:27 -08:00
Federico Baron
47d81686e6 Move AnimatedFloat from quickstep to launcher
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
2022-12-08 13:58:07 -08:00
Tony Wickham
7286c5be98 Add feature flag to force taskbar to be persistent.
This will allow us to test taskbar pinning before the entrypoint for
such a setting is finalized.

Test: manual, TODO: will need to update TaplTestsTaskbar to account for
this mode
Flag: FORCE_PERSISTENT_TASKBAR [off]
Bug: 258604917

Change-Id: I4535978563ffbe9a6cc6ece7720cdb75e787ff44
2022-12-06 00:51:46 +00:00
Jon Miranda
01e90b7787 Merge "Add transient taskbar sizing for twoPanel devices." into tm-qpr-dev 2022-12-02 18:58:08 +00:00
Jon Miranda
a4aaf1aced Add transient taskbar sizing for twoPanel devices.
Bug: 259712417
Test: on two panel device, on tablet device
Change-Id: Iae273b6bbfb254288c234aa5882f39eb0b6a88b1
2022-12-01 16:28:29 -08:00
Alex Chau
cd76ac24b6 Fade in/out taskbar when launching apps from or back to AllApps/-1
- 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
2022-12-01 18:56:30 +00:00
Vinit Nayak
792a827309 Merge "Send corrent SUW insets for taskbar portrait vs landscape" into tm-qpr-dev 2022-11-30 00:50:51 +00:00
Brian Isganitis
39768edb67 Merge changes Idae0c3d8,I8c599912 into tm-qpr-dev
* changes:
  Stash taskbar while EDU is open.
  Remove Taskbar EDU icon wave animation.
2022-11-28 22:14:42 +00:00
Brian Isganitis
84633c1a9d Stash taskbar while EDU is open.
The stashing behavior is consistent with the All Apps overlay.

Test: Manual
Bug: 217261955
Change-Id: Idae0c3d829e806be6c18f00455f7ddd0d60f0efb
2022-11-28 16:02:40 +00:00
Vinit Nayak
209dd03b69 Send corrent SUW insets for taskbar portrait vs landscape
* There were two separate blocks of code for sending insets
for Taskbar during SUW, consolidate those
* We also weren't changing Taskbar window height corresponding
to the added insets/change of height for different
orientations in SUW

Fixes: 253538830
Test: Went through SUW and switched orientations,
no back button overlap

Change-Id: Ifb3bc1c20a793ef062bf338a3bdf933b8ae98c28
2022-11-24 10:29:16 -08:00
Jon Miranda
81bc0b78ce Disallow transient taskbar to un/stash in certain sys ui states
Bug: 258604928
Test: cant un/stash with keyguard, notifications, or qs open
      can un/stash in app as expected

Change-Id: Ib422a35fb31fc818123eae39ac3a7e6deb79f187
2022-11-23 15:26:06 -08:00
Stefan Andonian
146701ca3e Move SharedPreferences code to its own class.
Bug: 251502424
Test: Code compiled correctly.
Change-Id: Iea0d6ab2999504117546ee0f7adc0c7b8b45c065
2022-11-17 17:22:47 +00:00
Jon Miranda
12771e002c Merge "Revert "Revert "Allow transient taskbar to unstash over soft ime""" into tm-qpr-dev 2022-11-16 20:18:27 +00:00
Jon Miranda
f641ddd27e Revert "Revert "Allow transient taskbar to unstash over soft ime""
This reverts commit c8c81a3425.

Reason for revert: fix tests by not auto stashing when ime comes up, but still allow taskbar to show if user initiaties it

Bug: 255818649
Change-Id: Id3ab27dcc205e5a72dbd0481e3eabc10b2e1b643
Test: pull up ime, swipe to reveal taskbar
2022-11-16 16:13:26 +00:00
Sam Dubey
b6acf00e3c Merge "Revert "Allow transient taskbar to unstash over soft ime"" into tm-qpr-dev 2022-11-16 15:20:30 +00:00