Commit Graph

15344 Commits

Author SHA1 Message Date
fbaron 1dcf5b2ef7 Update renamed util function M3HCTToColor in launcher code
Bug: 288120001
Test: none
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:911be164b34224b503fbdd230beddf5046d0dabf)
Merged-In: If4c6783472d7fa05a1162e2f176a613d28f7bec3
Change-Id: If4c6783472d7fa05a1162e2f176a613d28f7bec3
2024-02-22 14:48:09 +00:00
Luca Zuccarini 064b3cda52 Merge "Animate depth from the right value on Taskbar All Apps launches." into udc-dev am: c0891e5e0d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24224609

Change-Id: I5d08083f3aef2141fe561b5e3eab5b005a434ac4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-21 11:33:06 +00:00
Luca Zuccarini c0891e5e0d Merge "Animate depth from the right value on Taskbar All Apps launches." into udc-dev 2023-08-21 11:01:10 +00:00
Bill Yi efdbc1a0cf Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9ac6ce68a6a55b1326fcbe1dd90c43beb4df0deb
2023-08-15 09:45:09 -07:00
Sunny Goyal 033e9a93de Merge "Log appear animation's scale factor" into udc-dev am: 7a080a7e0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24154592

Change-Id: Ief8d0c7c160b13ee5cf74e529d3b0ce54f134dec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 20:44:22 +00:00
Sunny Goyal 7a080a7e0f Merge "Log appear animation's scale factor" into udc-dev 2023-08-04 20:13:43 +00:00
Fengjiang Li 2303acd7d4 Log appear animation's scale factor
Test: Grabbed a bug report b/291974797
Flag: N/A
Bug: 290320302
Change-Id: Ic33dc94806b838a03a2203bdd5701a1eeaeeb7bf
Merged-In: Ic33dc94806b838a03a2203bdd5701a1eeaeeb7bf
2023-08-03 14:25:00 -07:00
Sunny Goyal 9e7bfae98c Merge "[Unfold animation] Do not preemptively start the animation if it has run already" into udc-dev am: 343b896081
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23447960

Change-Id: I75ef7d5e11cf7ffdb18bef5f93df7a298d96d539
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 21:36:21 +00:00
Nick Chameyev 2e53f5ef97 [Unfold animation] Do not preemptively start the animation if it has run already
Currently if we open an app, unfold the device and then go to home
screen we will start the unfold animation preemptively in Launcher
because Launcher activity will receive updated configuration change
(where isTablet = true) only after going back to home screen, not
when unfolding the device.

This causes a problem because SystemUI won't send the unfold animation
events after going back home as the animation has already run, so we
end up with wrongly started animation in Launcher.

This CL fixes the issues by checking if SystemUI has finished the
animation (or if it is currently running) to avoid preemptive animation
start in this case. This is done by subscribing to the original
unfold transition progress provider which emits progress events
sent through IPC from SystemUI.

Bug: 285150685
Bug: 293131586
Test: open an app on folded screen, unfold, go to home screen =>
  check that icons are not squished
Test: fold/unfold when launcher is open
Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b
Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b
(cherry picked from commit 6d756970e7)
2023-08-02 11:41:53 +00:00
Luca Zuccarini 3e91646d12 Animate depth from the right value on Taskbar All Apps launches.
`MyDepthController` in `QuickstepTransitionLauncher` assumes that we
want the background to always animate the same way, matching the rest
state of the workspace (depth == 0). However, in Taskbar All Apps the
background is visible, and depth != 0. We now initialize the one-off
`DepthController` for launches to take into account the latest depth set
by the top level `DepthController`, so there is no jumpcut at the
beginning of the animation.

Note that in my opinion we should use the same `DepthController` for all
cases, rather than having this one-off. I'm looking into the feasibility
of that change, but for now this fixes the issue at hand.

Fix: 292959100
Flag: N/A
Test: manual, see videos in the bug

Change-Id: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca
(cherry picked from commit 627d67549f)
2023-07-27 13:33:21 +00:00
Bill Yi efdab72c00 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I4e2edca61ed43c235d0ad175d9c763f137a1858d
2023-07-26 07:58:46 -07:00
randypfohl 64d723f6a7 Removing obsolete call to start home activity with shell transitions am: 2b3dc6f730
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24156953

Change-Id: I4662a1133716fce5861e899859784848e5daec2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-25 19:12:09 +00:00
randypfohl 2b3dc6f730 Removing obsolete call to start home activity with shell transitions
- The second start activity was causing issues with 3p launchers which
  may not expect another new intent (ie. if it handles gestures at
  the bottom of the screen).  We can't completely remove this logic
  because for button navigation we don't want to fall through to the
  launch-next-task animation below, but we can can continue to
  finish the recents animation immediately.
- With shell transitions, leashes for opening apps are always hidden
  by default so when transitioning to a 3p launcher from
  RecentsActivity we also need to show the surface if we want to
  animate it in

Bug: 289609734
Test: Set 3p Launcher as default, in both gesture & button navigation
      - Go from 3p home -> overview, then overview -> 3p home
      - Go from app -> 3p home
      - Go from app -> overview, then overview -> 3p home
      - Quickswitch from app

Change-Id: I6875083931de63a8097d23d180553885ed7cfb01
Signed-off-by: Winson Chung <winsonc@google.com>
2023-07-21 04:20:29 +00:00
Schneider Victor-tulias 6a86a11ade Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-dev am: 3d1e78a496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23796565

Change-Id: I93f964f879cf8de5148b256770991d102c86a22d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-10 19:08:36 +00:00
Schneider Victor-tulias 3d1e78a496 Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-dev 2023-07-10 18:33:25 +00:00
Bill Yi 039df45c67 Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-dev 2023-07-08 17:48:12 +00:00
Winson Chung 273703131a Merge "Fix an issue with nav bar translations not being updated" into udc-dev am: a53261b9cd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23923806

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

Change-Id: I6308efc06ae3f5283f48b64c504e2638b6482435
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-07 19:19:32 +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
Bill Yi 14d76c5fe6 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I1527753aecdfc71c57ef5ba94e62fe7426b1442e
2023-07-06 22:40:58 -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
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
Jagrut Desai e88a949a17 Merge "Taskbar All Apps Shortcut Menu Acccessibility Focus" into udc-dev am: fa2a81844f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23845422

Change-Id: Iee33ca78be02118b1e6471d9d558c82d05a786aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 23:05:16 +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 67b5bc8c4c Merge "Cleans up bad state when transient taskbar shows on home." into udc-dev am: 2c3c1e46c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23852178

Change-Id: I68510c624c597e572dd4e06b0e36c6d994c60ce1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-30 18:22:29 +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
Hongwei Wang 036ed78e3b Merge "Polish home-key from split to pip transition" into udc-dev am: ca08d75e4a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23833485

Change-Id: If80e354c9e21be74828936960176353e0cea7179
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 17:36:05 +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
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
Schneider Victor-tulias 1b2c2e694c 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
Merged-In: I33ce5c1d4955b34d4b77d3b740dc599621bd4ed1
2023-06-28 17:43:14 +00:00
Winson Chung 20d1a9975e Merge "Workaround for handling the restart of an already visible task" into udc-dev am: 0da5208bb3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23785437

Change-Id: I6252581b2629fdf6b56a76c781460b97edc3eac4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 07:07:50 +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
Jerry Chang 6789ed4838 Merge "Prevent exception when quick switching between two split pairs" into udc-dev am: 26d5493e69
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23792388

Change-Id: I54d305b705fbc8b9f94fdfe21710f5ff89ba64aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-27 18:26:23 +00:00
Jerry Chang 26d5493e69 Merge "Prevent exception when quick switching between two split pairs" into udc-dev 2023-06-27 17:42:42 +00:00
TreeHugger Robot f6d2f1e85f Merge "Restore strong reference to animation runner" into udc-dev am: 1f3c56af5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23793397

Change-Id: I70d2136553f594147ba92ddd09a3afd25163b7d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-27 03:04:07 +00:00
TreeHugger Robot 1f3c56af5b Merge "Restore strong reference to animation runner" into udc-dev 2023-06-27 02:13:00 +00:00
Winson Chung 6cfe2e6cbe Restore strong reference to animation runner
- The remote animation factory needs to be strongly referenced since
  the only other reference is a weakly held one from
  LauncherAnimationRunner, and if a gc happens in between starting
  the animation and the onAnimationStart() callback, then the
  animation will not play.

Fixes: 284106887
Test: Force a gc after creating a remote app launch animation and ensure
      that the runner still exists when the animation starts

Change-Id: I5f584451b41c666916801b8ea0cb470c7ab9fc51
2023-06-26 23:55:23 +00:00
Winson Chung 63090e9506 Merge "Fix NPE due to invalid RecentsView access" into udc-dev am: fa3434fc37
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23810649

Change-Id: I9eed5f3291a942f9067573bcf4e92ea23d326779
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-26 18:25:10 +00:00
Winson Chung fa3434fc37 Merge "Fix NPE due to invalid RecentsView access" into udc-dev 2023-06-26 17:47:49 +00:00
Winson Chung cdf410f134 Fix NPE due to invalid RecentsView access
Fixes: 288829919
Test: N/a, reorganizing code behind null check
Change-Id: I9efe48cab239b521f7e729af06706c352be2499c
2023-06-26 17:47:33 +00:00
Jerry Chang 97eb471f2e Prevent exception when quick switching between two split pairs
When switching in between two split pairs just quick enough, it is
possible to send the second entering split transition while it is
animating the first entering split transition which is merged to a
recents-during-split transition. The split parents might not be
collected into the second transition because the split parents are
already visible at that time, and there is no recents transition to
merge to. So updates to not throwing when there is no split parent when
composing a recents-to-split animation.

Bug: 236226779
Test: repro steps of the bug and the Launcher won't throw
Change-Id: I3a595722721186e8de7d60c9fb8c099ec799804a
2023-06-26 13:49:37 +00:00
Bill Yi d6b0605005 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I5696f163e91f140d9d0c941300098ed82ced9ca5
2023-06-22 18:51:47 -07:00
Jagrut Desai 7e18db97b7 Merge "Suspend immersive mode autohide while pending transient taskbar timeout" into udc-dev am: 9f566dec6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23734004

Change-Id: Iffd8f30a9b83cac020721d496ffbb8bba5c12381
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-22 18:34:49 +00:00
Jagrut Desai 9f566dec6b Merge "Suspend immersive mode autohide while pending transient taskbar timeout" into udc-dev 2023-06-22 18:06:23 +00:00
Vinit Nayak 602038ed7a Merge "Add logs to RemoteTargetGluer for index exception" into udc-dev am: 8492177884
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23711381

Change-Id: If925a3f2706dc66f351319d5a93ecebb2199885e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 21:14:45 +00:00
Mateusz Cicheński b8267920fb Reparent PiP overlay under task as soon as possible am: e338982c97
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23731681

Change-Id: I278da202f07c48d0580502fd08018268e7752325
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-21 20:38:30 +00:00
Vinit Nayak 8492177884 Merge "Add logs to RemoteTargetGluer for index exception" into udc-dev 2023-06-21 20:37:53 +00:00