Commit Graph

164 Commits

Author SHA1 Message Date
Tony Wickham
a179a77e09 Remove obsolete binder calls to TaskTransitionSpec
Fixes: 334312256
Flag: none
Test: manual (no visual regression)
Change-Id: Ie20dc8d4bb0c85a8a256b001fbb92405679618a8
2024-05-01 15:15:18 +00:00
Saumya Prakash
17cd6ca62a Only run search edu when enabled, also make code more generic.
We only need to run the Search edu if it is enabled on devices. The code
itself is also made more generic in terms of method and variable names.

Fix: 330401405
Test: Enable and disable the search function and check whether the edu tooltip shows
up for each specific use case.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I1cea3ee56922c0b47ae7e8379aad4b36570daa17
2024-04-23 22:02:15 +00:00
Vinit Nayak
c0a1fbe872 Merge "Revert^2 "Launch split tasks at beginning of animation instead of the end"" into main 2024-04-19 17:00:37 +00:00
Vinit Nayak
a6bf5a0014 Revert^2 "Launch split tasks at beginning of animation instead of the end"
This reverts commit fb092a9a6c.

Reason for revert: b/333937249

Change-Id: I77bd6c0d2fbe2f2dad074e8e0e741b50d4d7c204
2024-04-19 00:18:16 +00:00
Ivan Tkachenko
e993f92719 Merge "Desktop windowing wallpaper" into main 2024-04-16 15:20:38 +00:00
Ivan Tkachenko
cd1dced953 Desktop windowing wallpaper
* Remove Launcher state manipulation from `DesktopVisibilityController`
* Remove Taskbar state updates for desktop mode in
  `LauncherTaskbarUIController`
* Update app widget animation for Home transision
* Update `RemoteTargetGluer` remote targets setup for Dekstop mode

Bug: 309014605
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_wallpaper_activity DEVELOPMENT
Test: manual
Change-Id: Ie2a7ad214a4d4e7e642d1236f2375ba6d17f3781
2024-04-16 10:59:30 +00:00
Vinit Nayak
e8609736f4 Merge "Revert "Launch split tasks at beginning of animation instead of the end"" into main 2024-04-16 01:11:05 +00:00
Vinit Nayak
fb092a9a6c Revert "Launch split tasks at beginning of animation instead of the end"
This reverts commit 26c11f2c49.

Reason for revert: b/333937249

Change-Id: Ide851596f5be7cea28df18dc27701b3cc0104bf1
2024-04-15 20:39:00 +00:00
Vinit Nayak
24f88860de Merge "Launch split tasks at beginning of animation instead of the end" into main 2024-04-10 20:16:08 +00:00
Alina Zaidi
0580379e30 Rename freeform tasks to desktop tasks
Bug: b/332878426
Test: refactoring CL. Existing unit tests still pass.
Flag: NONE

Change-Id: I24ad9699223dd383ff794ef3b028bf32beca96d7
2024-04-10 12:30:50 +00:00
Brian Isganitis
84fbec0b16 Prevent meta shortcut from cancelling split select state.
There are two things that need to be changed for this to work:

1. Make the isInOverview condition check for any Overview UI (including
   the split select state, modal, etc.)
2. Toggle Home All Apps directly, because firing the intent will cause
   Launcher to pause and resume before the intent is handled. We
misinterpret the pause as a request to cancel split screen. Since
TaskbarManager has a reference to Launcher, we might as well call the
method directly.

Test: Manual
Fix: 319076403
Flag: N/A
Change-Id: Ib8899188f593a168a054a16717df4a95be098557
2024-04-09 16:10:56 -07:00
Vinit Nayak
26c11f2c49 Launch split tasks at beginning of animation instead of the end
* Ideally we animate the live leashes from the placeholder tasks,
that's a lot more changes at this moment so we don't do that
* Instead we just hold off fading in the leashes until the very
end of the animation
* This way taskbar can scale down correctly in both contextual and
app pair launch cases since now launcher visibility will be changed
at the same time

Bug: 308851855
Test: Launches are a bit snappier from workspace/all apps compared
to overview, but in a good way!(?)

Change-Id: I73a9284a2b1a993c5a020396e2aca8499fc5eb09
2024-04-08 22:28:01 -07:00
Saumya Prakash
83646f9b82 Merge "Add Taskbar education for Circle to Search for pinned taskbar" into main 2024-04-06 05:39:28 +00:00
Saumya Prakash
5453c053b9 Add Taskbar education for Circle to Search for pinned taskbar
This change adds a new education tooltip for pinned taskbar that teaches
users how to use Circle to Search invoked through the action key. It won't run on
transient taskbar or if the user is in 3 button mode. The disclosures at
the bottom of the tooltip link to localized legal agreements for the feature.

Fix: 330401405
Test: Pin the taskbar and observe that the next time an app is launched
the edu shows up. After dismissal it shouldn't show up again.
Additionally, click on the disclosures and ensure they launch.
Flag: ACONFIG com.android.launcher3.enable_taskbar_pinning NEXTFOOD

Change-Id: I64aea3004aca77c3ec81b81dea0cfab7a9c1e272
2024-04-06 01:52:49 +00:00
Treehugger Robot
6539e29882 Merge "Launch AppPair live tile when not visible" into main 2024-04-05 02:08:17 +00:00
Vinit Nayak
637274ebc9 Launch AppPair live tile when not visible
* End the recents animation and then relaunch as if
from scratch
* We explicitly ignore the anim for end of recents animation
since that will cause the taskbar to quickly show and stash
again, and we know in this case that we'll quickly be launching
right back into an app

Test: Tested w/ live tile + non live,
fullscreen + app pairs
Bug: 316485863

Change-Id: I6ae8cccc01401935bf96fba8a154216e6b1ad701
2024-04-04 15:58:17 -07:00
Alex Chau
2bf1143079 Merge "Clean-up unnecessary desktop windowing flag usage" into main 2024-04-04 14:04:49 +00:00
Alex Chau
13b7ceeff0 Clean-up unnecessary desktop windowing flag usage
- mDesktopVisibilityController will now be null if desktop windowing flag is disabled
- As a result, all code that uses mDesktopVisibilityController no longer need to check desktop windowing flag
- DesktopTaskView/DesktopTask only populates when flag is enabled, so we don't need to check flag if we already check DesktopTaskView/DesktopTask
- Removed the flag check in SplitToWorkspaceController, as we shouldn't enable split from workspace base on desktop windowing, contextual split already have its own flag
- Also avoid creating GroupTask or DesktopTask for freeform tasks when flag is off, to avoid a crash in RecentsView

Bug: 332655617
Test: manual with desktop windowing flag on/off
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: I0e45f73ad2b0d99dfb4ec3215f973679ca93957c
2024-04-04 12:21:43 +01:00
Sunny Goyal
9e6e3562f0 Using IHomeTransitionListener for listening for Launcher state when taskbar recreates
IHomeTransitionListener was only used when the visibility state changes, but not
when the taskbar is recreated during rotation. Instead we create a static listener
to keep track of current home visibility state

Bug: 331947346
Bug: 331947116
Flag: aconfig use_activity_overlay staging
Test: Manual
Change-Id: Icf613f7fc4f78e3f76a600202687b069d53a16dd
2024-04-02 10:36:54 -07:00
Gina Ko
5b845d2831 Reapply "Support toggling Taskbar All Apps with 3P Launcher." am: 036a83cd99
The revert was not supposed to be auto-merged.

This reverts commit 5a3bf93d82, reversing
changes made to 84f8002586.

Bug: 331384026
Change-Id: Ieb11a8544db90259aae856c4af805c37ce9e68cc
2024-03-26 15:03:31 -07:00
Liana Kazanova
5a3bf93d82 Revert "Support toggling Taskbar All Apps with 3P Launcher." am: 036a83cd99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/26720630

Change-Id: I235f6d6263be6e39a583ac7b1a0783bfc77533c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-03-26 20:57:12 +00:00
Liana Kazanova
036a83cd99 Revert "Support toggling Taskbar All Apps with 3P Launcher."
This reverts commit 176f186a6d.

Reason for revert: DroidMonitor: Potential culprit for http://b/331438065 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: Ie375277ad2f65199749f0211ab50037d4b37e664
Merged-In: Ie375277ad2f65199749f0211ab50037d4b37e664
2024-03-26 20:34:09 +00:00
Brian Isganitis
176f186a6d Support toggling Taskbar All Apps with 3P Launcher.
Taskbar All Apps exists regardless of the default launcher. Thus, we can
toggle it on large screen devices. This CL ties registering the system
action to default launcher and taskbar's enablement.

Test: adb shell input keyevent 117
Test: AllAppsActionManagerTest
Flag: LEGACY ENABLE_ALL_APPS_SEARCH_IN_TASKBAR ENABLED
Fix: 317259709
Change-Id: I26f0ed9e921beac762f3f9e6aaceb1002ad4801a
(cherry picked from commit c113b277e6)
2024-03-26 01:16:39 +00:00
Alex Chau
59781a7d79 Remove DesktopTaskView.isDesktopModeSupported
- Use Flags.eanbleDesktopWindowingMode directly
- Also clean up unnecessary and improper flag usage

Bug: 309008406
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Test: presubmit
Change-Id: I86ce317ce577f279d2ce819d6dc1738204c2631e
2024-03-21 14:05:27 +00:00
Brian Isganitis
c113b277e6 Support toggling Taskbar All Apps with 3P Launcher.
Taskbar All Apps exists regardless of the default launcher. Thus, we can
toggle it on large screen devices. This CL ties registering the system
action to default launcher and taskbar's enablement.

Test: adb shell input keyevent 117
Test: AllAppsActionManagerTest
Flag: LEGACY ENABLE_ALL_APPS_SEARCH_IN_TASKBAR ENABLED
Fix: 317259709
Change-Id: I26f0ed9e921beac762f3f9e6aaceb1002ad4801a
2024-03-15 13:42:10 -04:00
Luca Zuccarini
c9cbc9d5a1 Introduce a new Home animation for workspace and the outgoing task.
The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
2024-03-14 10:48:02 +00:00
Schneider Victor-tulias
56aa9ed61b Update KQS launch task callbacks
Updated KQS to allow launching tasks through OverviewCommandHelper to allow launching the overview task without it having focus.

Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 324888738
Fixes: 324904244
Test: used enter and tap to launch tasks in KQS
Change-Id: I6de38ceea22c362a52a420c8ba0165ba23e5c862
2024-02-20 14:54:08 +00:00
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