Commit Graph

171 Commits

Author SHA1 Message Date
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
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
Schneider Victor-tulias
ab51f2110a Add null-check to findLastActiveTaskAndRunCallback
ItemInfo.getTargetComponent is nullable, so we can't always create a ComponentKey. Added a null-check and proper creation of ComponentKeys

Flag: not needed
Fixes: 286053950
Test: started and completed splitscreen selection from home, taskbar and overview
Change-Id: Ifa30f194ae064fab8aad79c5116f8c859dfd8cf1
2023-06-06 11:02:09 -07:00
Schneider Victor-tulias
f304ab8e2b Fix launcher activity leak in TouchInteractionService
TouchInteractionService cannot be garbage collected until it has been cleared from the sysui process. Switching to use a WeakReference to help with garbage collection.

Flag: not needed
Bug: 283490010
Test: ran launcher and performed gestures
Change-Id: I37aa5f858f2ae0ac78b46478ab4c5f24770bd64f
2023-05-26 14:39:14 -07:00
Vinit Nayak
6ab2786d16 Separate code paths to launch split from existing pair vs new pair
* Launching existing pair doesn't rely on any existing
data/state in SplitSelectStateController or SplitSelectDataHolder
* Consolidate launchTask*() methods in GroupedTaskView

Test: TaskThumbnailViews measured correctly, animation
correct on small+large screen, initiating split
still working
Fixes: 274540670
Flag: none needed

Change-Id: Id359f53ac5f2bba19948d4ae3231092fb90cc7c5
2023-05-18 10:43:17 -07:00
Sunny Goyal
4fdc9181dd Adding support for listening to end callbacks when launching an intent from Launcher
Also moving various state handling to these end callbacks enstead of relying on resume

Bug: 265134143
Test: Verified that the end callback is received
Change-Id: I326a99c80154d244c0e49f678717c476602b6240
2023-05-15 10:31:06 -07:00
Fengjiang Li
c15679d512 Merge "[1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency" into udc-dev 2023-05-03 03:18:46 +00:00
Fengjiang Li
5a36c17a32 [1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency
More details at "Log Startup Latency" section in go/launcher-startup-latency

Test: tested on phone, foldable and tablet, print latency logs in logcat
Bug: 278092752
Change-Id: Ibf269b0ecd6007d29b95e36f65ab6f02c45deb3a
2023-05-02 17:08:05 -07:00
Vinit Nayak
2a014d4c0d Refactor handling data launching split screen to separate class
* SplitSelectDataHolder contains logic for knowing how
to launch split, separate from the actual API calls to launch split

Flag: ENABLE_SPLIT_LAUNCH_DATA_REFACTOR
Bug: 279494325
Test: Tested w/ all 6 types of launches noted in
SplitSelectDataHolder#@SplitLaunchType.
Also checked to make sure most-recent running tasks are
still being used where applicable.

Change-Id: I8114f87e9956b100622c80f578e291937ed4eeac
2023-04-28 18:00:22 -07:00
Vinit Nayak
955555a314 Merge "Support splitting from workspace with Widgets" into udc-dev 2023-04-22 03:55:23 +00:00
Vinit Nayak
fd46900b96 Support splitting from workspace with Widgets
* Need to insert widget's icon in animation
* Launching w/ same package app + widget is
broken

Test: Launched apps from predicted apps + widget,
hotseat apps + widget
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Bug: 276361926

Change-Id: I3e30189e56536371ebd0acfbdd2c073a882cc731
2023-04-21 14:05:12 -07:00
Fengjiang Li
5068718fe8 Merge "Check build version before using predicitve back API" into udc-dev 2023-04-21 20:22:09 +00:00
Fengjiang Li
d0c2359a49 Check build version before using predicitve back API
Test: build and run app
Fix: 278798546
Change-Id: I4a7b226b1d710cc84ef40b59a33f50a84aca84bb
2023-04-21 09:38:59 -07:00
Presubmit Automerger Backend
cc471ee2ee [automerge] Clear Accessibility Focus from icon after Shorcut Menu invoked 2p: cb582591b3 am: 5ab41346d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22750962

Change-Id: I16a861cfa872f928c5e4414a9f0ecdceacf1f325
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-21 03:57:05 +00:00
Jon Miranda
cb582591b3 Clear Accessibility Focus from icon after Shorcut Menu invoked
Similar to I2726504094af2abacf1c41089c7bcd4efb588099

Fixes: 267695526
Test: have talkback on
      open all apps
      open long press menu
      ensure focus stays on pop up menu

Change-Id: I38f78df3855495c53a5ae8966e9a996e4679e95b
2023-04-20 16:21:02 -07:00
Tony Wickham
af02f865ee Merge "Add debug logs for why taskbar might not be destroyed" into tm-qpr-dev am: c8d8c58f5b am: 3979706e06
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22391708

Change-Id: I6213932faa483c24c9d083b95ee9247c47127128
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-04 16:37:08 +00:00
Tony Wickham
df59884370 Add debug logs for why taskbar might not be destroyed
Test: Manually read log output
Flag: None
Bug: 254119092
Change-Id: Ibaa7ffdc91030c5c999ddc5f2807a55763854331
2023-04-03 23:20:57 +00:00
Fengjiang Li
9529f08b1b Merge "[Predictive Back] Gate feature under experiment flag" into udc-dev 2023-04-03 17:39:56 +00:00
Vinit Nayak
02f20dddb0 Merge "Default to using SplitSelectSource drawable if TaskView icon drawable is null" into tm-qpr-dev am: 8e307ba50a am: 3e5b212204
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22347415

Change-Id: I2f3da1c74ed5ae04ff9cbc4bc06e280da5390b4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-03 15:54:11 +00:00
Fengjiang Li
dcefed1c98 [Predictive Back] Gate feature under experiment flag
As predictive back will be launched for U-QPR, we should gate it to avoid it leaked to U launch.

Test: turn on/off ENABLE_BACK_SWIPE_LAUNCHER_ANIMATION flag and verify predicitive back is turned on/off
Bug: 264920023
Change-Id: Ieee14ca9d49f052f183d8734d62443b890210544
2023-03-31 14:14:03 -07:00
Vinit Nayak
ecca8eacbc Default to using SplitSelectSource drawable if TaskView icon drawable is null
* Alternative solution could be to set
onTaskViewVisibilityChanged(true) for the taskView that is about
to be dismissed so it loads it's taskIcon/thumbnail back from the cache
* However, that does still leave us open to race conditions (even though
we can be reasonably confident the icon is probably in the cache)
* Also made other changes to allow already public fields on some classes
to be mockable for unit testing

Fixes: 275267738
Test: Tested with fullscreen task at end of overview,
GroupedTaskView at end of overview,
Initiating split from home,
Initiating split from overview actions,
Initiating split from overview app icon

Change-Id: Ic9059c93c07b90f61c9f418d5d36d6ba201ff96a
2023-03-30 15:26:57 -07:00
Schneider Victor-tulias
f8f602d76c Merge "Fix TwoPanelWorkspaceTests" into tm-qpr-dev am: 90259a6db4 am: d8e5795131
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22185922

Change-Id: Ic5d6ce2a870f19c960baab3af8abfb1faee248f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-30 17:16:22 +00:00
Schneider Victor-tulias
7cd0ae3f73 Fix TwoPanelWorkspaceTests
- Marking the hotseat long press edu as seen on setup to allow the popup menu to be shown immediately in tests
- Recording onWorkspaceItemLongClick on prediction item long click

Flag: not needed
Fixes: 273239675
Test: TwoPanelWorkspaceTest
Change-Id: I76354fd2e3adde11b2a428374fa9c8855ce2ece9
2023-03-27 14:24:35 -07:00
Hyunyoung Song
c5d4b109ee Merge "Revert "Revert "Hide the splash icon when launching with no view..."" into tm-qpr-dev am: e8abfee5e9 am: bb1237eb76
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22067827

Change-Id: I491a12f6d11c40c165b83f4bd61cf5d9f79d55c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-24 23:00:41 +00:00
Hyunyoung Song
a38aab93b9 Revert "Revert "Hide the splash icon when launching with no view..."
Revert submission 21916962-revert-21447384-no-splash-UILAXIUPKJ

Reason for revert: Retry errorprone target

Reverted changes: /q/submissionid:21916962-revert-21447384-no-splash-UILAXIUPKJ
Flag: production issue. Not hidden behind flag
Bug: 269343536
Test: manual

Change-Id: Ia365f886d39d63472d72afc2033fc67e19109f57
2023-03-20 23:33:11 -07:00
Mateusz Cicheński
cb7aabd110 Merge "Enable ENABLE_PIP_KEEP_CLEAR_ALGORITHM for teamfood" into tm-qpr-dev am: c8f3c1f172 am: e24ca392e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21353290

Change-Id: I0754262532fcb792a823658ea494f5e8faa9939c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-18 01:18:43 +00:00
Mateusz Cicheński
2ef25f91ba Enable ENABLE_PIP_KEEP_CLEAR_ALGORITHM for teamfood
Change-Id: I7c09494514dd6ea1baea51a03114c8e77cae118d
Test: atest WMShellFlickerTests
Bug: 183746978
2023-03-17 19:37:41 +00:00
Hongwei Wang
48844c89cb Merge "VisD update for the PipAppIconOverlay 2/N" into tm-qpr-dev am: 452e014caa am: e83a3e29d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22107736

Change-Id: I6782e9913b91972135cc07e610e703af96547595
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 17:16:03 +00:00
Fengjiang Li
b7860bd85e [Predictive Back] Remove OnBackPressedHandler
OnBackPressedHandler was mimicking android.window.OnBackAnimationCallback because later one was hidden API to T.

Now that we have moved to U, we can remove the former handler.

Test: manual
Bug: 272797556
Change-Id: Ic5302cfa0a6fb15c4a64bdf5dc331834b1f06f38
2023-03-16 09:39:31 -07:00
Hongwei Wang
0d22befcb8 VisD update for the PipAppIconOverlay 2/N
- Pass the up-to-dated app icon size from Launcher to WMShell
    this is for non-auto-enter-pip cases
- For auto-enter-pip, use the DeviceProfile#allAppsIconSizePx directly

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/ha3ebrRk0hAEyU8GSWBrYE
Bug: Bug: 271912318
Test: manual with 4x4 and 5x5 grid, see the video
Change-Id: Iaad26758a25c6cb3832a2da10e15c53e72de0ce5
2023-03-15 15:55:26 -07:00
Eddie Lan
7a5a713fd6 Merge "Revert "Hide the splash icon when launching with no view and no ..."" into tm-qpr-dev am: cbdd6493f1 am: cdf797c22e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21916962

Change-Id: I8dea7e072b870f97a1dadb2f54c65fc6b7ac73b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 10:04:45 +00:00
Eddie Lan
cbdd6493f1 Merge "Revert "Hide the splash icon when launching with no view and no ..."" into tm-qpr-dev 2023-03-09 09:06:11 +00:00
Eddie Lan
293688a9a0 Revert "Hide the splash icon when launching with no view and no ..."
Revert submission 21447384-no-splash

Reason for revert: build break
Bug: 272383391

Reverted changes: /q/submissionid:21447384-no-splash

Change-Id: I73565b1f4e5dd969237980b2b5dbeee7b563abcb
2023-03-09 09:00:29 +00:00
Mateusz Cicheński
ddf0218220 Merge "Fix entry bounds for 3 button nav" into tm-qpr-dev am: 321127d14a am: efeae8e3aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21847300

Change-Id: I05978f5734f78a6f2dac0878b904b1f384309372
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 00:47:24 +00:00
Mateusz Cicheński
321127d14a Merge "Fix entry bounds for 3 button nav" into tm-qpr-dev 2023-03-08 23:52:41 +00:00
Charlie Anderson
d6ada70040 Merge "Fixes several Visual issues with the app shortcut popup" into tm-qpr-dev am: 3b072b9a07 am: 04d2397c43
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21559561

Change-Id: I5bd08c1af0b0180bb6b8cce5101bd714509fb822
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-08 15:11:23 +00:00
Hyunyoung Song
8a548cfa43 Merge "Hide the splash icon when launching with no view and no item." into tm-qpr-dev am: eeee84efb6 am: a10811b4fe
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21447384

Change-Id: I561fe17887572072dd65c271314a896acf9b6724
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:42:30 +00:00
Mateusz Cicheński
c5cbf0f326 Fix entry bounds for 3 button nav
The fix uses the similar approach to shelf height to ensure that the
keep clear area is being updated as soon as possible for quickstep.

Without this, the entry animation finishes before the actual keep
clear area from the view is registered, which causes the PiP to enter
lower right corner and then move up, which was the regression.

Bug: 260779127
Test: manually
Test: http://recall/-/g8x7ZkgdfbqscttAA9wzl9/72aNHwWH5wihwN4gf3mfj

Change-Id: Ide11a903558d7e6cb9e477abe12b81129a7f7afc
2023-03-07 07:50:06 +00:00
Nick Chameyev
be2db5bd3d Merge "Do not use private APIs in unfold module" into tm-qpr-dev am: c7ab991818 am: fcf5d393eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21523105

Change-Id: I80ef77898fe2ffc728cdaa2473252ca032880da3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 00:05:17 +00:00
Charlie Anderson
52caf63404 Fixes several Visual issues with the app shortcut popup
- Fix system shortcut alignment and ordering.
- Replace horizontal split icon with correct size drawable.
- Remove popup shortcut reversing logic, and instead show same order of shortcuts regardless of orientation.

Test: tested manually on tablet and phone
Bug:269343928
Change-Id: I1700ad1ee04abf0820c87d89e1dc07d6880fd519
2023-03-06 16:40:51 -05:00
Hyunyoung Song
eeee84efb6 Merge "Hide the splash icon when launching with no view and no item." into tm-qpr-dev 2023-03-06 18:23:32 +00:00
Nick Chameyev
c7ab991818 Merge "Do not use private APIs in unfold module" into tm-qpr-dev 2023-03-03 13:22:03 +00:00
Luca Zuccarini
f295e3a85a Hide the splash icon when launching with no view and no item.
This is achieved by instead creating an empty item info that only
specifies the splash type to be solid color.

Bug: 269343536
Test: manual
Change-Id: Ibf5c8f1c949e26af207b8c6e382f71677b9acc2d
2023-03-02 18:19:38 +00:00
Jeremy Sim
86e4f02035 Merge "Fix bug with Taskbar not differentiating between user profiles" into tm-qpr-dev am: 24b1890c4b am: 0027186ea2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21566360

Change-Id: Ic90db4ff687565109c3644cede0f7c50f9f66f4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02 04:10:00 +00:00
Jeremy Sim
e35d112693 Fix bug with Taskbar not differentiating between user profiles
This patch fixes a bug where Taskbar would not differentiate between user profiles when selecting an app to launch from Overview.

The bug occurred because findLastActiveTaskAndRunCallback(), which checks for already-running tasks when launching an app from the Taskbar, only checks for a ComponentName match and not a userId match.

Fixed by making the findLastActiveTaskAndRunCallback() also check for a userId match.

Fixes: 270456926
Test: Manual
Change-Id: I43ff06083a5dce775fdbd0b0ed951beaae34c0ab
2023-03-01 10:57:41 -08:00
Fengjiang Li
f533ff350c [Predictive Back] Turn on feature for udc
Add feature flag and turn it on for U

Test: manual
Bug: b/264920023
Change-Id: I43d9c04b13b91ce0b0e53402a5c3b2f0e81272ff
2023-03-01 18:41:32 +00:00
TreeHugger Robot
01c1dff441 Merge "ENABLE_WIDGET_PICKER_DEPTH" into tm-qpr-dev 2023-02-23 13:22:15 +00:00
Alex Chau
ce9766da2d ENABLE_WIDGET_PICKER_DEPTH
Fix: 270393895
Test: manual
Change-Id: I167354425e5469663c283919f84c8bdf664cceec
2023-02-22 20:18:39 +00:00
Vinit Nayak
4e3636e8d0 Refactor SplitSelectStateController to add testing
Bug: 266482558
Change-Id: I2d62a3a310043710d66a26bc533df2309084b81e
2023-02-22 10:51:49 -08:00
Vinit Nayak
54c262cd67 Merge "Move split functions from RecentsView to SplitSelectStateController" into tm-qpr-dev 2023-02-22 02:15:46 +00:00