Commit Graph

193 Commits

Author SHA1 Message Date
Vinit Nayak f6c2e87747 Dismiss split select when tapping on home button
Bug: 276361926
Test: Initate split, dismiss whenever home is pressed,
doesn't dismiss when all apps dragged down
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE

Change-Id: Idc95123e27963c3913d04c6eb27f0e4c9b1eb401
2023-07-10 11:06:42 -07: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
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
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 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
Sunny Goyal b02dafc1d4 Removing explicit target SDK for launcher
> It will automatically target the latest SDK it was compiled with

Bug: 284349887
Test: Presubmit and manual
Flag: N/A
Change-Id: I32629b0dd710c3c04d8f70f988b7279e7cae6731
2023-06-26 10:15:14 -07:00
Schneider Victor-tulias 9c18ce4871 Remove unnecessary method from StatefulActivity
Flag: not needed
Fixes: 284920213
Test: quickly tapped overview button and quickly tapped scrim; added logs to check error case
Change-Id: I6cb66012379d30e8ce91533a9f4350bf309f1341
2023-06-22 17:50:58 +00:00
Schneider Victor-tulias 7a12786c79 Merge "Skip sending user home when the overview command queue is pending." into udc-qpr-dev 2023-06-21 21:50:56 +00:00
Schneider Victor-tulias cb0de75242 Skip sending user home when the overview command queue is pending.
Tapping the overview scrim during an app -> overview transition in 3-button nav can replace that state transition's aniamtion, leaving the device in a broken state. The assumption is that the user did not mean to tap the scrim while quickly tapping the overview button. Skipping the startHome request if the overview command queue is not empty.

Flag: not needed
Fixes: 284920213
Test: quickly tapped overview button and quickly tapped scrim; added logs to check error case
Change-Id: I8fea76d810e550e28a61a4528796b358103cb5b3
2023-06-21 17:53:03 +00:00
Vinit Nayak 1c81f07eb5 Allow starting split from home, selecting second app from overview
* KI: After entering overview, swiping to exit doesn't
clear split state. That's because LauncherRecentsView#reset()
gets called both when entering and exiting overview.
We'd need to check or pass through what state we're moving to
to determine whether or not actually to reset state in
SplitSelectStateController, or handle that at the gesture level

Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Test: Manual, split paths work w/ and w/o flag enabled
Bug: 276361926
Change-Id: I39391ac5f92b774d8198930829caabe84d950598
2023-06-20 15:17:48 -07:00
Andy Wickham e769a86dc5 Merge "Enable returning to the previous app after Overview -> All Apps." into udc-qpr-dev 2023-06-08 22:22:06 +00:00
Treehugger Robot 9c9764c28b Merge "Moved TISBinder lifecycle handling to TISBinderHelper" into udc-qpr-dev 2023-06-07 19:37:13 +00:00
Schneider Victor-tulias 19d085107a Merge "Add null-check to findLastActiveTaskAndRunCallback" into udc-dev am: bfa0fae851 am: 396bb7c262
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23590296

Change-Id: Ifd444206ac34ba591bf2f6033bf6961fadb5425f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-07 18:21:17 +00:00
Schneider Victor-tulias 871d7fc351 Moved TISBinder lifecycle handling to TISBinderHelper
- All instances where we used TISBinder will now use TISBinderHelper#getBinder. This will allow TISBinderHelper to handle its lifecycle
- Moved all instance of TaskbarManager and OverviewCommandHelper as well since TIS and TISBinder handle their lifecycles
- Cleaning up launcher instance from TaskbarManager when TISBinder is being destroyed

Flag: not needed
Bug: 283490010
Test: ran launcher and performed gestures
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:248794e698417b1156bf911adb31682186fe2e34)
Change-Id: I8415a6b2c1dba0776e7c0e1ee32ad3c683100bde
2023-06-07 17:15:18 +00:00
Andy Wickham adce95394e Enable returning to the previous app after Overview -> All Apps.
Back gesture from All Apps (history for state):
If previous state was background, use quick switch state to return
to the previous app.

Swipe down from All Apps:
Return to previous state (which will be Normal or Quick Switch).

This animates from All Apps overview scale/translation to full
screen of the previous task. In this case we are animating from
0.5x Overview scale and 0 translation (centered).

Video: https://drive.google.com/file/d/1cpQjtFemtJ4zu9aWu7IiUftWWVGFrbtM/view?usp=drive_link&resourcekey=0-1zuMEvYNsk81YBxv8o10hA

Note: This is mostly for the gesture/state handling but it would
be nice to polish this transition in the future.

Bug: 283336332
Test: Manual
Flag: ENABLE_ALL_APPS_FROM_OVERVIEW
Change-Id: Iec92df933ce6522f181d3d5ca889b6a6469f4cc6
2023-06-06 17:13:59 -07: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
Nick Chameyev c1eafd92ab Merge "[Unfold animation] Do not preemptively start the animation if it has run already" into udc-qpr-dev 2023-06-01 12:55:27 +00:00
Schneider Victor-tulias fc32303ebf Merge "Fix launcher activity leak in TouchInteractionService" into udc-dev am: 8f95307087 am: 9dd8eacd99
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23375885

Change-Id: I7b6cfeb031aefc61441a030aac15d2674ef83b1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 19:20:54 +00:00
Nick Chameyev 6d756970e7 [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
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
2023-05-31 17:12:08 +00:00
Kateryna Ivanova 7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00: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
Tracy Zhou 6a71c2a6f5 [Trackpad] Gesture navigation in 3-button mode
Back gesture will be in a separate change

Bug: 279948218
Test: https://recall.googleplex.com/projects/3388b17c-d22f-46f8-b140-a102690377b4/sessions/0b8e838a-89b0-4451-ad44-df2916db877d
Change-Id: I1f14ca873efa33684e36ac1f0f72d766815752ae
2023-05-21 22:45:37 -07:00
Vinit Nayak c83f94cde3 Merge "Separate code paths to launch split from existing pair vs new pair" into udc-dev am: 258019fe8e am: 1f27273c06
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23320818

Change-Id: I11104b119109468f3b0984fb670b6196c418b97d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 18:43:42 +00: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 e274d97fe5 Removing support for lagacy shortcuts
> Addition/removal of  shortcus is already removed. This just
  cleans up the unused code path

Bug: 275875209
Test: Updated tests
Flag: N/A
Change-Id: I8ab7f57b693f996920e50e8beecafcffab5167e9
2023-05-17 09:20:45 -07:00
Ats Jenk c6cbcbcd74 Merge "Stash desktop apps on home gesture or taskbar home button press" into udc-qpr-dev 2023-05-17 00:16:04 +00:00
Ats Jenk 7cd5a681f7 Stash desktop apps on home gesture or taskbar home button press
When we detect the home gesture or tap on home button in taskbar,
check if desktop apps are visible. If they are, signal WMShell
to stash the desktop apps.

Flag: persist.wm.debug.desktop_mode_2
Bug: 261234402
Test: have gesture nav enabled, put an app on desktop and swipe up to
  home, verify toast is shown, and next app launches to desktop
Test: have 3-button nav enabled, put an app on desktop and press home,
  verify toast is shown, and next app launches to desktop
Change-Id: I824e640bfafa20cb3451cbd8f035fe9dca18094f
2023-05-16 11:57:50 -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