Commit Graph

568 Commits

Author SHA1 Message Date
Toni Barzic 2c72b9bd1a Fix cropped folder name text in arabic
Centralize the folder name within folder footer using gravity property
instead of adding padding to the folder name view. Padding as calculated
was cropping the folder name to the text line height, which was
insuficient in some cases, as eveidenced by the linked bug.

Bug: b/358006967
Test: Open a folder on home screen with arabic system language.
      Verify that the folder name displays correctly.
Flag: EXEMPT bugfix

Change-Id: I4436c224f7f6541f447e3a5354ff870cf4d50698
2024-09-26 04:57:45 +00:00
Jon Miranda 9bcdb1cbe9 Fix bug where PredictedIcon circle/dot flicker.
The issue is that the PredictedIcon in the Taskbar would draw
right before we swap to the matching icon in the Hotseat.

Fixes: 362677520
Test: launch predicted app icon from hotseat, swipe to go home
Flag: EXEMPT bugfix
Change-Id: Iab8b707edf846b257c7fb7cacc9008e5c66353a7
2024-08-28 08:35:14 -07:00
Sebastian Franco 7f9518145a Adding logs to find which call is responsible for the animation error
Bug: 311077782
Test: not aplicable
FLag: EXEMPT bugfix
Change-Id: I2d5a28a8244819a795402fdcf599009ad1abd0dc
2024-08-26 17:08:01 -07:00
Charlie Anderson 08a0a65fca Ensure that inactive archived icons in the folder preview are not shown as grey pending icons
Bug: 350758155
Test: manually verified + PreviewItemManagerTest
Flag: com.android.launcher3.use_new_icon_for_archived_apps
Change-Id: Ic378c4f840ce05ecbcbbc3f4f57087c9acd7c1f5
2024-08-13 13:01:18 -04:00
Treehugger Robot d8d1532825 Merge "Test Week - Add more coverage for Folder.java" into main 2024-07-22 16:22:18 +00:00
fbaron f8962a5406 Test Week - Add more coverage for Folder.java
* Refactored Folder class
* 30  methods covered
* Adding more coverage for Folder.java

Bug: 353303621
Test: Not Applicable
Flag: TEST_ONLY
Change-Id: Ibd7ca8c2121ddc71c33f91262b46e593670eadfe
2024-07-19 14:35:29 -07:00
Sebastian Franco cda3427fea Refactoring FolderPagedView to make it more testable
Bug: 353588686
Test: FolderPagedViewTest.kt
Flag: TEST_ONLY
Change-Id: I2a2efd9f9b2a6ac32153f8102613a3af5afc1ecf
2024-07-18 23:33:21 +00:00
Sebastian Franco c794aca69f Refactoring FolderPagedView to make it more testable
Bug: 353588686
Test: Compiles
Flag: NONE refactor
Change-Id: I612523282a57beac90b14a890a333a1670ab0d48
2024-07-17 23:32:17 +00:00
fbaron df62b6ffd7 Add test for Folder undoing behavior
Fix: 341799410
Test: FolderTest#undoFolder
Flag: TEST_ONLY
Change-Id: I8bfb3fc9348290274b33f4b5b6531126c658037c
2024-07-02 15:02:09 -07:00
fbaron c5c0974f0d Fix folder clipping bug
Fix: 341433475
Test: N/A
Flag: NONE bugfix
Change-Id: Id99eca043c4e70127cb93b0abe88aef007afc70d
2024-06-27 13:51:41 -07:00
fbaron 31d5b01ecf Fix folder animation clipping and RTL issue
Fix: 341433475
Test: NONE
Flag: EXEMPT bugfix
Change-Id: I05c1ca65efea2fdcebb6ff9435fda1f4bbafb9f1
2024-06-07 15:09:30 -07:00
Sunny Goyal 993893895c Converting ModelTask to an interface instead of an abstract class
This allows extensibility and better use of lambdas

Bug: 338282246
Test: Presubmit
Flag: None

Change-Id: Ia41067f0068b3b631eeb4faf877dc77f8587e1f6
2024-05-01 15:43:26 -07:00
Sunny Goyal 638a687fc8 Converting IconShape to mainThreadInitializedObject instead of
keeping it a process static

Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: Id66100e0cb300659c6017c287eb38ab04290477b
2024-04-25 15:56:30 -07:00
Vinit Nayak 247c6ac8ec Merge "Allow app pairs in folders" into main 2024-04-04 17:55:34 +00:00
Jagrut Desai e0330e17e3 Merge "Folder Title Change Listener" into main 2024-04-03 23:50:44 +00:00
Jeremy Sim a596f589c4 Allow app pairs in folders
This CL substantially refactors folders to be able to take contents of type AppPairInfo. App pairs can now be moved in and out of folders, and launch from folders.

This CL contains only logic and model changes; animation and style changes (for dropping items into folders, color changes to app pair surfaces, etc.) will be in a following CL. Another CL (hopefully) will contain tests. I'm planning to submit them together, but this patch should also be able to stand alone with no issues (except janky transitions).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, more to follow in another CL.
Change-Id: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
2024-04-03 16:47:42 -07:00
Jagrut Desai 06a05c3806 Folder Title Change Listener
Bug: 305877212
Test: Manual
Flag: NONE
Change-Id: I10c7e0827a05010720daeb9da7a0be854ee06112
2024-04-03 10:42:15 -07:00
Jeremy Sim 742630c2f8 Reparent folders and app pairs
Previously, app pairs and folders shared a common data model, FolderInfo. Now we need to separate them, so a new type, CollectionInfo, will serve as the parent of both types.

Bug: 315731527
Fixes: 326664798
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, unit tests to follow
Change-Id: Ia8c429cf6e6a376f2554ae1866549ef0bcab2a22
2024-03-29 15:39:28 -07:00
Federico Baron f6fd1f3d46 Merge "Fix bug where folder with 1 icon can exist" into main 2024-03-14 20:02:04 +00:00
fbaron 5645c3ec55 Fix bug where folder with 1 icon can exist
Fix: 329357132
Flag: NONE
Test: TaplDragTest
Change-Id: If381ff56e051c89e9f6162f8a44f8df9e2ae5060
2024-03-14 10:13:00 -07:00
Federico Baron e81e048183 Merge "Fix folder name touch target size" into main 2024-03-08 17:30:21 +00:00
fbaron 0b2253b532 Fix folder name touch target size
With this update, the touch target height for the folder name is now to match the footer height

Flag: NONE
Test: Verified on device with talkback turned on
Fix: 318463992
Change-Id: I77f07280eb54b442efadf7e7373952ea160fc5d2
2024-03-07 09:39:51 -08:00
Sunny Goyal 72a74669e7 Adding support for async view inflation
Bug: 318539160
Test: atest AsyncBindingTest; atest ItemInflaterTest
Flag: aconfig enable_workspace_inflation DEVELOPMENT
Change-Id: I77a373db7a5805f68f4b8cbfa9b586b5674252de
2024-02-22 10:58:48 -08:00
Andrew Cole ee8d92a943 Merge "Folder Previews Show Grey Pending Icon" into main 2024-02-21 20:37:17 +00:00
Andrew Cole d462190ef2 Folder Previews Show Grey Pending Icon
When downloading an app previously the pending icon would show the full color icon when it was in a folder preview. To fix, we consolidated the logic for pending icons in PreloadIconDrawable and moved the logic of the pending state to the ItemInfoWithIcon model to represent the state of a pending application inside the model instead of in views.

Bug: b/324629535
Test: ItemInfoWithIconTest.kt
Flag: None
Change-Id: I4ffab44ddead046adcc84911039c87ea7c304e63
2024-02-20 21:15:21 +00:00
Sebastian Franco 01a134349f Removing the Hotseat from the dragNdrop accessibility targets if the dragObject is a widget
Fix: 319036474
Test: manual
Flag: NA
Change-Id: I7404c02f8ef3c0eee41694729b4d174bcea7c7d4
2024-02-09 10:40:15 -08:00
Federico Baron 789ab23ce1 Merge "Align workspace and hotseat icons in landscape" into main 2024-02-07 16:16:16 +00:00
fbaron 1f265cc907 Fix indexoutofbounds in Folder
Flag: NONE
Test: n/a
Fix: 322875847
Change-Id: I14f6ebe135014c806aee310e5919a72a6e8820f7
2024-02-01 13:09:55 -08:00
fbaron fc6bbcfed2 Align workspace and hotseat icons in landscape
Fix: 311381639
Test: Verified on device
Flag: NONE
Change-Id: I4e2c74f59e8492042c3c7f8eccc98921d92d685f
2024-02-01 01:04:40 +00:00
Andy Wickham af7ff56792 Merge changes from topics "awickham-api-cleanup", "keyboard-on-back" into main
* changes:
  Cleanup API checks for P, Q, and R.
  Add a WindowInsetsAnimationCallback to listen to IME changes.
  Update minSdk to 30.
2024-01-25 22:06:40 +00:00
Sunny Goyal 4e0142328f Moving view inflation in Launcher to a separate class
Bug: 318539160
Test: Presubmit
Flag: None
Change-Id: Iacf9bec39c63cc7a31fae5628bb588ccb765663c
2024-01-24 15:06:31 -08:00
Andy Wickham b922dccbf5 Cleanup API checks for P, Q, and R.
Test: Build with gradle
Flag: NA
Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
2024-01-24 14:58:08 -08:00
fbaron 0f2ca91b8b Add PreviewItemManager unit test to check if icons are themed when they shoudl be in folder previews
Fix: 317417863
Test: PreviewItemManagerTest
Flag: NONE
Change-Id: I067a8d9d2ef4890e816d44ee62f7f5c1119cdd83
2024-01-05 16:01:58 -08:00
Thales Lima df643c4540 Merge changes from topic "numFolderRows" into main
* changes:
  Update dump tests
  Make numFolderRows/Columns accept more values
2023-12-11 10:54:04 +00:00
Jeremy Sim 2987d95ba4 App Pairs: Implement Taskbar functionality
[App Pairs 8/?]

This CL adds taskbar functionality for app pairs:
- Ability to drag an app pair icon to Taskbar
- App pair launch from Home Taskbar
- App pair launch from Overview Taskbar
- App pair launch from in-app Taskbar

KNOWN ISSUES:
- Bug (b/315190686): if user is inside a running split pair and attempts to launch the same pair from an app pair icon on taskbar, Overview tiles get temporarily messed up (recoverable by leaving Overview)
- User can attempt to split with an app pair icon on the Taskbar. This should result in a "can't split with this" bounce animation on the SplitInstructionsView (to be implemented). Currently does nothing.

Bug: 274835596
Flag: ACONFIG com.android.wm.shell.enable_app_pairs DEVELOPMENT
Test: Manual
Change-Id: I5256547af236fc2deeb192d60bfe1f2b7ddc5647
2023-12-08 15:07:45 -08:00
Thales Lima 1faa4edc42 Make numFolderRows/Columns accept more values
InvariantDeviceProfile hold values that are not related to current DP in use. Now other classes get the value correctly from DeviceProfile, and each posture can hold different values, making it akin to iconSize.

Fix: 309800141
Test: DeviceProfileResponsiveDumpTest
Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest
Test: DeviceProfileDumpTest
Test: DeviceProfileAlternativeDisplaysDumpTest
Flag: ACONFIG com.android.launcher3.enable_responsive_workspace TEAMFOOD
Change-Id: I32295738585de67205dcd6c8942d08a3d07d169a
2023-12-08 22:00:48 +00:00
Saumya Prakash 86285d477d Ensure Taskbar stashes when launching an app from folder
We use the folder closing callback to trigger a call to stash the
taskbar if an app was launched. We can check whether an app was launched
from a folder based on whether a folder's view is open when
an app is launched. This ensures that the taskbar only stashes after the
folder is done animating.

Flag: NA
Fix: 295296529
Test: Launched an app in a folder on taskbar. Also ensured that other
taskbar behavior remains unchanged.

Change-Id: Ib5a797186978ee960e44b6b62c833eead03bccd0
2023-12-08 20:16:15 +00:00
Thales Lima 09d42d5340 Revert "Make numFolderRows/numFolderColumns accept more values"
Revert submission 25438456-5x5_folder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25438456-5x5_folder

Revert "Use DeviceProfile numFolderRows and numFolderColumns"
Revert submission 25313018-numFolder
Reason for revert: http://b/313567919
Reverted changes: /q/submissionid:25313018-numFolder

Change-Id: I4890016e310c0a2122861f36fcdbf33e98e727c0
2023-11-30 11:47:37 +00:00
Jordan Silva 2e1b287038 Merge "Use DeviceProfile numFolderRows and numFolderColumns" into main 2023-11-24 12:29:19 +00:00
Sebastian Franco 5f0af4f633 Moving classes inside of CellLayout to their own file
This is a no-op change ensure this we have ReorderAlgorithmUnitTest.

Flag: NA
Bug: 229292911
Test: ReorderAlgorithmUnitTest
Change-Id: I6ffe2a1260f869a4686a9f1e652dd1ab6d406269
2023-11-23 23:13:56 +00:00
Thales Lima 07c6b8d96d Use DeviceProfile numFolderRows and numFolderColumns
Invariant hold values that are not related to current DP in use. This is a change needed for IDP to hold more values in the future akin to iconSize.

Bug: 309800141
Change-Id: Iefb388a5f6590d7da3452d2c388c02bd5e9d32bb
Flag: N/A
Test: NexusLauncherTests
2023-11-21 11:47:21 +00:00
Sebastián Franco da18b9e435 Merge "Use the number of shown hotseat icons instead of database items to store into the DB" into main 2023-11-16 15:33:51 +00:00
Sebastian Franco 2d023e26c6 Use the number of shown hotseat icons instead of database items to store into the DB
It seems this issue was originated from ag/14129534 and we should no
longer use numDatabaseHotseatIcons form IDP and use numShownHotseatIcons
from the DP.

Fix: 305119735
Flag: NA
Test: manuall testing, we don't have this test for landscape
Change-Id: Ie530748f9b77d89ac3298c187ae767643d505cb3
2023-11-15 21:34:38 -06:00
Luca Zuccarini 6ab61069f3 Refine way to trigger the keyboard for a controlled insets animation.
Before we did it as normal just without requesting focus. However, we
also need to not log the new state, as this must happen only after the
controlled animation has completed (or been cancelled).

Bug: 309756056
Flag: NA
Test: manual
Change-Id: I7f1564d2b29d91c9fdb0afce586fe5cc1148bac0
2023-11-14 08:20:40 +00:00
fbaron 1e360c1a92 Folder preview work badge theming fix
Currently the preview apps in a folder icon have the work badge with theming even when themed icons is off

Fix: 306665193
Test: Verify that folder with work icons has non-themed work badge when themed icons is off
Flag: NONE
Change-Id: I78ca7cb2361f6e590742fa64c88397d1ea80be68
2023-11-08 12:30:58 -08:00
Pat Manning 4c27e8c6f0 Migrate cursor feature flag to trunk stable flag.
Fix: 300054410
Test: TaplTestsTransientTaskbar, TaplTestsQuickstep
Flag: enableCursorHoverStates
Change-Id: I5c320e0fd2bdd2ed39b00b62b1399e163c3384e7
2023-10-20 12:17:36 +01:00
Federico Baron 9c4132b31d Merge "Fix indexoutofbounds folder preview" into main 2023-09-21 19:25:04 +00:00
fbaron 7f4bbfa599 Fix indexoutofbounds folder preview
The indexoutofbounds issue came from the fact that folder was being animated open when there are no items in preview. It might be a race condition where we try to open the folder at a time where it's actually being emptied. This check should prevent folders from running animateOpen() if there's <= 1 items, avoiding the outofbounds error

Fix: 298740874
Flag: no flag
Test: no test
Change-Id: I31ed53fbdf22a7f19bc9ec414242312afe7c6cd2
2023-09-20 23:57:00 -07:00
Pat Manning 349f101411 Merge "Migrate ENABLE_CURSOR_HOVER_STATES to aconfig" into main 2023-09-19 16:56:45 +00:00
Pat Manning c49d60b946 Migrate ENABLE_CURSOR_HOVER_STATES to aconfig
- Keeping FeatureFlags.ENABLE_CURSOR_HOVER_STATES for local testing until aconfig is available in FlagFlipper
- Still reference ENABLE_CURSOR_HOVER_STATES in tests as aconfig still can't be mocked

Bug: 300054410
Test: manual
Change-Id: Id385e8ee32ccf8b920b9b7f9cc620af32def589f
2023-09-14 11:08:02 +01:00