Commit Graph

99 Commits

Author SHA1 Message Date
Ats Jenk
3067874559 Support alt+tab for desktop tasks
Updates keyboard quickswitch logic handle quickswitching while on
desktop. When on desktop, alt+tab moves only between desktop tasks.
Fullscreen tasks are shown in the overflow tile and can be accessed by
going to overview.

TODO:
- when not in desktop and using quickswitch, show the desktop tile as a
  combined tile in the row, similar to what is shown in overview

Flag: persist.wm.debug.desktop_mode_2
Bug: 280468885
Test: open some apps on desktop and have some fullscreen apps opened in
  the background, when on desktop, observe that alt+tab only switches
  between desktop tasks
Test: same setup, but switch to a fullscreen app, observe that alt+tab
  only switches between fullscreen tasks and desktop is accessible from
  overview

Change-Id: Ib19f2eaa24363bbd0669c8c8c3d99ed9d9118a17
2023-05-26 15:38:58 -07:00
Tracy Zhou
7dc9e3a088 Support 4-finger gesture to quick switch
Fixes: 270610237
Test: 4-finger horizontal swipe -> quick switch
Change-Id: I981a7e93ecd07357c7a9cda075f476b397c448cc
2023-04-20 22:34:19 +00:00
Alex Chau
4d95ac8c7e Merge "Remove focus task" into tm-qpr-dev am: 019f8a640a am: 110007f68e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20980936

Change-Id: I8132ad04086f5704bb54ec4bc6c8e1b60c163fd0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 12:30:30 +00:00
Alex Chau
aec9d3136f Remove focus task
- Focus task is only removed under ENABLE_GRID_ONLY_OVERVIEW, but many fixes/refactoring are generic and apply with the flag off
- Keep moving running task to front if go to overvied after quick switch, so live tile is always on top right

Grid calculation:
- Fixed some top/bottom calculation assumption that assume focus task is always present

Size calculation:
- With ENABLE_GRID_ONLY_OVERVIEW, taskSize == gridTaskSize, and task is aligned to top-right of gridRect (instead of focusTaskRect)

Bug: 257952455
Test: Enter overview from home
Test: Enter overview from app, with variations that quick switch and enter
Test: Dismiss task from different position
Test: Split select task from different position
Test: Repeat with/without GRID_ONLY_OVERVIEW flag
Test: Repeat with handheld
Change-Id: I6580a8ac6c2c2059c33c4daca05b7d0354513e74
2023-02-24 18:43:30 +00:00
Ats Jenk
865e1c404b Merge "Show highlight around the selected overview tile" into tm-qpr-dev am: 4004c9d42d am: 744f8edafa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21452622

Change-Id: Icc868d30ba1614167e56ae2c014f47f2d2c3c37e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-20 20:37:23 +00:00
Ats Jenk
cc0b860235 Show highlight around the selected overview tile
Enable highlight around focused overview item when desktop windowing
prototypes are enabled.
This highlight was built for and enabled with keyboard quickswitch feature.
We don't support quickswitch on desktop yet.
Disable the quickswitch, but keep the border highlight.

Bug: 269342116
Test: enable desktop windowing proto, use an external keyboard and
  alt+tab to switch between apps, observe highlight in overview, no
  quickswitch popup
Test: enable desktop windowing proto, enable
  ENABLE_KEYBOARD_QUICK_SWITCH, observe that alt+tab still opens
  overview
Test: disable desktop windowing proto, enable
  ENABLE_KEYBOARD_QUICK_SWITCH, observe alt+tab opens the quickswitch
  popup, and highlights in overview
Change-Id: I15b36f082610f4ce38143856c84fef723f1b8ba0
2023-02-15 15:41:12 -08:00
Schneider Victor-tulias
79855e7cb8 Merge "Add the KeyboardQuickSwitchView (2/2)" into tm-qpr-dev am: 25656568e3 am: 74ffb0ba89
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21087436

Change-Id: Ie6f0b30af20e5905fc10105bbf2fcf8a0db028b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-15 06:15:48 +00:00
Schneider Victor-tulias
de7ceba80b Add the KeyboardQuickSwitchView (2/2)
Adding KeyboardQuickSwitchView and associated flows.

Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: Ifb48b005067b3a9c66acfd5ecdbae144b359d3be
2023-02-14 13:34:37 -08:00
Schneider Victor-tulias
556d37bf01 Merge "Add the KeyboardQuickSwitchView (1/2)" into tm-qpr-dev am: 673e6437b8 am: 031e3d38b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21087434

Change-Id: Ib0389210f200baa71f346edbc0ca78678702707a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-14 19:43:13 +00:00
Schneider Victor-tulias
f908729fa8 Add the KeyboardQuickSwitchView (1/2)
Preparatory change for adding the KeyboardQuickSwitchView and associated flows.

Test: Manually tested alt-tab and alt-shift-tab in and out of overview on a tablet and phone
Bug: 258854035
Change-Id: I468481a023e82d3ef7c7d4d44c5b9435173b49ae
2023-02-13 15:34:39 -08:00
Tracy Zhou
6692653328 Disable quickswitch for trackpad gestures
Bug: 261815244
Test: make sure (1) if user starts by swiping up, disable quickswitch (they will land either in overview, home, or the current app) (2) if user starts by quick switching, cancel the gesture

Change-Id: I6b59cec0089d5e6f22eee3241c6336345dd15dce
2023-01-29 23:56:00 -08:00
Schneider Victor-tulias
8320800bf2 Merge "Return to home when overview command fails." into tm-qpr-dev am: 62b9f80d1e am: 7d9e1d6fb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20442700

Change-Id: Iad101873486c0547b7be3ae5af5c9b8772c27324
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 21:40:22 +00:00
Tracy Zhou
aef9d75f78 Use movement on the trackpad instead of on screen for trackpad gestures used for gesture nav
Bug: 254783214
Test: https://recall.googleplex.com/projects/3388b17c-d22f-46f8-b140-a102690377b4/sessions/f3311fbc-d8cf-4f19-b83c-8626aa285452
Change-Id: Iad2da5831af85dd3647e1e31b42fea0a6302b49c
2022-11-11 00:05:03 -08:00
Schneider Victor-tulias
0844f2e8ef Return to home when overview command fails.
Returning a runnable list that doesn't get run later causes the overview command to be added to the pending command queue, but never gets removed. This causes following overview (and home on tablets) commands not to respond.

Test: forcefully caused the error condition programmatically; checked the queue is cleared and the user is sent home.
Fixes: 255851262
Change-Id: I9d2f54960c54963b1e7480a597d05911201c152b
2022-11-10 11:56:09 -08:00
Sebastian Franco
e7c222cdb5 Check for null when calling getCreatedActivity which is marked as Nullable
Fix: 243508135
Test: compiles
Change-Id: Id1ff2cf68fa10690a1bbec60a0c17cceab9db8d1
2022-09-22 13:03:15 -05:00
Tracy Zhou
d0f4896c11 Fix subsequent tabbing in recents from alt tab not working
Fix: 242114350
Test: Alt+tab to go to overview, and then keep tabbing to switch to the previous tasks

Change-Id: I03db23aa5424e46c0eb783379b0c5e959f75507f
2022-09-13 11:01:57 -07:00
Vinit Nayak
42fd4441a3 Run animation for liveTile before trying to launch it
* If current TaskView is running live tiles, animate directly
when toggling recents button instead of trying to
launch the task

Fixes: 240231324
Test: Launching a single GroupedTaskView from overview
launches as expected in 3 button.
Tested adjacent launches as well.

Change-Id: I6c060d918d3ae08bee9da1ad9507bb25cf445b96
2022-09-07 15:33:35 -07:00
Schneider Victor-tulias
920a86969a Forcefully move focused task to front when triggering the recents animation in 3-button nav
Quickly tapping the recents button can start a recents animation while a quick switch is running. This causes the the wrong page index to be used as the focused task index.

Test: manual on large screen
Fixes: 227562351
Change-Id: If99f74477e52ed0c7f7c5fd7b3dc8b201627068b
2022-06-10 20:11:18 +00:00
Schneider Victor-tulias
9f922d3598 Fix recents animation flicker
The recents animation can sometimes start before launcher has started when started with 3-button mode. This causes the animation to start before the recents UI has been initialized by Launcher. Added a callback to properly synchronize launcher start and the recents animation.

Fixes: 229360539
Test: started the recents animation and checked logs (order of operations), when the recents animation or launcher started first
Change-Id: I5938bbba778a2886b4a1e4ee4844eaf28c6fac0e
2022-05-04 22:27:50 +00:00
Vinit Nayak
526f4ce7ae Always look for MODE_OPENING during task launch from overview
* Previously the target mode was dependent on whether liveTile
was running or not, opposite targets seem to be coming in from
WM now.
* Remove a bunch of un-used code from LauncherSplitScreenListener
that was used when we only allowed one split pair in overview
previously. Now that is handled by RecentTasksController in shell
so we don't need any additional bookkeeping.

Fix: 212220301
Test: Able to launch side tasks in overview
Change-Id: I002340d98ba379cb4ab9ae37eadfa235d6b5e56d
2022-03-28 21:32:09 -07:00
Vinit Nayak
38397e46cf Limit the number of commands in OverviewCommandHelper
* Rapidly tapping recents button in 3 button nav
puts launcher in a strange state.
Reproing and understanding that state is complex
since so many state transitions are rapidly happening.
* Easier to limit the number of commands a user
will perform for valid use-cases.

Fixes: 207680265
Test: Rapidly pressing recents when unfolded
doesn't show live tile task on workspace.

Change-Id: I7db849e83c2cafc37a419e189479283f2057bde6
2022-03-17 16:26:56 -07:00
Winson Chung
3f40a17e54 Add fallback for missing remote animation callbacks
- In some cases WM won't callback the remote animation callbacks (neither
  start nor cancel) and Launcher never finishes executing the pending
  command (preventing the subsequent commands from running).  For the time
  being, just cancel the current state to allow the commands to be
  processed.

Bug: 194011186
Test: Mash on overview and home buttons with a 3p launcher

Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: I1b1296fab316b979f441ebb474d1475e3fa68f95
2022-01-21 16:34:49 +00:00
Fedor Kudasov
41edede1ee Simplify getTaskViewAt call
RecentsView getTaskViewAt method is nullable and is safe
to call for an out of bound index.

Bug: N/A
Test: m LauncherGoResLib
Change-Id: I7709d63ad4490fd756a50caaf42ba70c4fad4d06
2021-11-11 16:55:18 +00:00
Jerry Chang
331f46fab3 Accept snapshot list when cancelling recents animation
Bug: 200813008
Test: enter overview after activated split screen, observed task
      thumbnails showing with correct bounds after roation.
Change-Id: Ifea17d2c685d16db111c4fab88e131595254b9a5
2021-11-08 09:55:43 +08:00
Vinit Nayak
84511f2997 Call exitSplitScreen() when user leaves split tasks
* Also call it when user swipes to home

Fixes: 198310766
Test: Tested QS'ing split to fullscreen,
full to split, swipe to home from split and fullscreen

Change-Id: I6a465ead7fcd68dc85e0ab401789f4a5c3feb0d1
2021-09-08 13:02:29 -07:00
Vinit Nayak
8d51468426 Invoke home via recents for fallback recents
Fixes: 194286702
Test: Go home from app and overview for
3P and normal launcher (test via separate recents activity
in debug menu)

Change-Id: Ifac4afbfa549265a80448ee460a780bf0984f9e1
2021-08-05 11:52:25 -07:00
Tracy Zhou
86bd1dce8d Clear command queue of OverviewCommandHelper on home tap
Fixes: 194934483
Test: manual
Change-Id: Id83b341245793c38c305e6ada5581ac4e49527a7
2021-07-29 17:23:01 +00:00
Tracy Zhou
94e798bac1 Reset current task and dequeue overview commands when recents animation is cancelled
Fixes: 193925362
Test: manual
Change-Id: I792be003e5aabf34324075829d5381cba591892b
2021-07-26 12:17:01 -07:00
Tracy Zhou
1fe5fda3d8 Enable live tile in 3 button mode
- Previously we rely on whether launcher is resumed as a signal to see what "toggle" means. This no longer works since launcher is not resumed in Overview. Instead, we need to check the live tile signals.
- Use screenshot doesn't propagate after setting a new current task. So followed the logic around mRunningTaskIconScaledDown to work it out.
- Get rid of NavigationModeFeatureFlag, pending on 3rd party launcher change ag/14409355

Fixes: 185934639
Test: (1) Toggle overview from home screen and toggle back to fullscreen. (2) Toggle overview from app and keep toggling.

Change-Id: Iffaea18afb2179b5bb7dadda49e56efefa5658bc
Merged-In: Iffaea18afb2179b5bb7dadda49e56efefa5658bc
2021-07-02 05:19:32 +00:00
Winson Chung
1c2d522d1b Don't rely on intent to call back from activity tracker
- The intent is not updated in certain cases which means that the
  callback may not be made if Launcher gets recreated. Instead
  have the tracker manage the set of registered callbacks.
- This change allows AbsSwipeUpHandler to continue to receive
  onActivityInit calls even if Launcher restarts, and also to
  handle a case where restarting while waiting for a page-settling
  callback will continue to finish the gesture.

Bug: 183962705
Test: Force recreate at various points in the gesture

Change-Id: Ib5ead8c868e798e26e56776f57bd715c79d087cd
2021-06-14 20:57:40 -07:00
Sunny Goyal
dfc22b8ff1 Fixing recents command not working properly in gesture mode
Bug: 185445289
Test: Manual
Change-Id: I233ee493ea0d42bbfca14b17e921d907cc65da53
2021-04-16 12:13:31 -07:00
Sunny Goyal
d5347045d0 Using recents animation and swipe handler for 3-button mode
Bug: 181165935
Test: Manual

Change-Id: I7fe586319e4dde1a1b398a0c75896c4dfdb75862
2021-03-17 09:26:51 -07:00
Sunny Goyal
b65d766d88 Adding support for listening for app launch animation completion
Bug: 181165935
Bug: 179065491
Test: Verified on device
Change-Id: Ifa6a91560cb31b4dfb72a0f582607e873d8a002d
2021-03-10 15:53:21 -08:00
vadimt
5b97b40eb1 Skipping QS metrics if activity is not created
Test: presubmit
Bug: 177472265
Change-Id: Ic92adbe589736d16ab8687ea761c32919d8c186b
2021-01-14 13:43:04 -08:00
Jorim Jaggi
6478fa649a Migrate FrameTracker to use ST Jank information (2/2)
Test: FrameTrackerTest
Test: Systrace, perform CUJ
Bug: 174755489
Change-Id: I6abecbd9b244f443c9df389938d82427f9584037
2021-01-13 09:17:18 -08:00
vadimt
dad74879cc Using default timeout for 3-button QS
It's 5 sec, and it works better both
for test runs under stress and for
users in the field that invoke the gesture
slowly.

Test: presubmit
Bug: 169221288
Change-Id: If1d04b63e3d490d7865b9141fc3be34a21693c39
2020-12-14 15:42:44 -08:00
vadimt
3b55aab715 Adding tracing for app-to-overview
It will help finding jank in the quick switch
scenario.

Also removing tracing for cases when it's done
by the jank monitor.

Test: manual
Bug: 174892351
Change-Id: I16fc784ddb52203dba54eab2700b5a04a10088ff
2020-12-09 12:32:23 -08:00
Sunny Goyal
ffa21961bf Using UI_HELPER_THREAD for various activity manager interactions
Bug: 170648272
Change-Id: Iec36389be5d747c5dc4d2bb2a8138758d48efa53
2020-11-04 22:36:21 +00:00
Winson Chung
87f2b09072 Merging from ub-launcher3-master @ build 6925377
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_master_6925377.html

Change-Id: I928b100c8f41abff34047df69d988622123f9939
2020-10-23 10:16:50 -07:00
Winson Chung
f99351888c Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.

Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
2020-10-23 09:27:48 -07:00
Marcin Oczeretko
0ee7ffca7f Update LatencyTracker usage in Launcher
Test: manual - flashed the phone and verified the logging and statsd sampling with default settings
Bug: 131859447, 162927074
Change-Id: I2d0c9fd479654c62841c714eb39f88f84e8ab114
2020-10-22 09:45:27 +00:00
vadimt
7a6e4c931f Annotating Quick Switch CUJ for 3-button mode
Bug: 169221288
Change-Id: Ief62345fe6004dde699f44aa0c90329b7cd84e8b
2020-10-07 10:51:01 -07:00
Alistair Delva
087a9e39b6 Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert submission 12738409-merge_ub-launcher3-master_6877130

Reason for revert: Introduced crashes to global presubmit

Reverted Changes:
I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174...
Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130
I791d64951:Merging from ub-launcher3-master @ build 6877130
Icdd32ab01:Merging from ub-launcher3-master @ build 6877130

Bug: 169963211
Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
2020-10-05 14:46:26 +00:00
TreeHugger Robot
cc7b860566 Merge "Fixing lock during RecentsModel initialization" into ub-launcher3-master 2020-09-28 19:32:07 +00:00
Sunny Goyal
10759887c2 Fixing lock during RecentsModel initialization
HandlerThread.getLooper blocks the current thread until.
the final thread is initialized. Updating RecentsModel to
use an executor instead of a handler thread to avoid this.

Change-Id: I3b2e82a375ea65bea1526af4a32c6a2488102541
2020-09-28 08:57:08 -07:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
Sunny Goyal
5fb83a47f2 Removing icon recents version
Change-Id: Ibdc88715e38590cedf8a7b5174061bb2c6ef9533
2020-08-14 10:49:19 -07:00
Kevin
ef8a17b1d0 Split OverviewCommandHelper for Go recents.
This splits OverviewCommandHelper between a Go and non-Go version with
functionality differing depending on the underlying recents
implementation.

Bug: 114136250
Test: Build NexusLauncher, l3goWithQuickstep, l3goIconRecents
Change-Id: I7c78d7699e5599002de64b289b0c3a47c8c418f7
2019-02-22 11:26:32 -08:00
Sunny Goyal
b52ff2269b Fixing alt-tab is properly dispatched to the RecentsView
Change-Id: I14a5569877bc0e7fe3aa30d3cd1fa74920b3e9db
2019-02-14 13:49:57 -08:00