Commit Graph

9247 Commits

Author SHA1 Message Date
Xin Li
30f1ecd3ec Merge UP1A.231005.007
Bug: 291102124
Merged-In: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca
Change-Id: Ib512ae38486a5c225bc0b3faa3ffcbbbcdd4d984
2023-09-27 16:05:12 -07:00
Colin Cross
70ca32bca2 Fix kotlin nullable errors in Launcher3
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

This relands I26edfec35dca14abe90b08e3c74de0446eda95d2 with a fix in
SplitSelectDataHolder.kt to call createPackageContext when user is null
instead of asserting that it is not null.

Bug: 294110802
Test: builds
Test: WMShellFlickerServiceTests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4cc251e6c1bd5e06ef24a92e08aae043cf3f2587)
Merged-In: I4525d0fa83a1db9cc5cff90f340fc3f863537c01
Change-Id: I4525d0fa83a1db9cc5cff90f340fc3f863537c01
2023-09-11 20:35:47 +00:00
Colin Cross
e892df24ca Fix kotlin nullable errors in Launcher3
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2608381792389b60ba37c08afcea09dca3c6ff9c)
Merged-In: I26edfec35dca14abe90b08e3c74de0446eda95d2
Change-Id: I26edfec35dca14abe90b08e3c74de0446eda95d2
2023-09-11 20:35:41 +00:00
Xin Li
841dfad3d6 Merge UP1A.230905.019
Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b
Change-Id: I130465c5f31cededa1edc540123d83c6dedc9487
2023-08-31 12:31:10 -07:00
Luca Zuccarini
b38e61a339 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

(cherry picked from commit 627d67549f)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3e91646d123abbe58ccc0544746145ce5024b923)
Merged-In: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca
Change-Id: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca
2023-08-22 02:15:08 +00:00
Nick Chameyev
14b4f9edcc [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
(cherry picked from commit 6d756970e7)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2e53f5ef97a02d25f508774e82985e24dc2f4d2d)
Merged-In: Ic437ff4d19cbd5764635f3007d99880622150f5b
Change-Id: Ic437ff4d19cbd5764635f3007d99880622150f5b
2023-08-22 02:14:49 +00:00
Xin Li
41dd5f48d6 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: Ia7c5c2101a30d0eaae0fc92801186e66baec449d
Change-Id: Ic9654f2c43bbfb878e3f46eb39698b570fb8dd44
2023-08-17 12:13:35 -07:00
Colin Cross
7b5878e03e Fix kotlin nullable errors in Launcher3
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I26edfec35dca14abe90b08e3c74de0446eda95d2
Merged-In: I26edfec35dca14abe90b08e3c74de0446eda95d2
2023-08-10 11:16:55 -07:00
randypfohl
c59599dc19 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

Signed-off-by: Winson Chung <winsonc@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2b3dc6f73007f8b7d97ae2972e37c5d055659c8b)
Merged-In: I6875083931de63a8097d23d180553885ed7cfb01
Change-Id: I6875083931de63a8097d23d180553885ed7cfb01
2023-07-26 00:57:07 +00:00
Schneider Victor-tulias
e0600c6bca 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1b2c2e694c6e233057570d3e8b4e5a0aa9c0c51a)
Merged-In: I33ce5c1d4955b34d4b77d3b740dc599621bd4ed1
Change-Id: I33ce5c1d4955b34d4b77d3b740dc599621bd4ed1
2023-07-11 00:39:11 +00:00
Winson Chung
1672e8a367 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



Signed-off-by: Winson Chung <winsonc@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ccd359d76c7f42d4fc799f19d54a66c7c2fa462a)
Merged-In: I43e473faf4fa2a493b9705506e3755df8f6264e7
Change-Id: I43e473faf4fa2a493b9705506e3755df8f6264e7
2023-07-09 10:03:30 +00:00
Winson Chung
1f6a5f50e5 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f7e15ff644bac2f11ecb779030255efebc18885)
Merged-In: I3657c000cbc8c14c9ac989c2a57715515c96edb6
Change-Id: I3657c000cbc8c14c9ac989c2a57715515c96edb6
2023-07-09 10:03:24 +00:00
Jagrut Desai
7cc6f65011 Taskbar All Apps Shortcut Menu Acccessibility Focus
Bug: 280657266
Test: manual
Flag: not needed
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:53d953ccd24cd378418d9bd8c9964589fb1af44a)
Merged-In: I2426636067ce3635b8b24b9f5d093dad7d9ddf4c
Change-Id: I2426636067ce3635b8b24b9f5d093dad7d9ddf4c
2023-06-30 23:26:29 +00:00
Jon Miranda
df537ccdb7 Cleans up bad state when transient taskbar shows on home.
Bug: 279514548
Test: open transparent activity on top of launcher
      unstash taskbar
      go home
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3bad3ebaad529a8be587b9c0eae61faf87ea8505)
Merged-In: I13ab79b334e1f8feda441a82cc4d035c0142f513
Change-Id: I13ab79b334e1f8feda441a82cc4d035c0142f513
2023-06-30 23:26:22 +00:00
Jerry Chang
4fdf5684fe 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:365105118220b218005225b038142273524877cc)
Merged-In: If05d8841a6a940e61f71683422ef1a3d4e3597c7
Change-Id: If05d8841a6a940e61f71683422ef1a3d4e3597c7
2023-06-30 03:17:29 +00:00
Winson Chung
5cdfa120df 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:57c2a79e47bc583306bd77ea3039d821a8d33dde)
Merged-In: Iec3ab97c8817a5e95399cec90f891d65f369d234
Change-Id: Iec3ab97c8817a5e95399cec90f891d65f369d234
2023-06-29 03:39:15 +00:00
Jerry Chang
8a7181d45e 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:97eb471f2efda1eccce7eba8c68301b2fa34c5e7)
Merged-In: I3a595722721186e8de7d60c9fb8c099ec799804a
Change-Id: I3a595722721186e8de7d60c9fb8c099ec799804a
2023-06-28 01:27:37 +00:00
Winson Chung
18f815a7fd 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
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6cfe2e6cbe52f5fc9aa0eb94afaeb7679810cc13)
Merged-In: I5f584451b41c666916801b8ea0cb470c7ab9fc51
Change-Id: I5f584451b41c666916801b8ea0cb470c7ab9fc51
2023-06-28 01:27:30 +00:00
Winson Chung
5148c096e1 Fix NPE due to invalid RecentsView access
Fixes: 288829919
Test: N/a, reorganizing code behind null check
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:cdf410f1349edf3451e1a8af64ea2d8cd676ffaa)
Merged-In: I9efe48cab239b521f7e729af06706c352be2499c
Change-Id: I9efe48cab239b521f7e729af06706c352be2499c
2023-06-27 00:42:01 +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
8492177884 Merge "Add logs to RemoteTargetGluer for index exception" into udc-dev 2023-06-21 20:37:53 +00:00
Mateusz Cicheński
e338982c97 Reparent PiP overlay under task as soon as possible
For enter PiP animations started from Launcher, we send the signal to
WMShell to reparent the overlay under task as soon as possible.

This avoids flicker issue caused by race condition of cleaning up the
transition leash before the reparenting was done, which made the issue
of overlay being not attached to anything for few frames.

Bug: 281711939
Test: winscope trace from comment#28, leash follows task
Test: after http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/ewrarENSYYOmUCa0b3fdtp

Change-Id: Ia16afd49a94d9ba8456287c2cdffb2a84e5a2bc7
Merged-In: Ia16afd49a94d9ba8456287c2cdffb2a84e5a2bc7
2023-06-21 16:51:36 +00:00
Winson Chung
d827387ffd Merge "Restore specific colors for floating rotation button" into udc-dev 2023-06-21 16:06:19 +00:00
Treehugger Robot
dcbe9583fb Merge "Add detailed exception for snappedIndex == -1 when dismissing tasks" into udc-dev 2023-06-21 11:00:20 +00:00
Winson Chung
c27a43ba30 Restore specific colors for floating rotation button
- The rotation button background does not change based on the current
  light/dark mode

Bug: 288126260
Test: Check rotation button color with dark mode enabled/disabled
Change-Id: If4d5edfd4b118e4f16b6d472f206587e7cd61f98
2023-06-20 22:45:25 +00:00
Alex Chau
8f19421a87 Add detailed exception for snappedIndex == -1 when dismissing tasks
Bug: 269956477
Test: manual
Change-Id: Ia95a3b2ffe5c677af34183639ba8a2742626c340
2023-06-20 19:04:55 +01:00
Randy Pfohl
6ec21cbe45 Merge "Aligning the intialization process with groupedtaskview to set content description Test: built locally, tested against tablet with bluetooth keyboard." into udc-dev 2023-06-16 23:18:02 +00:00
Jagrut Desai
68ca974330 Suspend immersive mode autohide while pending transient taskbar timeout
Test: open Youtube fullscreen video, swipe up on taskbar; ensure taskbar autostashes before immersive mode autohides
Fixes: 260765455
Flag: none
Change-Id: Ic579a20c60949e12ffc7f9548eded52fbdb06e0c
2023-06-16 15:42:57 -07:00
randypfohl
3c2ab1de45 Aligning the intialization process with groupedtaskview to set content description
Test: built locally, tested against tablet with bluetooth keyboard.

Bug: 287287064
Change-Id: I2be667b2a4b0a08f73c3233a05bbaf7eec08c0e4
2023-06-15 15:11:57 -07:00
Vinit Nayak
ae6beea07b Add logs to RemoteTargetGluer for index exception
Bug: 286144914
Change-Id: I16a8d22a281903574c282b08c06695e4f0e46168
2023-06-15 19:38:37 +00:00
Jon Miranda
613cc95c8a Merge "Fade in/out taskbar bg alpha when unstash/stashing." into udc-dev 2023-06-15 00:02:02 +00:00
Jon Miranda
d76713eb08 Fade in/out taskbar bg alpha when unstash/stashing.
This prevents the case where we are drawing both the taskbar bg
renderer and the stashed handle at the same time.

Fixes: 287245176
Test: go home/overview, open/close notif shade, stash/unstash in app
Change-Id: Ib025a0cf1ad5fd8a9afd079aa50210f3b2388d8e
2023-06-14 14:04:27 -07:00
Treehugger Robot
77110f977f Merge "Polish redesgined tutorial home and overview animations" into udc-dev 2023-06-14 18:35:21 +00:00
Jon Miranda
6352c9bc88 Merge "Revert "Suspend immersive mode autohide while pending transient taskbar timeout"" into udc-dev 2023-06-14 01:10:08 +00:00
Jon Miranda
a6653ae660 Revert "Suspend immersive mode autohide while pending transient taskbar timeout"
This reverts commit 0a074648c2.

Reason for revert: caused regression
Bug: 260765455
Fixes: 286808390

Change-Id: I0e017cf8e432f9c36b0ad34154c127c0dbe73504
2023-06-13 20:09:58 +00:00
Randy Pfohl
f5bec7dd30 Merge "switching animation to screenshot to avoid visual jank" into udc-dev 2023-06-13 05:43:21 +00:00
Saumya Prakash
cb5e2cfd3e Merge "Scale the gesture tutorial animation to work on smaller devices" into udc-dev 2023-06-13 05:38:01 +00:00
Saumya Prakash
0d87c4766e Merge "Update the strings in the gesture nav tutorial" into udc-dev 2023-06-13 03:39:38 +00:00
randypfohl
d3cc664391 switching animation to screenshot to avoid visual jank
Test: built locally, recorded, and slow replayed it to verify no jank/visual anomalies visible.

Bug: 245750127
Change-Id: If7e72512d3303222f4d006a9e2a1639b2f86b1af
2023-06-12 18:28:57 -07:00
Vadim Tryshev
af641a6e80 Merge "Revert "Fix NPE of handling ACTION_MOVE in StatusBarTouchController and added unit test"" into udc-dev 2023-06-12 21:49:39 +00:00
Saumya Prakash
b932cf4b64 Update the strings in the gesture nav tutorial
Change the strings for the instructions and feedback for the gesture navigation tutorial to align with new UX changes.

Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL
Fix: 286547594
Test: Manually went through the redesigned tutorial and verified that
the new strings correctly show up. Also checked that the previous
tutorial remains unchanged.

Change-Id: I27a3e8c0f09e7755e6087ce5b004b687f229d153
2023-06-12 21:26:43 +00:00
Schneider Victor-tulias
7ebb54f24e Polish redesgined tutorial home and overview animations
- Added a 6th hotseat icon to the tablet and unfolded foldable
- not animating the previous task view when animating to hotseat from the home step
- updating the first hotseat icon's color and visibility at the correct times
- cross fading the animating task view and hotseat icon's color

Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL
Fixes: 283967613
Test: ran the tutorial on handheld, tablet and foldable with ENABLE_NEW_GESTURE_NAV_TUTORIAL true and false
Merged-In: I7a76646ca71502e924f45bba76d72be17d31249d
Change-Id: I7a76646ca71502e924f45bba76d72be17d31249d
2023-06-12 21:04:38 +00:00
Saumya Prakash
08a2708739 Scale the gesture tutorial animation to work on smaller devices
The lottie animations in the gesture navigation tutorial would get cut
off due to having to crop them to smaller devices. This change uses a
matrix to correctly scale the animation such that the aspect ratio is
maintained.

Flag: ENABLE_NEW_GESTURE_NAV_TUTORIAL
Fix: 283969417
Test: Went through the tutorial on devices of different sizes and aspect
ratios and ensured that the lottie animation isn't cut off.

Change-Id: I4b4cc9e11a68daef29fa31d6a89a1c9006041937
2023-06-12 17:55:00 +00:00
Vadim Tryshev
b5057c496a Revert "Fix NPE of handling ACTION_MOVE in StatusBarTouchController and added unit test"
This reverts commit 1a2462914d.

Reason for revert: Likely culprit for b/286115393

Change-Id: I613ca9f62c5b9f43f2e3cd240e45bc1a0db0e661
2023-06-12 17:40:22 +00:00
Brian Isganitis
77a40999e1 Merge changes If4669756,Ide702745 into udc-dev
* changes:
  Make sure FLAG_IN_APP is set when launching apps from keyguard.
  Report unstashed content insets for notification panel.
2023-06-12 16:51:37 +00:00
Saumya Prakash
372de4f521 Merge "Enforce the correct orientation for the gesture navigation tutorial" into udc-dev 2023-06-11 22:24:13 +00:00
Jagrut Desai
2d5bb34b6b Merge "Set AccessibilityPaneTitle for taskbar view" into udc-dev 2023-06-09 22:26:39 +00:00
Randy Pfohl
5e1ccf2e96 Merge "Updating content description of taskview after latest update" into udc-dev 2023-06-09 22:06:41 +00:00
Saumya Prakash
e2711c254a Enforce the correct orientation for the gesture navigation tutorial
The lottie animations used for the gesture navigation tutorial are
designed for specific orientations depending on the device. This change
ensures that users are in the correct orientation for their device. For large screen users in portrait mode, we display a prompt to rotate the screen.

Flag: ENABLE_NEW_GESTURE_TUTORIAL
Fix: 277781713
Bug: 276515961
Test: Manually went through the tutorial starting from both
orientations on handheld, foldable, and tablet to ensure that the prompt
was shown and hidden correctly. Also ensured that gestures cannot be
completed in the background while the prompt is being shown.

Change-Id: I86ae566721f240264177ad4ec7fc12e58d1b95cd
2023-06-09 21:41:07 +00:00
randypfohl
62eb722726 Updating content description of taskview after latest update
Description: we wait for icon updates to receive the title of the task. However we still set the description immediately upon digitalwellbeingtoast creation.
this creates a null set for contentDescription resulting in incorrect talkbalk. This will listen for icon updates and will reiniitialize the toast ensuring
taskview is set properly.

Test: built and tested locally with talk back ensuring the titles are being set correctly

Bug: 280908761
Change-Id: I946e7190114cbdccb75883965b1fdf85ed6ad17a
2023-06-09 12:10:14 -07:00