Commit Graph

512 Commits

Author SHA1 Message Date
Jordan Silva
637f4eb2f3 Update DeviceProfile to calculate responsive grid for folders
It uses the new responsive folder calculations and specs when responsive grid is enabled. The grid has to have folderSpecsId defined to use the new specifications, otherwise it will use the current scalable grid implementation.

Fix: 284155638
Test: DeviceProfileDumpTest
Test: ResponsiveHomeScreenFolderImageTest
Test: HomeScreenFolderImageTest
Flag: ENABLE_RESPONSIVE_WORKSPACE
Change-Id: I535cff4bb00e969f782447a898230fe2b2c05cc9
2023-06-21 12:18:58 +01:00
Fengjiang Li
9c17c9f046 Merge "Fix NPE where CellLayout is null when removing item out of folder" into udc-dev am: 5d81dd2d77 am: d0642ee589
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23521759

Change-Id: I92674e401f3280237dba0551687ce81f3ff01bd9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-08 19:51:07 +00:00
Fengjiang Li
d29db8ea4d Fix NPE where CellLayout is null when removing item out of folder
Fix: 282249989
Test: create a folder of 2 app icons, remove one icon out of folder, no crash
Change-Id: I3c132ec8833c7cb14066cc403c0641d089bab8ab
2023-06-07 15:36:54 -07:00
Kateryna Ivanova
72fbdc7976 Merge "Migrate Interpolators from Launcher3 to the public animation library" into udc-qpr-dev 2023-05-31 15:25:40 +00:00
Fengjiang Li
4f8fc56598 Merge "Clip folder chidren during folder open/close animation" into udc-dev am: a640098439 am: c4ab06d77d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23355102

Change-Id: I237fe3df960b3a279cfee416380dd7f87c65b636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 21:47:32 +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
Fengjiang Li
a72c216829 Clip folder chidren during folder open/close animation
Test: close folder and verify app icons are not clipped
Fix: 283527491
Change-Id: Ia2aed207d07fc210cd04f05fd2e319f393209396
2023-05-23 15:15:31 -07:00
Stefan Andonian
61e73989e2 Merge "Fix NPE in FolderPagedView" into udc-dev am: 6597d5ec3c am: 0308e2506c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23298096

Change-Id: I1f0586064956deb147ff2d30693a9adafed1d798
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 22:21:02 +00:00
Stefan Andonian
6597d5ec3c Merge "Fix NPE in FolderPagedView" into udc-dev 2023-05-19 20:45:31 +00:00
Fengjiang Li
c7613ebf17 Merge "Fix NPE of FolderPagedView#setFocusOnFirstChild" into udc-dev am: 0d07a85299 am: 63144d9a29
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23254588

Change-Id: I6f203417d5699fc57149dcc81ce465594fca4782
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-18 23:14:46 +00:00
Fengjiang Li
0d07a85299 Merge "Fix NPE of FolderPagedView#setFocusOnFirstChild" into udc-dev 2023-05-18 22:42:47 +00:00
Stefan Andonian
324b6e0ff5 Fix NPE in FolderPagedView
Bug: 282945356
Test: Compilation worked properly.
Change-Id: Ice59274ec0979550388c5d8a8f17f6e912d7ccb3
2023-05-17 20:22:12 +00: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
Fengjiang Li
106d91d04c Merge changes I1136ede4,I5f0877fe into udc-dev
* changes:
  [Folder] Fix bug where folder name and page indicator is visible when cancelling folder open animation
  Fix bug where quickly ending folder animation with back swipe caused icons not clipped to folder
2023-05-16 21:20:09 +00:00
Charlie Anderson
afb447ee0d Merge "Adding a new Edit Mode LauncherState" into udc-dev 2023-05-16 18:42:34 +00:00
Fengjiang Li
533275683b [Folder] Fix bug where folder name and page indicator is visible when cancelling folder open animation
We should resgiter all AnimatorListeners before starting folder open animation.

Fix: 282158620
Test: https://b.corp.google.com/issues/282822254#comment2
Change-Id: I1136ede464f37c174296921594ef887d90844eb5
2023-05-16 10:51:51 -07:00
Fengjiang Li
c80d0221be Fix bug where quickly ending folder animation with back swipe caused icons not clipped to folder
1. Fix a race condition that the new animation is reading stale UI state which should have been reset in previous animation.
2. Don't set clipChildren=true on folder page view during open folder animation

Fix: 282158620
Test: open folder and quickly back swipe, verify app icons are still clipped
Change-Id: I5f0877fe4157533563df922ba50a6ad540c9ba6e
2023-05-16 10:51:31 -07:00
Fengjiang Li
47d72ffccb Fix NPE of FolderPagedView#setFocusOnFirstChild
Test: open and close folder with swipe back quickly
Fix: 282814528
Change-Id: I163c2f9d54b48684738f8104be8c085f26b52ceb
2023-05-15 21:52:19 -07:00
Treehugger Robot
21339533b1 Merge "Update notification dot color" into udc-dev 2023-05-15 20:21:45 +00:00
fbaron
1406a0f606 Update notification dot color
Bug: 268521231
Test: Verify that notification dot colors match the figma attached in the bug
Change-Id: Id0cbf9f2447819ae3e6e00e880eca1be3f189826
2023-05-15 11:06:46 -07:00
Charlie Anderson
438d405aab Adding a new Edit Mode LauncherState
- Edit Mode doesn't close after dragging / dropping an app
	- Edit Mode can be entered through options popup menu, Spring Loaded still entered by dragging items
	- Adds new onLeavingState call to launcher states to cleanup changes

Bug: 279590398
Flag: MULTI_SELECT_EDIT_MODE
Test: manually tested the new state with flag on/off

Change-Id: If4550037f9659dcb8cd8b1943388d1ec5d55fa29
2023-05-12 14:54:45 -04:00
Jagrut Desai
29fcd9a636 Taskbar All Apps Icon Shortcuts Popup Accesiiblity
Before we were only applying the icon.clearAccessibilityFocus() only on normal popup and not material u popups, since the flag is turned on for udc, we can move it outside.

There seems to be a bug associated with either nested abstract floating views or the accessibility service where upon opening a nested abstract floating view from another the icon get the focus. This change make the bug littl less visible to use but users will still see this bug if they open the shortcut pop agian withought closing taskbar all apps.

The accessibility delegate was always null when using the TaskbarOverlayContext, now we use TaskbarActivityContext Delegate when in TaskbarOverlayContext.

Test: Manual
Bug: 280657266
Flag: not needed
Change-Id: I631e3aa6e54748c4c8ea2ac7daf5473b198e47d6
2023-05-08 16:25:53 -07:00
Sebastián Franco
c9cc7ea612 Merge "Set start time for open folder animation before starting the animation" into udc-dev 2023-04-29 02:39:01 +00:00
Sebastian Franco
57fc157e25 Set start time for open folder animation before starting the animation
The start time of the animation was being set after the animation started
causing the animation to jump to an start time after it already
started wich was very obvious when setting the animation speed to 0.

To test set the aimation speed to zero like so:

  adb shell settings put global animator_duration_scale 0
  adb shell settings put global transition_animation_scale 0
  adb shell settings put global window_animation_scale 0

Fix: 279662507
Test: explained above
Test: FolderScreenShootTest will test it in the future
Change-Id: Id6e10720ffdf64e062e533cd3187f386f57ae906
2023-04-25 16:42:03 -07:00
Vinit Nayak
1bb594c72b Route PredictedAppIcon clicks through launcher
* This allows us to intercept launching predicted apps for
split-screen if user is in split selection flow
* Defaults to existing behavior of ItemClickHandler.INSTANCE
if we do not need to intercept the click

Bug: 276361926
Flag: ENABLE_SPLIT_FROM_WORKSPACE_TO_WORKSPACE
Test: Launches as expected when not in split, launches in
split when selected as second app to initiate split with

Change-Id: Ieb45137ae89da340d314e995f4f6eb1f8b49a42f
2023-04-25 12:31:56 -07:00
Sunny Goyal
7b74a5c53f Merge "Revert "Revert "Revert "Simplifying some page indicator dots attributes so that it can"""" into udc-dev 2023-04-07 01:02:09 +00:00
Sunny Goyal
5cd1b198b0 Revert "Revert "Revert "Simplifying some page indicator dots attributes so that it can"""
This reverts commit 7025765c72.

Reason for revert: 274169859

Change-Id: I86a114bf2c713fea6ec7095f68816820ba5f7495
2023-04-06 22:33:11 +00:00
TreeHugger Robot
331ab34a2a Merge "Revert "Revert "Simplifying some page indicator dots attributes so that it can""" into udc-dev 2023-03-31 20:10:37 +00:00
Sunny Goyal
7025765c72 Revert "Revert "Simplifying some page indicator dots attributes so that it can""
This reverts commit 0263a679f2.

Reason for revert: Trying again to confirm if this was the actual cause of regression

Change-Id: I2a663015d7ecdcf315634d8a976bf8294b58981d
2023-03-31 17:10:15 +00:00
Sunny Goyal
1fc1cd002f Merge "Revert "Simplifying some page indicator dots attributes so that it can"" into udc-dev 2023-03-29 21:22:10 +00:00
Sunny Goyal
0263a679f2 Revert "Simplifying some page indicator dots attributes so that it can"
This reverts commit a5ead45967.

Reason for revert: b/274169859

Change-Id: Id214694ae4f61cd70796c6f7e932c1fdef82d746
2023-03-29 19:11:03 +00:00
Tony Wickham
5513239387 Merge "Update folder leave-behind color for taskbar" into tm-qpr-dev am: 0165aa82c6 am: f497c59b5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21968430

Change-Id: Ie80383899e7881512b4434f72a43df7328f36113
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 18:43:20 +00:00
Sunny Goyal
a5ead45967 Simplifying some page indicator dots attributes so that it can
be easily modularized

> Moving the color configuration to xml
> Moving auto-hide logic to a subclass as it doesn't
  need to be in the main library

Bug: 274011949
Test: Verified on device
Change-Id: Icf7bd5d1cbde3daa9441f2af51f98a931bcd6ee2
2023-03-16 15:57:06 -07:00
Tony Wickham
ec6fd6ffb5 Update folder leave-behind color for taskbar
Test: open folder in light theme and dark theme
Fixes: 265828742
Change-Id: Ib544ab85dad16c203917ae02f924650e8a5bbc6f
2023-03-16 18:13:20 +00:00
Sunny Goyal
82dfc15037 Simplifying code around multiple translation components
Bug: 270759683
Test: Verified on device
Change-Id: I6c758c715828ae25e0e3c60b793cf85d70cb2487
2023-03-02 12:22:03 -08: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
13e9b9f889 Translate the taskbar icons to match nav handle shape.
- We need to reset icon alignment whenever icon layout bound
  changes. This fixes the issue where we build an icon
  alignment animator before any of the views are laid out.
- Separated animation logic between.
  createTransientAnimToIsStashed and createAnimToIsStashed
* The values still require a bit more tuning but this gets us
  a lot closer to spec for many of the motion polish.

Bug: 267806083
Bug: 246634367
Bug: 246635237
Test: manual
Change-Id: Id122134b22ef4e418ce632e4a8137239dc8bb313
2023-02-17 10:56:59 -08:00
Sunny Goyal
239d6e9b8d Adding support for customizing shortcut pinning logic
> Allowing support for overring shortcut badge
> Updating pendingShortcutInfo so that the
  handler can be easily overridden

Bug: 268253894
Test: Verified on device
Change-Id: I3184cb6494bc98c7eed33798b35b4e6e6a1e7ddc
2023-02-17 18:07:23 +00:00
Sunny Goyal
669b71f5b3 Introducing CellPosMapper which allows mapping between UI position
and model position

Test: atest CellPosMapperTest
Bug: 188081026
Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
2023-01-30 12:17:09 -08:00
Stefan Andonian
734c4530ed Merge "Add null check for NPE in FolderIcon." into tm-qpr-dev 2023-01-26 21:32:44 +00:00
Fengjiang Li
6bb8d79549 Predictive back: widget to all apps
This CL adds a layer of OnBackPressedHanlderRouter to Launcher:
1. 4 OnBackPressedHandler(s) are added in such order: auto cancel action mode handler, drag handler, view handler and state handler
2. first handler who can handle back will handle the entire back gesture
3. Let WidgetsFullSheet to handle widget to all apps transition

Bug: b/260956481
Test: manual
Change-Id: Idbce3dcec746226dd68aaabaddc8fe01334e9673
2023-01-24 15:51:46 -08:00
Stefan Andonian
8b85f83785 Add null check for NPE in FolderIcon.
Bug: 265298513
Test: N/A
Change-Id: Id55bd488c40edcca376df2843b1a1999aeb944be
2023-01-18 18:19:26 +00:00
TreeHugger Robot
a13d5c4b91 Merge "Workspace pagination UI update" into tm-qpr-dev 2023-01-17 23:29:18 +00:00
Sebastian Franco
877088e6c3 Change the access of cellX/Y of CellLayoutLayoutParams to private
Bug: 188081026
Test: no op change, should compile
Test: ReorderWidgets
Change-Id: I20367974e5a4cead406e18eb66dafd4d59651b2a
Merged-In: I20367974e5a4cead406e18eb66dafd4d59651b2a
2023-01-13 18:25:10 +00:00
Federico Baron
3f255eb591 Workspace pagination UI update
Here we improve the pagination visuals to follow the new design specs. We also polish and fix some issues with dot pagination in workspace.

Bug: 262741688
Test: Turn on flag SHOW_DOT_PAGINATION, and test pagination on workspace. Verify that it follows the specs linked in the bug
Change-Id: I626cdcf1f7392bcc88e9b4d6fd1df65246861445
2023-01-12 18:17:42 -08:00
Sebastián Franco
fba141a3dc Merge "Adding screen ID parameter in CellLayoutLayoutParams" into tm-qpr-dev 2022-12-03 01:32:25 +00:00
Sebastian Franco
2ceb3b5088 Adding screen ID parameter in CellLayoutLayoutParams
Bug: 188081026
Test: launcher compiles, this test doesn't change existing logic only the model
Change-Id: I7bcf6452d5ecb9b50914defc311ad06839220c92
2022-12-02 13:40:34 -08:00
Luca Zuccarini
6e192cd7f8 Merge "Add support for multiple focus listeners to ExtendedEditText." into tm-qpr-dev 2022-11-29 13:21:38 +00:00
TreeHugger Robot
691c6e511f Merge changes from topic "revert-20479526-revert-20427045-258023561-BPDASTWITO-FBDWZBDEFC" into tm-qpr-dev
* changes:
  Fixing the revert by not continuing the reorder if the solution is null.
  Revert "Revert "Reorder widgets no longer overlaps when no space..."
2022-11-22 21:18:42 +00:00
Luca Zuccarini
0a3d67f34f Add support for multiple focus listeners to ExtendedEditText.
Bug: 249952937
Test: manual, see other bug in the topic
Change-Id: I8cc6f525d1a895cc9ee6c6087b51af330d4f25a6
2022-11-17 13:07:16 +00:00