Commit Graph

14731 Commits

Author SHA1 Message Date
Jordan Demeulenaere
652ec4997a Format files with the upcoming version of ktfmt am: be82bc661c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21565649

Change-Id: Icd28fd41925b49d0f8c4318365a244e3fa43f637
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 13:22:07 +00:00
Jordan Demeulenaere
be82bc661c Format files with the upcoming version of ktfmt
This CL was generated automatically from the following command:

$ external/ktfmt/prepare_upgrade.py --repo=packages/apps/Launcher3/ --build_id=9645412 --bug_id=266197805

This CL formats all files already correctly formatted with the upcoming
version of ktfmt.

Bug: 266197805
Test: Presubmits
Change-Id: Ide7d63a75fed98aabe348821355356c77f00a9ec
Merged-In: Ide7d63a75fed98aabe348821355356c77f00a9ec
2023-03-01 09:11:48 +00:00
Jeremy Sim
8477226a3d Fix bug with rotating in the middle of split select staging animation
This patch fixes a bug where a user could cause a crash by rotating the device in the middle of the split staging animation.

The bug arose because:
1) Normally, when you rotate the device, reapplyState() is called to refresh the UI. This reloads the state, cancels any animations that happen to be running at the time, and generally works fine in most cases.
2) When animations are canceled within Overview, we also call RecentsView#reset() to clean up loose ends and prevent bugs.
3) Unlike other states, the split select state is unique because it is a transient state that holds the user's choices temporarily. If that information was cleared -- by reset() -- before it loads, it will crash.

Fixed by creating a new function in SplitScreenSelectState, onStateReapplied(), that is called when a reload is occurring. It makes sure that animations do not get canceled by calling end() to accelerate them to completion before the reloading occurs.

Fixes: 249819567
Test: Manual
Change-Id: I70c4651bcb5df81edd25f6e58e21520ebb391d01
2023-02-28 17:13:36 -08:00
Tony Wickham
b0fa52f3ee Only recreate taskbar for uiMode theme changes
Test: simulate docking/undocking, ensure taskbar is not recreated;
set dark/light theme and ensure taskbar is still recreated
Fixes: 233459895

Change-Id: I583557039f4a7c02baaa5e62eb888f55d659adb0
2023-02-28 23:55:31 +00:00
Alex Chau
5a21a787f5 Merge "Skip updateIconAlphaForHome if Taskbar is already destroyed" into tm-qpr-dev am: 81b1d3576a am: 694a0a8685
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21610408

Change-Id: I18e4e859134652a81b370e2af77ba40016ed881a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 22:43:03 +00:00
Bill Yi
95623d83d8 Merge "Import translations. DO NOT MERGE ANYWHERE" into tm-qpr-dev 2023-02-28 22:15:43 +00:00
Alex Chau
694a0a8685 Merge "Skip updateIconAlphaForHome if Taskbar is already destroyed" into tm-qpr-dev am: 81b1d3576a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21610408

Change-Id: I35d9bcf444bd9fb8b5ac5223f5579e0eb0901a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 22:02:13 +00:00
Brian Isganitis
aa08af872b Make isTooltipEnabled a getter due to its mutable dependencies.
IS_RUNNING_IN_TEST_HARNESS is mutable and can change during the
lifecycle of launcher.

Test: Manual
Fix: 271160958
Change-Id: Ib033e0684d99e784185e1da1e52632411f6c096b
2023-02-28 21:51:52 +00:00
Alex Chau
81b1d3576a Merge "Skip updateIconAlphaForHome if Taskbar is already destroyed" into tm-qpr-dev 2023-02-28 21:23:53 +00:00
Alex Chau
8aa3f00238 Land ENABLE_TASKBAR_IN_OVERVIEW
Fix: 270393449
Test: manual
Change-Id: I731bfa8ee86154fd034781e27272abc81a6fe6c6
2023-02-28 20:18:32 +00:00
Sunny Goyal
2003c1c73f Restarting launcher if a flag changes
> Only restart when the screen is off.
> This allows better propogation of flags similar to systemUI
> Adding support for integer flags

Bug: 266854800
Test: Verified on device using device_config shell command
Change-Id: I4ea9c564f2d973f11f9570b5a21365183afefab7
2023-02-28 12:01:22 -08:00
Sunny Goyal
e7fe6b57ff Merge "Moving flag creation to a separate file" into tm-qpr-dev am: 1297f400bc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21586607

Change-Id: I0b50d9286e8abab8b3d5f54853f8bfc74141cbb4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-28 19:48:41 +00:00
Sunny Goyal
1297f400bc Merge "Moving flag creation to a separate file" into tm-qpr-dev 2023-02-28 19:18:25 +00:00
Sunny Goyal
98204add71 Moving flag creation to a separate file
> This provides better control over proguarding descriptions
> Enforcing bug number in flag creation

Bug: 270386012
Test: Presubmit and verified on device
Change-Id: I31014e397690379024d2e42c0e913ce806b9569c
Merged-In: I31014e397690379024d2e42c0e913ce806b9569c
2023-02-28 18:05:42 +00:00
Alex Chau
7fee161cd5 Skip updateIconAlphaForHome if Taskbar is already destroyed
Bug: 269409332
Test: Switch display with and without Tasxkbar at home and in-app, Taskbar and Hotseat visibility are correct
Change-Id: I598f618c336067bf795b77ccdf3b03f420634047
2023-02-28 12:46:50 +00:00
Brian Isganitis
cae62a563a Implement light mode for persistent Taskbar.
NavbarButtonsViewController has been massaged to make sure the buttons
contrast well with the color of the Taskbar background that they are on,
if applicable.

Test: Manual
Fix: 268052229
Change-Id: I917a1a1be013c304910b0f674ae8a13abb8e47a1
2023-02-27 23:25:42 +00:00
Sunny Goyal
749983b192 Moving flag creation to a separate file
> This provides better control over proguarding descriptions
> Enforcing bug number in flag creation

Bug: 270386012
Test: Presubmit and verified on device
Change-Id: I31014e397690379024d2e42c0e913ce806b9569c
2023-02-27 23:19:39 +00:00
Hongwei Wang
313495285d Turn ENABLE_PIP_APP_ICON_OVERLAY on by default
Bug: 265998256
Test: atest PinnedStackTests
Change-Id: Ie536cc5016c9b28e1ae788a195f726d2a977efb2
2023-02-27 12:11:01 -08:00
Bill Yi
3f4d577e24 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I945470f393b326f16958e50d928972d159a3bda6
2023-02-27 06:57:17 -08:00
Bill Yi
d83ac571b7 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Icb5be14aaa01124e3e78966964422a4b9d2ad307
2023-02-27 06:56:52 -08:00
Bill Yi
d21afd306f Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ifc470bb7dc99a1b8b1a9a762ebe8446bc7b6257c
2023-02-26 22:13:27 -08:00
Bill Yi
9650b930e2 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3a98cb65b2a5cf2ba80c4ac3d49f7fbdf34b7909
2023-02-26 20:18:09 -08: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
110007f68e Merge "Remove focus task" into tm-qpr-dev am: 019f8a640a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20980936

Change-Id: Ia72b6f482b13fe76ee172ae859a3ade06bc1c695
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 11:53:58 +00:00
Alex Chau
019f8a640a Merge "Remove focus task" into tm-qpr-dev 2023-02-25 11:25:34 +00:00
Jagrut Desai
70db29a34d Merge "Implement All Apps Icon upto the visual Specs." into tm-qpr-dev am: 3addf0b66d am: 8a8bda5b3c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21470199

Change-Id: I66c04acb33c47329dfdc16f4ef8c264bb710e198
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 02:57:09 +00:00
Jagrut Desai
8a8bda5b3c Merge "Implement All Apps Icon upto the visual Specs." into tm-qpr-dev am: 3addf0b66d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21470199

Change-Id: I6239794dc53cc85288b8496c1862df1d803ba0e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 02:21:40 +00:00
Jagrut Desai
3addf0b66d Merge "Implement All Apps Icon upto the visual Specs." into tm-qpr-dev 2023-02-25 01:49:59 +00:00
Jagrut Desai
454fb81f39 Merge "Prevent Taskbar from stashing in immersive mode overview." into tm-qpr-dev am: 0355c793c0 am: d3f23005af
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21560134

Change-Id: Ifa917ee63eb85bc4dca837b4e3fb92acb914e5ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 01:09:45 +00:00
Jagrut Desai
d3f23005af Merge "Prevent Taskbar from stashing in immersive mode overview." into tm-qpr-dev am: 0355c793c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21560134

Change-Id: I75a8b22ad44b3ccf78a546f7d7569be9fc1dbff2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-25 00:39:22 +00:00
Jagrut Desai
560b0eac62 Implement All Apps Icon upto the visual Specs.
Test: Visual
Bug: 267382941

Change-Id: If675c2f4767014598b23d8a2c2e684f5a8fb4f19
2023-02-24 15:41:06 -08:00
Jagrut Desai
0355c793c0 Merge "Prevent Taskbar from stashing in immersive mode overview." into tm-qpr-dev 2023-02-24 23:34:56 +00:00
Alex Chau
2997c1f84f Merge "Set split button drawable to start instead of left" into tm-qpr-dev am: 346b970942 am: d56e6a6306
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21566803

Change-Id: Ib052ee1ce2c4f1e173cd247deb0343aaa7e84d3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 22:51:05 +00:00
Alex Chau
888bc47918 Merge "Fix various animation issues when total width of grid tasks < screen width" into tm-qpr-dev am: a8c2ffc128 am: 2248a0e941
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21549707

Change-Id: I09d435775d10fdd5bae2df06730560444081db02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 22:50:52 +00:00
Alex Chau
d56e6a6306 Merge "Set split button drawable to start instead of left" into tm-qpr-dev am: 346b970942
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21566803

Change-Id: I8c40f21252aedc829cab8de34f77b137ff8529cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 21:58:14 +00:00
Alex Chau
2248a0e941 Merge "Fix various animation issues when total width of grid tasks < screen width" into tm-qpr-dev am: a8c2ffc128
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21549707

Change-Id: Id3f5805bdda91219419b0a1b784dae6655d6d2bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 21:57:58 +00:00
Alex Chau
346b970942 Merge "Set split button drawable to start instead of left" into tm-qpr-dev 2023-02-24 21:44:02 +00:00
Alex Chau
a8c2ffc128 Merge "Fix various animation issues when total width of grid tasks < screen width" into tm-qpr-dev 2023-02-24 21:42:58 +00:00
Ats Jenk
3e3f308e60 Merge "Hide overview actions when desktop is focused" into tm-qpr-dev am: 8fc3a1df82 am: d12b90b711
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21568620

Change-Id: I889ec039a93b45eaac85b47f8eeb8e05cd40c876
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 20:24:05 +00:00
Ats Jenk
d12b90b711 Merge "Hide overview actions when desktop is focused" into tm-qpr-dev am: 8fc3a1df82
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21568620

Change-Id: If4b3739c2f1aa855a33d1f721872851a60df9382
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 19:46:22 +00:00
Ats Jenk
8fc3a1df82 Merge "Hide overview actions when desktop is focused" into tm-qpr-dev 2023-02-24 18:45:28 +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
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
Alibek Manabayev
e2f33d2f38 Merge "Extend tests to check Transient Taskbar Autohide" into tm-qpr-dev am: 4424f6636e am: b60e6b0e60
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21445185

Change-Id: I882804ff6a06c7e64c872bf4c2fdc91180664bd2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 15:54:27 +00:00
Alibek Manabayev
b60e6b0e60 Merge "Extend tests to check Transient Taskbar Autohide" into tm-qpr-dev am: 4424f6636e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21445185

Change-Id: Iaec5904ced44f1ea776b986cfa798736da7ad0b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-24 15:18:30 +00:00
Alibek Manabayev
4424f6636e Merge "Extend tests to check Transient Taskbar Autohide" into tm-qpr-dev 2023-02-24 14:39:45 +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
TreeHugger Robot
0aa1de56cd Merge "[Gesture Library Integration] Update the check for motion events on trackpad" into udc-dev 2023-02-23 23:15:59 +00: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