Commit Graph

137 Commits

Author SHA1 Message Date
Jon @
d3693424f5 Merge "Notify home is visible when launching a translucent app." into main 2024-02-16 21:43:28 +00:00
Jon Miranda
26447ddc98 Notify home is visible when launching a translucent app.
To fix the taskbar stash delay when launching an app, ag/18875100
sets the state so that the taskbar stashes immediately after
app is launched.

Since we cannot know if the app is translucent at that point,
we have to check after the animation is started so we can update the
launcher visibility state.

Bug: 314792981
Flag: ACONFIG ENABLE_HOME_TRANSITION_LISTENER TRUNKFOOD
Test: HomeObserverTest
Change-Id: Ifc3a6559d7a8c6fda4c08a0fc2d6791da46b38d6
2024-02-15 13:55:42 -08:00
Tracy Zhou
e9f4635426 Show hotseat instead of stashed taskbar handle after entering stage split from fullscreen app via keyboard shortcut
Besides finishing the recents animation from fullscreen app, we also need to update the taskbar state

Fixes: 323561157
Test: Go to a fullscreen app, trigger the split shortcut, make sure the hotseat icons are visible on the home screen
Change-Id: I36f47846ed0bc7f7036ae22452a28efc9cb09bc7
2024-02-03 06:04:00 +00:00
Vinit Nayak
febd61fb3f Prevent taskbar animation for contextual split from home
* Ideal animation TODO, this is to help
unblock for now.

Flag: Flag: ACONFIG com.android.wm.shell.enable_split_contextual DEVELOPMENT
Test: With flag on and off, from home, overview, all apps
Bug: 296351434
Change-Id: Ida743a881519796ed8ce3e5966aa708c84521c51
2024-01-24 19:46:30 -08:00
Tony Wickham
480448b059 Merge "Temporary workaround for taskbar hiding in Desktop" into main 2024-01-11 23:21:42 +00:00
Tony Wickham
4e7411c54c Temporary workaround for taskbar hiding in Desktop
Taskbar still hides during the transition, but then reappears
after settling.

Flag: LEGACY ENABLE_HOME_TRANSITION_LISTENER enabled
Bug: 314207404
Test: manual
Change-Id: Ie3d29b3d40e513f39cb34176baa781c9f2853e57
2024-01-10 19:59:25 +00:00
Schneider Victor-tulias
5bc6a0aa1f Update KQS task launch animation
Updated the KQS app launch animation to match the spec: translate the launching app from the left (right in RTL) and translate the closing app to the right (left in RTL)

Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 313606549
Fixes: 313607264
Test: launched tasks from KQS from home and launched app
Change-Id: I0e903c741e4f930b377607b7eaf42a87177c3eb6
2024-01-08 16:19:17 -05:00
Jon Miranda
20fdc7b508 Move taskbar clean up so that it only gets called when user swipes up to go home.
This fixes the bug where the flag gets set when user taps on nav handle, which
results in the taskbar animation playing.

Flag: N/A
Test: open app
      wait for taskbar to finish stashing*
      tap on nav handle
      nothing happens (desired affect)
      * I will address tapping on taskbar while its animating in a separate change
Bug: 292108880
Change-Id: I75870050225bdd951c69224d272d0bd5a3d6d4ea
2023-12-13 02:51:28 +00:00
Schneider Victor-tulias
dc4b61be59 Merge "Fix Keyboard quick switch screenshots and spliscreen launch" into main 2023-12-05 04:10:13 +00:00
Jon Miranda
bd53046738 Allow initial call to onLauncherVisibilityChanged when using home transition listener.
Fixes: 308632502
Flag: ACONFIG ENABLE_HOME_TRANSITION_LISTENER TEAMFOOD
Test: HomeTransitionObserverTest
Change-Id: I8992f8f74cbfa7e98a79a136265ee6c4ad784c2c
2023-11-29 13:35:03 -08:00
Schneider Victor-tulias
f67c54b48f Fix Keyboard quick switch screenshots and spliscreen launch
Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 312449590
Fixes: 292182490
Test: TaplTestsKeyboardQuickSwitch, keyboard quick switched with split app pairs
Change-Id: I0faf2f7d58b39270ad6e5a065cf59f48e0dd23f0
2023-11-29 15:59:04 -05:00
Jon Miranda
60ae29ef08 Migrate ENABLE_HOME_TRANSITION_LISTENER to launcher.aconfig
Also set flag to TEAMFOOD.

Flag: ACONFIG ENABLE_HOME_TRANSITION_LISTENER TEAMFOOD
Bug: 306053414
Test: manual
Change-Id: Icf3947e61fa9f20f5b6e5ca2af96e693b55d3edc
2023-10-27 16:43:01 +00:00
Jon Miranda
00c3d78191 Add HomeTransitionListener to launcher.
Fixes: 279514548
Bug: 284474103
Bug: 306053414

Flag: LEGACY ENABLE_HOME_TRANSITION_LISTENER DISABLED
Test: App launch -> Hotseat -> Taskbar stashes
      Transluscent app launch and launcher still visible -> No change
      Going home -> Hotseat visible

Change-Id: I6db5253ada3e3b37dfae124f3ee88a9805804fb8
2023-10-20 15:46:11 -07:00
Sunny Goyal
cd44740567 Moving onboarding prefs to use LauncherPrefs
Bug: 301661768
Test: Presubmit
Flag: N/A
Change-Id: Iec8a5e739f394a152d5ffc57b01e0449e94b4084
2023-10-10 11:47:33 -07:00
Liran Binyamin
e41e6185e4 Make the bubble bar flag dynamic in Launcher.
Changing the flag currently requires a reboot, because it is read once when the process starts and never changes.
This change triggers a re-read of the flag value from SystemProperties whenever Taskbar is recreated.
This allows setting the flag as part of integration tests for bubble bar.

Bug: 273994695
Test: Manual:
       - turn flag off
       - create bubbles
       - observe floating bubbles are added
       - turn flag on
       - change navigation mode to gesture navigation
       - observe bubble bar becomes visible
Change-Id: I277ea6aa2c8d3ab04094537bf4cd31630310dfec
2023-10-03 10:49:30 -04:00
Liran Binyamin
a833af316b Adjust the hotseat when the bubble bar becomes visible
When the bubble bar becomes visible the space between icons in the
hotseat is now adjusted. This change only does it when the QSB is
above the icons, but this will be changed in the future to be based
on the amount of space between the hotseat and the edge of the screen.

When the hotseat is adjusted, the new width is smaller by the size of
2 icons. The icons are then translated to be evenly spaced within the
boundaries of the new width.

Since the adjustment is only applied when the QSB is above the icons,
it is resized accordingly to the new width.

All visual updates currently snap to the new position, but will be animated
in a follow up.

Demo: https://recall.googleplex.com/projects/3391fc5c-599d-4827-b6f8-d2deb160aa99/sessions/fad1a5c5-e9cf-4586-92e4-1e92df3b002e

Bug: 280494203
Test: Manual (on tangor)
      - Set device to landscape
      - Make the bubble bar visible by adding a bubble
      - Rotate to portrait mode
      - Observe that the hotseat is adjusted
      - Rotate to landscape
      - Observe that the hotseat adjustment is removed
      - Rotate back to portrait
      - Observe that the hotseat is adjusted again
      - Dismiss the bubble to hide he bubble bar
      - Observe the hotseat adjustment is removed

Change-Id: I5b02a60b6cb301ffa2507a6d825c748a782cca18
2023-09-13 17:08:42 -04:00
Winson Chung
51c94c622e Merge "Fix an issue with nav bar translations not being updated" into udc-dev am: a53261b9cd am: 273703131a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23923806

Change-Id: Id2e78875d607f8deb1511a235d761f662eafbdd5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 20:01:47 +00:00
Winson Chung
ccd359d76c Fix an issue with nav bar translations not being updated
- There are flows where the shared taskbar state is updated prior
  to being destroyed, and not updated to the latest values when
  the taskbar is recreated.

  ie.
    unfolded -> lock screen -> LauncherTaskbarUiController's
      mTaskbarInAppDisplayProgress[SYSUI_SURFACE_PROGRESS_INDEX]
      is set to 1 due to the notif shade (lockscreen) showing.
      This is written into TaskbarSharedState's sysuiStateFlags
      and inAppDisplayProgressMultiPropValues.
    fold -> TaskbarActivityContext is destroyed
    unlock -> TaskbarManager and TaskbarSharedState's
      sysuiStateFlags are updated while the device is folded
    unfold -> TaskbarActivityContext is recreated and initialized
      which restores from the shared state's
      inAppDisplayProgressMultiPropValues. It also tries to reapply
      the shared state's sysuiStateFlags, but this doesn't update
      inAppDisplayProgressMultiPropValues because the state's
      "enabled" state is not updated (default is no flag set, and
      lockscreen sysui state is not set anymore).
    -> The restored inAppDisplayProgressMultiPropValues value
       results in the wrong translation.

- Note that after the above, the NavbarButtonsViewController state
  is actually correct and reflects the SysUI state, but the
  LauncherTaskbarUiController state is wrong.  This CL tries to
  manually update the ui controller to the correct state when it
  is recreated.
- CL also fixes a separate issue where LauncherTaskbarUIController
  could potentially overwrite the saved state progresses while
  restoring them due to the state callback being called

Bug: 283346744
Test: Unfold -> Lockscreen -> Fold -> Unlock -> Unfold and ensure
      the buttons are translated correctly



Change-Id: I43e473faf4fa2a493b9705506e3755df8f6264e7
Signed-off-by: Winson Chung <winsonc@google.com>
2023-07-06 22:01:49 +00:00
Jagrut Desai
6bf3af0b81 Match Navigation Icon Colors Folded/unfolded
Recently we did color token migration for Taskbar which included navigation icon also, but phones and foldable device can't really adapt to new color tokens because of contrast issue with underlying wallpapers.

As a result, now home screen which default back to balck and white nav icon colors while all apps and in app navigation icon color will be themed to new GM3 Color tokens.

Test: Manual
Bug: 284408922
Flag: Not needed
Change-Id: I8c8ea11ebb7237885ae4673fda0409ab463b37db
2023-06-16 20:13:15 +00:00
Winson Chung
de1b42b957 Only refresh the launcher resume state when the task launch fails
- The previous call from TaskbarLauncherStateController caused a
  regression due to the inability for the code to distinguish
  Normal -> Background -> Normal when tapping on the bar area
  or from failing to launch a task, so both cases were triggering
  the resumed state to cycle and start an animation.  For now we can
  only handle the task-launch fail case.

Bug: 268448123
Fixes: 281966662
Test: Quickswitch to an activity that finishes when resumed
Change-Id: Ie4692dd85252540ff47633978c0e6e4adbb1bdd0
2023-05-11 23:31:14 +00:00
Mike Schneider
593ff77267 Revert ag/22195243 and solve the initialization issue it was supposed to fix differently
The fix caused a flicker tests to fail, but that is specific to the persistent taskbar used in tests only.

Bug: 277470898
Bug: 277003116
Fixed: 277470898
Fixed: 277003116

Test: Flicker tests passes
Test: Manual (http://shortn/_kiAZykhZsp)
Test: Tapl presubmit tests
Change-Id: Ib9daebf3b06af2f1a4a3b7461acf91f204ff281b
2023-04-13 11:37:39 +00:00
Brian Isganitis
3ef917a4e3 Cleanup ENABLE_TASKBAR_EDU_TOOLTIP: remove EDU sheet.
Test: Manual
Fix: 270396268
Change-Id: I3cebdb6646060cf6793e5ffc638213dde41338c0
2023-04-10 12:55:18 -04:00
Tony Wickham
38e185ddcb Merge "Restore proper nav buttons translation when taskbar is recreated" into tm-qpr-dev am: 3292947a73 am: 75a0c72d00
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22090087

Change-Id: I7e4613202ceaa9e66e4592438668fadb057fc993
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 16:26:40 +00:00
Mike Schneider
2736f2ed5b Do not play unstash animation when unlocking the device am: 94f46e14f4 am: 14db451c21
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22119728

Change-Id: I201404e1642a22dabae740e01d4b8bd06d36ca3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22 16:18:10 +00:00
Tony Wickham
3292947a73 Merge "Restore proper nav buttons translation when taskbar is recreated" into tm-qpr-dev 2023-03-22 15:27:00 +00:00
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
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
Mike Schneider
7b410f24b4 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
2023-03-21 10:27:13 +00:00
Tony Wickham
0c6ccca22d Restore proper nav buttons translation when taskbar is recreated
Since mTaskbarInAppDisplayProgressMultiProp is set by various states
that are hard to query in init() (e.g. state of all apps, -1, widgets,
etc.), we store the last mTaskbarInAppDisplayProgressMultiProp in the
TaskbarSharedState and restore those values in init().

Also updated some debug logs in the dump.

Test: manual: from home screen, swipe down to quick settings and toggle
Dark theme, ensure nav buttons don't translate; do the same but over
launcher all apps
Flag: none
Fixes: 267325761

Change-Id: Ib8e6778582ed39c674cd3c1e95312e673659f6a7
2023-03-16 00:06:22 +00:00
Brian Isganitis
d1b7b5141f Merge "Log when taskbar is in task switcher container." into tm-qpr-dev am: ba5b25c198 am: cba28f0b3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21780681

Change-Id: Iac3de6884edf1a160da9baeb33929fcdd92eaf3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 19:45:04 +00:00
Brian Isganitis
ba5b25c198 Merge "Log when taskbar is in task switcher container." into tm-qpr-dev 2023-03-08 18:56:02 +00:00
Brian Isganitis
c762ef68d4 Log when taskbar is in task switcher container.
Test: wwdebug & wwlogcat
Bug: 261177876
Change-Id: Id4eda7ee7e4e2c1aa60e07d5b65410b3847d9ac6
2023-03-07 03:29:21 +00:00
TreeHugger Robot
0ef1f9eae0 Merge "Translate taskbar to hotseat without jump when swiping up from overview" into tm-qpr-dev am: 3dd1440520 am: f5153d5de2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21592805

Change-Id: Icf82154155ba1a54c36d72658102d2661b6bec30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 03:16:40 +00:00
Brian Isganitis
8ecb5eeb62 Merge changes from topic "running-in-test-camel" into tm-qpr-dev am: d2d2913812 am: 0c15dabc48
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21725479

Change-Id: I3d02a42c2d0bdebc2487def8696d9a489aca7311
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:08:07 +00:00
Brian Isganitis
2790c9dbbf Merge "Implement light mode for persistent Taskbar." into tm-qpr-dev 2023-03-06 23:07:41 +00:00
TreeHugger Robot
3dd1440520 Merge "Translate taskbar to hotseat without jump when swiping up from overview" into tm-qpr-dev 2023-03-04 00:18:16 +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
473cfe0a1a Implement light mode for persistent Taskbar.
NavbarButtonsViewController has been massaged to make sure the buttons
contrast well with the color of the Taskbar background that they are on,
if applicable.

Test: Manual
Fix: 268052229
Change-Id: I917a1a1be013c304910b0f674ae8a13abb8e47a1
Merged-In: I917a1a1be013c304910b0f674ae8a13abb8e47a1
2023-03-03 00:35:20 +00:00
Brian Isganitis
977a62fa41 Merge "Implement light mode for persistent Taskbar." into udc-dev 2023-03-03 00:34:02 +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
Tony Wickham
10c78b94f5 Translate taskbar to hotseat without jump when swiping up from overview
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
2023-03-01 19:20:57 +00:00
Alex Chau
cbab01c721 Merge "Land ENABLE_TASKBAR_IN_OVERVIEW" into tm-qpr-dev am: 6a10a003d6 am: a1907c710e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21538759

Change-Id: Ibf2a35e5d54d2938a00cb251ddb71656f6308207
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 18:19:32 +00:00
Alex Chau
8aa3f00238 Land ENABLE_TASKBAR_IN_OVERVIEW
Fix: 270393449
Test: manual
Change-Id: I731bfa8ee86154fd034781e27272abc81a6fe6c6
2023-02-28 20:18:32 +00:00
Brian Isganitis
cae62a563a Implement light mode for persistent Taskbar.
NavbarButtonsViewController has been massaged to make sure the buttons
contrast well with the color of the Taskbar background that they are on,
if applicable.

Test: Manual
Fix: 268052229
Change-Id: I917a1a1be013c304910b0f674ae8a13abb8e47a1
2023-02-27 23:25:42 +00:00
Tiger Huang
210c689996 Merge "Use insetsRoundedCornerFrame to check if taskbar is expanded or not" into udc-dev 2023-02-23 04:37:01 +00:00
Schneider Victor-tulias
34f8c2f14a Merge "Keyboard quick switch polish" into tm-qpr-dev am: 8129ebfd04 am: 42f0aaac4b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21466357

Change-Id: Ic68faa66297ea8bd2b960ec485bc0c421142122b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 22:46:07 +00:00
Schneider Victor-tulias
8129ebfd04 Merge "Keyboard quick switch polish" into tm-qpr-dev 2023-02-21 21:03:30 +00:00
TreeHugger Robot
af1c102e69 Merge "Translate the taskbar icons to match nav handle shape." into tm-qpr-dev am: 9769b2844c am: 90cf9e6855
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21452616

Change-Id: I2b925e0e493bd3dc303d41e940962d9cd9c55d7a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 05:35:44 +00:00
Tiger
2d2e34cf81 Use insetsRoundedCornerFrame to check if taskbar is expanded or not
When taskbar is expanded, insetsRoundedCornerFrame will be set to true
via LayoutParams. We can adjust animation bounds or crop the taskbar
surface based on the insetsRoundedCornerFrame. In this way, the insets
types in TaskTransitionSpec can be removed.

This is a step to remove ITYPEs.

Bug: 234093736
Test: atest LetterboxUiControllerTest SizeCompatTests
Change-Id: Ibffd5beaf49f3196356b140938c4b2c8cc9d424e
2023-02-20 19:20:52 +08:00
Schneider Victor-tulias
0bba3d6184 Keyboard quick switch polish
- Added support for escape(backtick on some keyboards) keyboard keys
- Added support for d-pad left and right keyboard keys
- Fixed janky behaviour when quick switching too quickly.
- Removed unused code

Bug: 269618928
Test: Tried quick switch very quickly, tried escape, d-pad left and right keys in RTL and LTR modes
Change-Id: Ie03207cb349891e9c2de18502f3f65b7c8f9c018
2023-02-17 15:44:04 -08:00