Commit Graph

9462 Commits

Author SHA1 Message Date
Tracy Zhou
da6a625f46 Fix icon not showing in staged split from keyboard shortcut
Bug: 246661484
Test: https://screenshot.googleplex.com/8X6ggCoYPD8rzSp
Change-Id: I0fa592b1a027769fd09a6de803ea44f5ae915f43
2023-07-08 13:59:12 -07:00
Winson Chung
55eedd4e5c Merge "Fix an issue with nav bar translations not being updated" into udc-dev am: a53261b9cd am: a8e08175ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23923806

Change-Id: Id330daa9c44cad3ef1733ba2319a8b69260ef99b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 20:01:36 +00:00
Winson Chung
216d00531d Ignore recents transition if there are no closing tasks am: 6f7e15ff64 am: b06c5f7a2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23909000

Change-Id: I69a9a85e57bc1282179f979b073e0e3dab8d59c4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 20:01:25 +00:00
Brian Isganitis
ea206bbad5 Merge "Provide AllApps item OnLongClickListener through ActivityContext." into udc-qpr-dev 2023-07-07 19:43:01 +00:00
Winson Chung
a53261b9cd Merge "Fix an issue with nav bar translations not being updated" into udc-dev 2023-07-07 18:33:16 +00:00
Sunny Goyal
229b2efbae Merge "Fixing crash when using multi-window" into udc-qpr-dev 2023-07-07 03:16:13 +00:00
Vinit Nayak
ea12af617e Merge "Add support for taskbar phone 3 button seascape" into udc-qpr-dev 2023-07-06 23:18:07 +00:00
Sunny Goyal
90bf1f4298 Fixing crash when using multi-window
Bug: 290170868
Test: Verified on device
Flg: N/A
Change-Id: If9129a3a47d651755cc99dfcfc0e9be69c2ca63c
2023-07-06 15:23:06 -07:00
Vinit Nayak
781077ddff Merge "Reset split selection state when swiping to home" into udc-qpr-dev 2023-07-06 22:14:41 +00:00
Brian Isganitis
0acab2532d Provide AllApps item OnLongClickListener through ActivityContext.
This cleans up how alternative AllApps implementations such as Taskbar
and SecondaryDisplay override the default INSTANCE_ALL_APPS listener.
This change will also be helpful for Toast in Taskbar drag-n-drop.

Test: Manual
Bug: 289261756
Flag: n/a
Change-Id: I55eb881bcd1e210852d435a3ea2a6686ce0a9838
2023-07-06 22:12:20 +00:00
Vinit Nayak
5e2a2564e8 Reset split selection state when swiping to home
Bug: 276361926
Fixes: 238651489
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE

Change-Id: Ic1439561f37b50ebf9dfb99edbeece21520798b1
2023-07-06 15:08:05 -07: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
Vinit Nayak
15a9feb67f Add support for taskbar phone 3 button seascape
* Ignore orientation check from ag/22709055 for now,
that will be reverted. This causes recreateTaskbar() to
not run when folding the device

Bug: 274517647
Test: Tested 3 button nav in portrait/landscape/seascape
Flag: persist.wm.debug.hide_navbar_window
Change-Id: Ied02ead677d496b465c748257e32b7db5eb9580c
2023-07-06 13:58:30 -07:00
Liran Binyamin
7fedde35ad Merge changes I93c2232d,I00daff83 into udc-qpr-dev
* changes:
  Align the bubble bar with the taskbar in overview and app
  Update the bubble bar offset on Home
2023-07-06 18:40:27 +00:00
Winson Chung
6f7e15ff64 Ignore recents transition if there are no closing tasks
- In the case where Launcher calls startRecentsTransition while there
  are no other visible tasks, we should not be continuing with the
  transition as there are no tasks for Launcher to control.  This was
  previously handled in RecentsAnimationController in legacy
  transitions, but the safer fix is to ignore it on the Launcher
  side for this release.

Bug: 289175232
Test: Manually trigger empty targets and verify no issues
Change-Id: I3657c000cbc8c14c9ac989c2a57715515c96edb6
2023-07-06 18:09:52 +00:00
Brian Isganitis
cdb56ea2e0 Merge "Only update local zss cache when Taskbar Toast already active." into udc-qpr-dev 2023-07-06 18:03:55 +00:00
Liran Binyamin
d76a9d9240 Align the bubble bar with the taskbar in overview and app
Whenever the bubble bar is unstashed and taskbar is present, the
translationY of the bubble bar is now adjusted so that it is aligned
with the taskbar.

Demo: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/e3dlacSsSebQfEFTEt10JM

Fixes: 286247080
Test: Manual:
      - Add bubbles to the bubble bar.
      - On home observe the bar is aligned with hotseat
      - Switch to overview and observe the bar is aligned with taskbar
      - Go back to home. Bar aligns with hotseat.
      - Launch an app. Swipe up to load taskbar. Bar is aligned with taskbar.
      - Go back to home. Bar aligns with hotseat.
Change-Id: I93c2232d4862be4c97e36ddb6c9d680b01e555ad
2023-07-06 12:10:27 -04:00
Vinit Nayak
8082401a83 Prevent passing in GroupedTaskView when not animating split launch
* With ag/23320818 we started always passing in GroupedTaskView,
which gets used downstream to mean that we are launching an app
from tapping on it in overview
* This caused a bug in the case where we quickswitched to the last
task. Now we pass in null for GroupedTaskView like before

Test: Prior bug (b/274540670) doesn't occur, nor do repro steps
for this one
Fixes: 289163668
Flag: None

Change-Id: I82dd8f26bfc286fefc0995822786cf3980da41d0
2023-07-05 18:21:59 -07:00
Liran Binyamin
c06c7ff6fa Update the bubble bar offset on Home
This is an initial change that positions the bubble bar aligning it
with the center of the hotseat icons. We still need to center it
with the taskbar when in overview.

This change also fixes the touch issues where sometimes the hotseat
icons don't respond to taps. The fix is twofold:

1. Make sure that taskbar insets are always updated when
   BubbleStashController#setBubblesShowingOnHome is called.
2. Update the touchable region in TaskbarInsetsController to account
   for the Y translation of the bubble bar bounds when the bubble
   bar is visible.

Demo: https://screenshot.googleplex.com/6NRyu2CR7Bjs32x

Bug: 286247080
Test: Manual on a physical device
Change-Id: I00daff8341e4d8f5d141b5e0220726f6c03b437c
2023-07-05 17:29:52 -04:00
Jeremy Sim
66ec0f6a28 Merge "Remove flag ENABLE_LAUNCH_FROM_STAGED_APP" into udc-qpr-dev 2023-07-05 21:22:22 +00:00
Jeremy Sim
3137f65dcc Merge "Add logcat logs for splitscreen launch failures" into udc-qpr-dev 2023-07-05 21:22:12 +00:00
Liran Binyamin
16b05e251b Ensure overflow isn't selected when bar is collapsed
After the bubble bar collapsing animation completes, and reordering
is finished, if the bubble overflow is selected, update the selected
bubble to be the first bubble. This ensures that the overflow
is not selected the next time the bubble bar is expanded.

This is done through a callback from the BubbleBarView to the
BubbleBarController with the key of the first bubble. Ideally the view
would just notify that the selected bubble needs to be updated, but
the controller doesn't hold ordering info.

Fixes: 289280431
Test: manual
       - Add 2 bubbles to the bubble bar
       - Expand the bubble bar. The first bubble A should be selected
       - Select the second bubble B
       - Select the overflow
       - Tap on the overflow again to collapse the bubble bar
       - Tap on the bubble bar to expand it
       - Observe that bubble B is first and selected
Change-Id: I0f9c2d628cfaf3a80da55ff634284687425e949a
2023-07-05 12:20:46 -04:00
Jagrut Desai
491b0f9028 Merge "Taskbar All Apps Shortcut Menu Acccessibility Focus" into udc-dev am: fa2a81844f am: d4b4e95bea
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23845422

Change-Id: I9d438b3edda25a7407d30d702013b385b3fd9195
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 23:47:37 +00:00
Jagrut Desai
fa2a81844f Merge "Taskbar All Apps Shortcut Menu Acccessibility Focus" into udc-dev 2023-06-30 22:29:20 +00:00
Treehugger Robot
957d46ae52 Merge "Cleans up bad state when transient taskbar shows on home." into udc-dev am: 2c3c1e46c0 am: 4de15620c2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23852178

Change-Id: Idbb6ded338cf1fe3db8142ba75d54844a9bf1382
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 19:05:32 +00:00
Holly Jiuyu Sun
18e0e1e50a Merge "[a11y] Fix crash when using talkback to add to home screen." into udc-qpr-dev 2023-06-30 17:56:16 +00:00
Treehugger Robot
2c3c1e46c0 Merge "Cleans up bad state when transient taskbar shows on home." into udc-dev 2023-06-30 17:45:50 +00:00
Holly Sun
35b9960b63 [a11y] Fix crash when using talkback to add to home screen.
1. Fix a crash from http://cs/android-internal/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java;l=1928;rcl=d677caa75de74f1c3a88367cad67ae405fd2903d. It can also be `ITEM_TYPE_SEARCH_ACTION`. Remove the `itemType` check and just use the `PendingAddItemInfo` class type.
2. Override `startConfigActivity` in `PinShortcutRequestActivityInfo`, so that `Launcher#onActivityResult` can be triggered properly from `Launcher#processShortcutFromDrop` (http://cs/android-internal/packages/apps/Launcher3/src/com/android/launcher3/Launcher.java;l=1939;rcl=d677caa75de74f1c3a88367cad67ae405fd2903d )
3. Then we call to `Launcher#completeAdd` -> `completeAddShortcut`. The original `info` passed to `processShortcutFromDrop` doesn’t have a `componentName` (new code), so remove the component non-null check from `completeAddShortcut`.

Bug: 287166186
Bug: 287167527
Bug: 287166771
Test: manual
Flag: N/A
Change-Id: Id3e1444de188f2d2af760f58e3d9814a2b7abd88
2023-06-30 08:42:31 -07:00
Treehugger Robot
1b565681fe Merge "Disable all apps from overview in some cases." into udc-qpr-dev 2023-06-29 23:52:09 +00:00
Brandon Dayauon
aa9332af88 Merge "Fix prediction row title consistency" into udc-qpr-dev 2023-06-29 21:45:40 +00:00
Hongwei Wang
49b9fbd188 Merge "Polish home-key from split to pip transition" into udc-dev am: ca08d75e4a am: 93551e9496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23833485

Change-Id: I0a6ef4eee4dfc6244b5ee4a7716c1e625923d4b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 17:58:16 +00:00
Hongwei Wang
ca08d75e4a Merge "Polish home-key from split to pip transition" into udc-dev 2023-06-29 17:17:03 +00:00
Jon Miranda
3bad3ebaad Cleans up bad state when transient taskbar shows on home.
Bug: 279514548
Test: open transparent activity on top of launcher
      unstash taskbar
      go home

Change-Id: I13ab79b334e1f8feda441a82cc4d035c0142f513
2023-06-29 02:51:38 +00:00
Tracy Zhou
96fc36f614 Merge "Use DisplayController.Info to determine if it's a tablet" into udc-qpr-dev 2023-06-29 01:34:00 +00:00
Jeremy Sim
ef603e6ddd Add logcat logs for splitscreen launch failures
This patch makes it so that splitscreen launch failures (when app doesn't support splitscreen, or multi-instance, or if app crashes) are logged in logcat.

Fixes: 280494204
Test: Manual
Change-Id: If12a0c71e88b7b783be505e8a4caabeecc241dd9
2023-06-28 23:36:54 +00:00
Jeremy Sim
d2255f2b79 Remove flag ENABLE_LAUNCH_FROM_STAGED_APP
This patch makes it so that the "launch from staged app" feature, which has been enabled since TQPR3, has its flag removed.

Fixes: 270395567
Test: None
Change-Id: I46878475c0dac5a3d64938ec9dfa5ca4123c7bb4
2023-06-28 22:45:32 +00:00
Jagrut Desai
53d953ccd2 Taskbar All Apps Shortcut Menu Acccessibility Focus
Bug: 280657266
Test: manual
Flag: not needed
Change-Id: I2426636067ce3635b8b24b9f5d093dad7d9ddf4c
2023-06-28 14:48:54 -07:00
Brandon Dayauon
f2ea399ec6 Fix prediction row title consistency
There's an inconsistency with prediction row in 0-state and all apps page.
This happens because we change the number of lines (to 1 line) after calculating and rendering the two lines.
Which is why if you look at the photos, in all apps, Amazon app just shows "Amazon" instead of "Amazon Sh.."

Instead of changing the number of lines after processing, just set a separate display to the prediction app row

bug:288811197
Flag: teamfood
Test: manual - locally added test BubbleTextView
before 0-state: https://screenshot.googleplex.com/5q9iYypgwwtDa8b
before allapps prediction row: https://screenshot.googleplex.com/BVxGMTT43stDzZ9
after allapps prediction row: https://screenshot.googleplex.com/BfNTFPXwf4FHuRN

Change-Id: Ifefe6dc8dd4a117be7b63f92ff837d0467a51f8b
2023-06-28 14:45:07 -07:00
Schneider Victor-tulias
e2e1b79b06 Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-qpr-dev 2023-06-28 19:59:33 +00:00
Schneider Victor-tulias
3ce99d1d96 Merge "Inset the contents of AllSetActivity" into udc-qpr-dev 2023-06-28 19:59:19 +00:00
Brian Isganitis
033ebc8a22 Only update local zss cache when Taskbar Toast already active.
Toast is handling suggestion updates itself during the session, and we
do not need to send along the new search suggestions passed from
bindExtraContainerItems. We should still store the updated suggestions
in memory for the next time Taskbar All Apps is invoked.

Test: Manual
Bug: 216683257
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Flag: ZERO_STATE_WEB_DATA_LOADER
Change-Id: I68673e5941dc4b81c3e72b7ec579f566f13ee4d2
2023-06-28 19:55:28 +00:00
Schneider Victor-tulias
ad2279a26e Handle onFlingFinished onRecentsAnimationStart
If the onRecentsAnimationStart callback runs after the user lifts their finger and onFlingFinished runs, then onFlingFinished never has another chance to run, leaving the user trapped in a state where the launcher is not started and the AllSetActivity is still present but invisible. Reverted to allow onFlingFinished to run onRecentsAnimationStart to handle this edge case.

Flag: not needed
Fixes: 285194839
Test: Ran AllSetActivty with a delay in onRecentsAnimationStart
Change-Id: I33ce5c1d4955b34d4b77d3b740dc599621bd4ed1
2023-06-28 17:43:03 +00:00
Schneider Victor-tulias
ae62216f15 Inset the contents of AllSetActivity
Insetting the contents of AllSetActivity to prevent overlapping with the gesture nav handle

Flag: not needed
Fixes: 275018092
Test: launched AllSetActivity in landscape with largest font and display size
Change-Id: Ia82a007e8a69c637a30c56e079d9c77d73885d9f
2023-06-28 10:02:05 -07:00
Winson Chung
551cbc4969 Merge "Workaround for handling the restart of an already visible task" into udc-dev am: 0da5208bb3 am: c8a2f9111b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23785437

Change-Id: I2a7ebbac3c510d32b70ee57dd8323123800ff09a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 07:52:58 +00:00
Winson Chung
0da5208bb3 Merge "Workaround for handling the restart of an already visible task" into udc-dev 2023-06-28 05:51:59 +00:00
Winson Chung
57c2a79e47 Workaround for handling the restart of an already visible task
- If a task is already visible, then startActivity is a no-op and the
  remote transition that launcher expects to run is not started. As a
  workaround (until restarts are an actual transition), listen for
  the case where a task is restarted and invoke the end callbacks

Fixes: 286016555
Test: Repro steps on the bug
Change-Id: Iec3ab97c8817a5e95399cec90f891d65f369d234
2023-06-28 05:51:54 +00:00
Jerry Chang
3651051182 Polish home-key from split to pip transition
Includes WINDOWING_MODE_MULTI_WINDOW closing target to the condition of
playing fallback animation. So the remaining splitting task won't be
play with iconview animation when home-key to auto-pip consumed another
splitting task in pip transition handler.

Bug: 281476331
Test: repro steps of the bug
Test: pass existing tests
Video: http://recall/-/fLARJNt42LVxc3tt86SneW/eelqATeE1REoOtOEDxeDVR
Change-Id: If05d8841a6a940e61f71683422ef1a3d4e3597c7
2023-06-28 02:10:34 +00:00
Tracy Zhou
0b767c91b5 Use DisplayController.Info to determine if it's a tablet
Fixes: 286942201
Test: N/A
Change-Id: Iabcceaee45f885f1dd188d3ab9039ffd3a036a0e
2023-06-28 00:20:12 +00:00
TreeHugger Robot
d5b3a0a099 Merge "Removing explicit target SDK for launcher" into udc-qpr-dev 2023-06-27 22:34:40 +00:00
Andy Wickham
5555ce326d Disable all apps from overview in some cases.
Specifically, whenever floating search bar would not show in
Overview, we also disable this all apps gesture. This covers
cases such as:
 - Landscape on phones
 - Tablets where taskbar shows in Overview

Note this does not depend on ENABLE_FLOATING_SEARCH flag state.
Just reuses the same LauncherState logic used for that.

Bug: 275132633
Test: Manual on tablet, phone, foldable
Flag: ENABLE_ALL_APPS_FROM_OVERVIEW
Change-Id: I6d6cc404a7dfef7c78b45ac830878032027156d8
2023-06-27 14:53:19 -07:00