Commit Graph

7772 Commits

Author SHA1 Message Date
Alex Chau 359ac14d13 Fix various animation issues when total width of grid tasks < screen width
Bug fixes:
- Unusual long scroll when only focus task left after split select
- Animation jump when tasks cannot fit screen width after dismiss or split select

To fix the above issue, generified calculations when total grid task width < screen width:
- Removed some special case handling when only focus task left (getSnapToFocusedTaskScrollDiff), and instead replace with generic logic that calculation that extra scroll position (shortTotalCompensation) needed when long row width is smaller than the grid size
- Fixed snapped task grid translation calculation to account for shortTotalCompensation
- Last task scroll calculation should account for shortTotalCompensation too
- Calculate the expected shortTotalCompensation after dismiss, and use that to adjust the close gap between clearAll distance

splitScrollOffset that we applied during split screen does not work well when shortTotalCompensation != 0. splitScrollOffset is not a good solution to handle split placeholder, as it allow tasks to scroll to weird position. I removed splitScrollOffset completely, and only apply split translation when split placeholder covers the tasks:
- Removed splitScrollOffset on TaskView/ClearAll, so scroll position of TaskView will not change while in split to splify things.
- When split placehodler will cover task's natural position (taskSize) in overview grid, apply split translation on all tasks similar to handheld
- Removed isSplitPlaceholderFirstInGrid/isSplitPlaceholderLastInGrid adjustments

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: I7689b5384845f03491041b6d910835c9ac4fab08
2023-02-24 18:42:13 +00:00
Alex Chau 49863356e2 Set split button drawable to start instead of left
Fix: 269493214
Test: Check overview actions in regulard and RTL
Change-Id: Ice474294c482de8c552bda5e14efdce989fce4e7
2023-02-24 12:00:48 +00:00
Ats Jenk 560e494f29 Hide overview actions when desktop is focused
Use same logic for desktop as split screen is using. If focused task is
the desktop task, hide overview actions.

Bug: 269658609
Test: Enable desktop proto 2, have some apps on desktop, focus on a
  fullscreen app, open overview, observe actions visible
Test: have some apps on desktop, open desktop, open overview, observe
  actions are not visible
Test: open two apps in split screen, go to overview, observe no actions
  visible
Change-Id: I7de28ea7af93b58379bb539c5a1b1bcbf6d13b83
2023-02-23 16:02:30 -08:00
Jagrut Desai 3fbaaf9628 Prevent Taskbar from stashing in immersive mode overview.
Test: Visual, Video in Buganizer
Bug: 262589756
Change-Id: Ifbdfb3a4104817e5f50833c42c3c6fc5964388b7
2023-02-23 14:19:10 -08:00
Charlie Anderson 2010ea7b27 Adds new motion animation for U popups am: 6259084496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21338099

Change-Id: I5709bd1af46af09f567ff2f23ab0a2165ade7683
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 21:26:04 +00:00
Charlie Anderson 6259084496 Adds new motion animation for U popups
Bug: b/247880037
Test: manually on tablet
Change-Id: I8677cef39a5dc4094cad38f42b9314ac37b95fc2
2023-02-23 15:38:26 +00:00
TreeHugger Robot 9fc14b94cd Merge "ENABLE_WIDGET_PICKER_DEPTH" into tm-qpr-dev am: 01c1dff441
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21539136

Change-Id: Ic134a1cd2780c2f2ff5f294f33a1f8367b3b6eb9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 15:10:37 +00:00
TreeHugger Robot 01c1dff441 Merge "ENABLE_WIDGET_PICKER_DEPTH" into tm-qpr-dev 2023-02-23 13:22:15 +00:00
Sunny Goyal 51eb7b611b Merge "Removing some obsolete features" into tm-qpr-dev am: b3a95149f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21537730

Change-Id: Ia7fb81792677cbc3979f138dcea93a77cc44af14
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-23 08:47:16 +00:00
Sunny Goyal 171bb04407 Removing some obsolete features
Bug: 270386012
Test: Presubmit
Change-Id: I9d68b3d17e02d6e79ab726eb7c8da1e5a4d337ef
2023-02-22 23:17:15 +00:00
Vinit Nayak 2fea4c6f1b Merge "Refactor SplitSelectStateController to add testing" into tm-qpr-dev am: c9120521ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21487925

Change-Id: Id91fe8d96fbcc1cdad9ef59610c934e59c441410
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 22:30:50 +00:00
Vinit Nayak c9120521ff Merge "Refactor SplitSelectStateController to add testing" into tm-qpr-dev 2023-02-22 21:45:42 +00:00
Alex Chau ce9766da2d ENABLE_WIDGET_PICKER_DEPTH
Fix: 270393895
Test: manual
Change-Id: I167354425e5469663c283919f84c8bdf664cceec
2023-02-22 20:18:39 +00:00
Ats Jenk 0a5f12dd95 Merge "Add empty view to desktop tile in overview" into tm-qpr-dev am: 431c0c05fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21452617

Change-Id: Ifbee23ade3029a38155884f8d5f270d4acc1c3f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 20:13:59 +00:00
Ats Jenk 431c0c05fd Merge "Add empty view to desktop tile in overview" into tm-qpr-dev 2023-02-22 19:30:55 +00:00
Vinit Nayak 4e3636e8d0 Refactor SplitSelectStateController to add testing
Bug: 266482558
Change-Id: I2d62a3a310043710d66a26bc533df2309084b81e
2023-02-22 10:51:49 -08:00
Tony Wickham c8207a7e23 Merge "Fix taskbar drag view scale when returning to original icon" into tm-qpr-dev am: 3d1bb16493
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21533764

Change-Id: I04cbb24dc071677a8e6f5c4fa8981efc5bec6d34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 16:59:30 +00:00
Tony Wickham 3d1bb16493 Merge "Fix taskbar drag view scale when returning to original icon" into tm-qpr-dev 2023-02-22 16:24:48 +00:00
Luca Zuccarini 1252e573af Merge "Introduce launchable versions of common view types." into tm-qpr-dev am: 8ca28c4e63
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21150245

Change-Id: I23b0a77aa6ad256360e0bca7e2eb8556fff0abb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 13:02:04 +00:00
Nick Chameyev de32174e7f Merge "[Unfold transition] Hide invisible workspaces during animation" into tm-qpr-dev am: 92c93bdda5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21335338

Change-Id: I6392ab3ad9873eacecc03291a5af1f06f42853a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 13:01:45 +00:00
Pat Manning 3eadaa7d77 Merge "Animate grid tasks to modal state." into tm-qpr-dev am: 1b27affb03
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21060663

Change-Id: I3fc5d3fde2fadf3e95383c3827be7901b3712ef5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 13:00:42 +00:00
Luca Zuccarini 8ca28c4e63 Merge "Introduce launchable versions of common view types." into tm-qpr-dev 2023-02-22 12:19:50 +00:00
Nick Chameyev 92c93bdda5 Merge "[Unfold transition] Hide invisible workspaces during animation" into tm-qpr-dev 2023-02-22 11:20:16 +00:00
Pat Manning 1b27affb03 Merge "Animate grid tasks to modal state." into tm-qpr-dev 2023-02-22 11:18:47 +00:00
Tony Wickham b506ae73b0 Merge "Fix a couple of drag and drop issues from transient taskbar" into tm-qpr-dev am: 2a567ec85a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21527497

Change-Id: Ica30f4d7a313b5966b8ca72654f4002e581faf31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 05:23:21 +00:00
Tony Wickham 00f89fbbf6 Fix taskbar drag view scale when returning to original icon
- Use getSourceVisualDragBounds() if the target view is BubbleTextView;
  this accounts for padding as well as extra ring inset for
  PredictedAppIcon
- Also ensure we always use the final drag view scale when switching to
  the system drag and drop, instead of using the current scale which
  might be in the process of animating

Test: drag regular and predicted icons in taskbar, but drop it in a
region that doesn't accept it (e.g. the taskbar itself), check that the
return animation scales and offsets more correctly than before
Bug: 269814838

Change-Id: Ie8398b2617340e1d2568773563aa0263a3366940
2023-02-22 03:41:03 +00:00
Tony Wickham 2a567ec85a Merge "Fix a couple of drag and drop issues from transient taskbar" into tm-qpr-dev 2023-02-22 03:38:38 +00:00
Vinit Nayak 06ed4db282 Merge "Move split functions from RecentsView to SplitSelectStateController" into tm-qpr-dev am: 54c262cd67
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21468212

Change-Id: Id6f868aa87f0ba53673764f412d12ed936f78aea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 02:50:49 +00:00
Vinit Nayak 54c262cd67 Merge "Move split functions from RecentsView to SplitSelectStateController" into tm-qpr-dev 2023-02-22 02:15:46 +00:00
Tony Wickham 16cfed3d1f Fix a couple of drag and drop issues from transient taskbar
- Don't stash until drag ends, but immediately stash at that point
  (regardless of success or failure, though failure will animate to the
  original icon before stashing)
- Send transient taskbar's bounds to WM Shell via intent extra such that
  they ignore drag events in that region

Test: manual in persistent and transient taskbar
Bug: 269814838
Fixes: 268526633
Fixes: 259645384
Change-Id: I5ded3998046f259ed6e79cb4ed765ad7b0c72e45
2023-02-22 00:46:51 +00:00
Winson Chung 0e9de04dfb Merge "Fix issue with global drag from taskbar being disabled" into tm-qpr-dev am: d30ef72606
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21491928

Change-Id: I0e22beac88c2dd89078767d1846fb3470a8b26d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-22 00:17:27 +00:00
Winson Chung d30ef72606 Merge "Fix issue with global drag from taskbar being disabled" into tm-qpr-dev 2023-02-21 22:50:31 +00:00
TreeHugger Robot f94e71eca0 Merge "Remove setImeIsVisible/setTouchesEnabled as its already handled by insets." into tm-qpr-dev am: 73a2334f7f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20590940

Change-Id: Ie07cb2abf9cadb3812014585691e58cf63c5baf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 21:45:28 +00:00
Schneider Victor-tulias 42f0aaac4b Merge "Keyboard quick switch polish" into tm-qpr-dev am: 8129ebfd04
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21466357

Change-Id: I55765649648db123f919699ffd6f42c787bf9ddc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 21:44:54 +00:00
Jon Miranda 2bd32abb3f Merge "Seamless handoff between stashed handle and taskbar." into tm-qpr-dev am: 6bb01ee8ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21486650

Change-Id: I3b2f7b368eb7007886e415391585e3725d9dcd82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 21:44:41 +00:00
TreeHugger Robot 73a2334f7f Merge "Remove setImeIsVisible/setTouchesEnabled as its already handled by insets." into tm-qpr-dev 2023-02-21 21:15:22 +00:00
Schneider Victor-tulias 8129ebfd04 Merge "Keyboard quick switch polish" into tm-qpr-dev 2023-02-21 21:03:30 +00:00
Jon Miranda 6bb01ee8ca Merge "Seamless handoff between stashed handle and taskbar." into tm-qpr-dev 2023-02-21 20:09:41 +00:00
Nick Chameyev dd2311e7f7 Do not use private APIs in unfold module
Removes usages of the private/hidden APIs
in unfold module so it could be easily
reused in 1p/3p apps.

Bug: 258828766
Test: manual fold/unfold with a full screen
 app and in split screen
Change-Id: I79618af5f1e4bd7da66b840e321403bb33cf7e95
2023-02-21 18:26:46 +00:00
Nick Chameyev 47f3322b90 [Unfold transition] Hide invisible workspaces during animation
Enables clipToPadding property for the
workspace view so it clips the views coming
from the outside of the workspace.

Bug: 267670594
Test: manual test by folding and unfolding with
 several pages on a foldable device
Change-Id: Ibcb6ecd1ce784a66fdee35969b7f460bbb32f638
2023-02-21 15:05:32 +00:00
TreeHugger Robot 90cf9e6855 Merge "Translate the taskbar icons to match nav handle shape." into tm-qpr-dev am: 9769b2844c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21452616

Change-Id: Icfa1d57cb210098675ef70313c675f62c29b5e61
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-21 04:34:48 +00:00
TreeHugger Robot 9769b2844c Merge "Translate the taskbar icons to match nav handle shape." into tm-qpr-dev 2023-02-21 03:24:41 +00:00
Jon Miranda 7a73f3ee82 Seamless handoff between stashed handle and taskbar.
Bug: 267806083
Bug: 246634367
Test: manual
Change-Id: I0c3d7a19aaa36a323c6fb3349852727f56842bb2
2023-02-21 01:42:30 +00:00
Pat Manning 550181e69e Animate grid tasks to modal state.
Bug: 265641913
Test: OverviewActionsControllerTest.java
Change-Id: I5cfa5bc3a9e0fdc024d0d709bfb2b5eccd6ea5a2
2023-02-20 17:10:01 +00:00
Jerry Chang f4f2a953bd Fix quick switch in between two split pairs crash
Launcher always receive recent animatino start callback before
onStageTaskChanged callback, which result to not able to identify the
correct animate targets to animate. Update to fetch animate target from
wrapped remote animation target directly.

Fix: 236226779
Test: quick in between two split pairs won't crash
Change-Id: Ic10db086256b4a1ed53e5a3becb6fa9114df74ec
2023-02-18 09:46:11 +00:00
Winson Chung 3bce15d2a2 Fix issue with global drag from taskbar being disabled
- BackgroundAppState extends OverviewState, so in some cases we will
  transition to background app, which inadvertently triggers global
  drag and drop from being enabled

Bug: 269819279
Test: Enter split, cycle the screen and try to drag an app from the
      transient bar
Change-Id: I0e8c5e8bbaa0220fc870d2db866152864253010f
2023-02-18 06:34:08 +00:00
Vinit Nayak c97bb4600f Move split functions from RecentsView to SplitSelectStateController
* Moving things out of RecentsView to avoid
dependency on a non-testable class
* Also helping prevent bloating RecentsView.java

Bug: 266482558
Test: Single Chrome instance in recents. Initiate split
with Chrome from workspace, tap on Chrome again in Taskbar,
ensure no crash.

Change-Id: I99ec704479ffaa860f4d80c2cb9f54182f31f41a
2023-02-17 17:28:08 -08:00
Ats Jenk 744f8edafa Merge "Show highlight around the selected overview tile" into tm-qpr-dev am: 4004c9d42d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21452622

Change-Id: I007e544b1e082b249923aa10d5d359e439f2b46f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-18 01:09:42 +00:00
Ats Jenk 4004c9d42d Merge "Show highlight around the selected overview tile" into tm-qpr-dev 2023-02-18 01:06:00 +00:00
Ats Jenk 4d397e2ebb Add empty view to desktop tile in overview
Show an empty view when there are no tasks on the desktop.

Bug: 267326725
Test: have a fullscreen task, open overview, observe empty view for
  desktop tile
Test: have a desktop task, open overview, observe desktop task thumbnail
  is shown in overview and empty view is hidden

Change-Id: Ifb6d96d42bf602e9cc9e397efc0e07e2accdf16b
2023-02-17 16:48:47 -08:00