Commit Graph

60863 Commits

Author SHA1 Message Date
Alex Chau 4bfc0ee720 Fix return condition in getWorkspacePageTranslationProvider
- When EDIT_MODE was introduced, it added a wrong condition to make it always return DEFAULT_PAGE_TRANSLATION_PROVIDER

Bug: 294228521
Test: manual
Change-Id: If970949c8ab55bc67f98f987a7654ec2db89cdfb
(cherry picked from commit c325c686c7)
2023-08-03 18:58:58 +00:00
Sunny Goyal 343b896081 Merge "[Unfold animation] Do not preemptively start the animation if it has run already" into udc-dev 2023-08-02 20:51:13 +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
Sebastián Franco 8d606e89d3 Disable FOLDABLE_SINGLE_PAGE
The functionality should go back to the same as with phones.
There shouldn't be issues with the reorder or similar behavior since we
are switching form using the MultipageCellLayout to the regular
CellLayout.

The things we need to pay attention to is the the behavior of having two
panels like adding the right number of panels when loading (folding, unfolding and rotating).

Bug: 291822492
Change-Id: I903873e32f35c5ee9e0f3da8581a37d4087d021f
Test: ReorderWidgets
Merged-In: I903873e32f35c5ee9e0f3da8581a37d4087d021f
2023-07-28 22:16:52 +00:00
Bill Yi c78664766e Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-dev 2023-07-27 19:21:11 +00:00
Treehugger Robot b14567e102 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev am: 6fed3c88c4 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24211308

Change-Id: Icd2980a367f1e9e23f802fc92762ce02c22b64ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 19:20:02 +00:00
Bill Yi d87d21baa3 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: d8cca7c8cb -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24211308

Change-Id: I9f85944234447dd5eee42b3a372a6817d11a78a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 19:19:51 +00:00
Bill Yi 2a2b8fe6f7 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 7350b79bfb -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24211310

Change-Id: I53f6ddba02bbc6fbb8fa8227e6f304a5201d8a11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-27 19:05:13 +00:00
Treehugger Robot 6fed3c88c4 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2023-07-27 18:23:30 +00:00
Bill Yi 7350b79bfb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I96cce710ae4548fa8f50f996e2f4528ce35c6840
2023-07-26 08:01:31 -07:00
Bill Yi d8cca7c8cb Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ica6034d7c219f6275ea2110d1689a15fa34c69c5
2023-07-26 07:59:31 -07: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 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
Federico Baron 8002897694 Merge "Fix inability to remove or interact with folder when removing 2nd item from folder" into udc-dev 2023-07-17 17:11:26 +00:00
Sebastián Franco be4a43c1d9 Merge "Creating a correctly populated mOccupied grid when reordering on foldables" into udc-dev 2023-07-14 22:43:16 +00:00
TreeHugger Robot cbd5c73dc9 [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev am: c9bbee3d32 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24073762

Change-Id: I9d616e44ccfc66a17dac1b207e8605a3b2229fc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-14 18:49:46 +00:00
Bill Yi e247b07ee4 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 761745611d -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24073762

Change-Id: I63777bffc754dd5479587c878415b6facdbc4328
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-14 18:49:41 +00:00
Bill Yi b916d92ef5 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: dff0eb0871 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24073941

Change-Id: Idb7310317a15aafc5222660fb0eed885799bc7a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-14 18:45:05 +00:00
TreeHugger Robot c9bbee3d32 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2023-07-14 18:18:10 +00:00
Bill Yi dff0eb0871 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Id61998bc5d1733001a6354631c3300745996255f
2023-07-13 19:59:12 -07:00
Bill Yi 761745611d Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I7cfa27af036f38fc48e1e8e6bcbe70e2ddce5a91
2023-07-13 19:57:15 -07:00
Sebastian Franco 52d9d9780f Creating a correctly populated mOccupied grid when reordering on foldables
On ag/21680045 I copy the previous mOccupied but the right thing to do is to
create a new one with all the views information.

Some test stoped running inadvertently that's why we didn't catch this issue.

There is a separate cl with the test to ensure we can catch it later on.

Fix: 289584301
Test: ReorderWidgets
Change-Id: I27b5a6e38a556d1c73ff8fbbdd552da6045e5b64
(cherry picked from commit 1c5514b566)
2023-07-13 20:45:28 +00:00
fbaron 326ec97ab6 Fix inability to remove or interact with folder when removing 2nd item from folder
Fix: 289960317
Test: Verify in unfolded felix that going from 2 icon folder and dragging 2nd icon out of folder lets you open the app that remains where the folder was
Test: Verify in unfolded felix that going from 2 icon folder and dragging 2nd icon into remove droptarget removes the folder and turns it into a single clickable icon
flag: no flag
Change-Id: I26138ee9f8e7cdb45cafe2446dc4d1e3d6d8347f
(cherry picked from commit 5a7ea3069b)
2023-07-13 18:06:33 +00:00
Becky Qiu aa6612d373 Fix the issue that on tablet/unfold, the allapps background color is wrong.
As the new spec, it should use materialColorSurfaceDim for all devices.

Bug: 288493929
Test: manual, before: https://screenshot.googleplex.com/7YxpFGekwm6Gz6N, after: https://screenshot.googleplex.com/44Gr2dBfWSct7FK
Flag: no flag needed.
Change-Id: Ic33d9a758fe9fbaa0f735c874a545df711a18e2f
2023-07-12 00:25:58 +00:00
Schneider Victor-tulias 3d1e78a496 Merge "Handle onFlingFinished onRecentsAnimationStart" into udc-dev 2023-07-10 18:33:25 +00:00
Bill Yi 23cab2aefe [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 6dbeb857dd -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23971854

Change-Id: I3408452f910afc64ec0d3934be5749053f6f1fbb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-08 18:30:19 +00:00
Bill Yi 74b56cdf68 Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-dev 2023-07-08 17:48:12 +00:00
Bill Yi 039df45c67 Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-dev 2023-07-08 17:48:12 +00:00
Andrew Cole 81ab7aa4a9 Merge "Updating materialColorSurfaceContainerHighest color access" into udc-dev 2023-07-07 21:14:26 +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 f2ad619c22 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9722fc801c1aa0b9c7d7956792595054e8e2f09a
2023-07-06 22:42:52 -07:00
Bill Yi 6dbeb857dd Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ib0b4f7554a34dcf7f22c8b6b6fa579ec2a1e945c
2023-07-06 22:41:45 -07: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
Andrew Cole a9af3bd03d Updating materialColorSurfaceContainerHighest color access
For any view files applying the WidgetConatinerTheme via widgetsTheme they were incorrectly inheriting themes and skipping the AppTheme provided but only in light mode. In dark mode the WidgetContainerTheme.Dark was correctly inheriting the theme.

To avoid a risky theme update for all widgetsThemes we just modify the color accessor to use @color instead of ?attr as these colors should not be attributes AFAIKT

Bug: b/289305591
Test: Follow repro steps on the bug for smartspace
Change-Id: I26cc3239763f8eac3dfe5f094c6757692f46d1bc
2023-07-06 19:29:30 +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 fa2a81844f Merge "Taskbar All Apps Shortcut Menu Acccessibility Focus" into udc-dev 2023-06-30 22:29:20 +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
Mateusz Cicheński 665524cc37 Merge "Remove the keep clear areas XML tag from Hotseat" into udc-dev 2023-06-29 17:55:57 +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 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 26d5493e69 Merge "Prevent exception when quick switching between two split pairs" into udc-dev 2023-06-27 17:42:42 +00:00
Mateusz Cicheński b5b218eea9 Remove the keep clear areas XML tag from Hotseat
It reports its size through SystemUiProxy and this tag causes it to
report the region twice. Additionally upon screen rotation the value
is getting updated with a delay, so for a moment two keep clear areas
for Launcher are present - one from the previous orientation (on the
side), and one from the current orientation (matching the proxy value
in unrestrictedKeepClearAreas).

Bug: 285242520
Test: before http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/cLtiXGYUyItm2kNCCEkkWA
Test: after http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/iPs6fwdSXG3TE0IERmxA8
Change-Id: I40dfe08680c944f2be5db0f6b15515492f409565
2023-06-27 02:58:26 +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