Commit Graph

19343 Commits

Author SHA1 Message Date
Cole Faust 1b9fd985d4 Replace .toList() with .collect()
.toList() was only introduced to android in api level 34, which is newer than
this module's min_sdk_version. Replace it with .collect().

This was found while updating android lint.

Flag: EXEMPT refactor
Bug: 394096385
Test: Presubmits
Change-Id: Id8d1de1531b67a7daf448e45592b7ef78f685fc2
2025-02-03 14:19:12 -08:00
Treehugger Robot b8fc998679 Merge "If onegrid is on we don't check if destination db is new or not" into main 2025-01-31 09:53:40 -08:00
samcackett 5df5144b45 Add task menu shortcut for closing apps
Fix: 383977717
Test: OverviewMenuImageTest
Flag: EXEMPT bugfix

Change-Id: I24338a821e1ec9be21d22a5d1c4295dd6e28d13d
2025-01-31 08:37:18 -08:00
Charlie Anderson 6009fa94b6 Merge "Add folder shapes for corresponding icon shapes" into main 2025-01-30 19:29:51 -08:00
Federico Baron 7938a50b28 If onegrid is on we don't check if destination db is new or not
We just migrate them using the special case where everything shifts up
if we meet the criteria

Bug: 392978014
Test: GridSizeMigrationTest
Flag: com.android.launcher3.one_grid_specs
Change-Id: I4efda781d6fbe6f3e1854b22685abd1b923c3dc4
2025-01-30 15:51:54 -08:00
Treehugger Robot 821572007d Merge "Revert^2 "Unifying various model update callbacks into one"" into main 2025-01-30 15:45:47 -08:00
Sunny Goyal dfbbebc9e3 Revert^2 "Unifying various model update callbacks into one"
72f9943f64

Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
2025-01-30 13:19:32 -08:00
Priyanka Advani (xWF) da2e19a821 Merge "Revert "Unifying various model update callbacks into one"" into main 2025-01-30 13:12:33 -08:00
Treehugger Robot db04d745b1 Merge "When doing the special case migration where cells shift up, only modify workspace items" into main 2025-01-30 10:28:11 -08:00
Treehugger Robot 602213809f Merge "Fixing leaks in LauncherPreview" into main 2025-01-30 09:04:29 -08:00
Charlie Anderson 8fc63d0657 Merge "Refactor ShortcutsChangedTask to Kotlin" into main 2025-01-30 06:50:30 -08:00
Sunny Goyal 986d7cb9c0 Fixing leaks in LauncherPreview
> Do not add listeners when binding FolderIcon for preview
> Cleaning up preview object when the caller is no longer holding
  on to the communication channel for preview.

Bug: 393086035
Flag: EXEMPT bugfix
Test: Verified manually
Change-Id: I4b758e6ce103c5201ef05ab824dd4e02f98c40b6
2025-01-30 00:16:08 -08:00
Federico Baron 12856a32b7 When doing the special case migration where cells shift up, only modify workspace items
Fix: 393212285
Test: Verified DB values
Flag: com.android.launcher3.one_grid_specs
Change-Id: I6cd1d520a2128925664ff3ac65ec75c86a7fb54b
2025-01-30 07:00:42 +00:00
Pechetty Sravani (xWF) 72f9943f64 Revert "Unifying various model update callbacks into one"
Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
2025-01-29 22:46:55 -08:00
Treehugger Robot 4a17c7ab0d Merge "Move SimpleOrientationTouchTransformer to Dagger." into main 2025-01-29 19:42:42 -08:00
Treehugger Robot 1a7e8991fe Merge "Using a dedicated thread executor for MSDL haptics" into main 2025-01-29 17:21:07 -08:00
Anushree Ganjam 4597aae947 Move SimpleOrientationTouchTransformer to Dagger.
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I2c7adf5da76f0a60c167f4c650622ba8dfeac98d
2025-01-29 17:15:03 -08:00
Charlie Anderson 722f6f3143 Refactor ShortcutsChangedTask to Kotlin
Bug: 375414891
Test: ShortcutsChangedTaskTest
Flag: EXEMPT no functionality change
Change-Id: If80b74a80abf9bed90f1572a9fee2494d39a6829
2025-01-29 16:41:29 -08:00
Treehugger Robot 473bd5c0a0 Merge "Unifying various model update callbacks into one" into main 2025-01-29 16:05:25 -08:00
Charlie Anderson fcb3d2ec38 Add folder shapes for corresponding icon shapes
Bug: 372886883
Bug: 389329983
Test: Presubmit && IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: I46b27b391fef5f379c65d81816353c93f56f2e1d
2025-01-29 14:16:56 -08:00
Juan Sebastian Martinez bdb090b9fb Using a dedicated thread executor for MSDL haptics
Some interactions have been experiencing delayed hapics (see bug in this
CL) due to haptics firing if a -sometimes- busy background thread. Like
in SysUI, we can avoid this by using a newSingleThreadExector when
firing one-shot MSDL feedback.

Test: manual. Rapidly selected different wallpapers and verified haptics
  played in sync with the UI update.
Flag: com.android.launcher3.msdl_feedback
Bug: 391384092

Change-Id: I1661c85976c4744058e046c7ff8386bb99c6d50b
2025-01-29 11:15:51 -08:00
Sunny Goyal e1e6f7a024 Merge "Using roundIconRes for loading appInfo icon if launcher's icon is round" into main 2025-01-29 10:51:09 -08:00
Sunny Goyal 8141a71281 Merge "Fixing icon shape not properly clipped" into main 2025-01-29 10:43:46 -08:00
Sunny Goyal 4c261f7343 Fixing icon shape not properly clipped
> Using ShapeDelegate for icon clipping
> Creating ShapeDelegate based on the current icon shape
> Defining different shape delegates for icon and folder
> Updating preview rendering to use dagger graph
> Adding tests for all icon shapes

Bug: 392145015
Test: atest IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: Ic9f287e2a6fef2aad18ba224404de58a64da0bb3
2025-01-29 16:24:38 +00:00
Sunny Goyal 2fac3efc38 Using roundIconRes for loading appInfo icon if launcher's icon is round
Bug: 392145015
Flag: EXEMPT not-supported during overlay change
Test: Verified manually on device
Change-Id: I7aa571e12318c28f8ff373c19a84d4856c57d6c5
2025-01-29 01:14:18 -08:00
Treehugger Robot 1cbb8fefe6 Merge "Fix errorprone warnings" into main am: 8a281b4ef8 am: b6e2e21180
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3464325

Change-Id: Ibaff978fb28561a2743e989cf7817277f7defcf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-28 20:03:07 -08:00
Charlie Anderson db9bb3c869 Merge "Convert UserCache to use Dagger" into main 2025-01-28 16:15:03 -08:00
Sunny Goyal 36c3112abf Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events

Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
      atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
2025-01-28 16:03:01 -08:00
Treehugger Robot de6fea5e00 Merge "Fix hotseat issue on grid migration where extra items get removed" into main 2025-01-28 12:40:17 -08:00
Charlie Anderson e90282b317 Convert UserCache to use Dagger
Bug: 372012340
Test: Presubmit
Flag: EXEMPT Dagger Change
Change-Id: I36a0a3f56540c0515d99badc127c2ab8534e684e
2025-01-28 15:30:07 -05:00
fbaron a80aed9429 Fix hotseat issue on grid migration where extra items get removed
Flag: EXEMPT bugfix
Test: n/a
Fix: 333849747
Change-Id: I6bf3b291de33930764ca8e4fac82c59c328adbde
2025-01-28 17:07:47 +00:00
Juan Sebastian Martinez d6479f1b1a Merge "Avoiding MSDL haptics when first starting a drag in workspace." into main 2025-01-28 08:45:28 -08:00
Juan Sebastian Martinez 1dce6f2503 Avoiding MSDL haptics when first starting a drag in workspace.
The MSDL token to play haptics when dragging was being played as soon as
a widget was long-pressed but not dragged over a new drop-off location.
Haptics should only play while the UI item is being hovered over new
cells. The new condition checks if the drag cell and drag cell span are
cleared and avoids playing haptics in this initial state.

Test: manual. Verified haptics while dragging icons over Workspace and
  Hotseat only when actually dragging over new cells.
Test: manual. Verified haptics with adb shell dumpsys of Launcher and
  checking the MSDL token history.
Flag: com.android.launcher3.msdl_feedback
Bug: 376103470
Change-Id: I7b2056f1c713b65f9df37f3138c1acf3b5376822
2025-01-27 15:00:51 -08:00
Cole Faust 42fc2058e6 Fix errorprone warnings
https://errorprone.info/bugpattern/BadInstanceof
https://errorprone.info/bugpattern/CompareToZero

Bug: 253827323
Test: Presubmits
Flag: EXEMPT refactor
Change-Id: If28f8f7f407b5b1e58911c58bb7d1b80f08c6114
2025-01-27 09:54:02 -08:00
Treehugger Robot 1809cb6ff3 Merge "Focus on newly added app for all Accessibility use cases when adding an app to the home screen." into main 2025-01-24 14:02:44 -08:00
Treehugger Robot 196ba82377 Merge "Removing redudntant objects from BgDataModel" into main 2025-01-24 12:00:33 -08:00
Shamali Patwa 51a340a3c4 Merge "Fix issue that recommendations were visible in landscape mode." into main 2025-01-24 10:35:40 -08:00
Stefan Andonian 8a41c7c99b Merge "Add Logging for NotificationService Events in Launcher" into main 2025-01-23 17:02:04 -08:00
Adnan Begovic 2ac0f140b2 Merge "launcher3: Only translate on positive values." into main 2025-01-23 14:13:22 -08:00
Sunny Goyal 777324ed15 Removing redudntant objects from BgDataModel
Bug: 390572144
Flag: EXEMPT refactor
Test: Updated model tests
Change-Id: Ied8a0bfdbfd324b9fb05724f1fcf67238aa37d16
2025-01-23 12:55:37 -08:00
Treehugger Robot 0fc6cb470c Merge "launcher3: Add support for custom layouts in ArrowTipView." into main 2025-01-23 12:17:39 -08:00
Treehugger Robot ed5910ad52 Merge "Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."" into main 2025-01-23 11:02:36 -08:00
Stefan Andonian a2db1356ba Focus on newly added app for all Accessibility use cases when adding an app to the home screen.
Bug: 377555526
Test: Verified that this works well for both this use case and for b/383456105's use case.
Flag: EXEMPT bug fix
Change-Id: I91426487f435d6c0b796cafe58b526c73dfaa398
2025-01-23 10:42:09 -08:00
Stefan Andonian 3ef8ffeaa8 Add Logging for NotificationService Events in Launcher
Bug: 362473999
Test: Verified that these logs show up on device
Flag: EXEMPT bug logs
Change-Id: Ib85fa5d57d0ff6fef456bfd816d21e41269eadbc
2025-01-23 10:02:18 -08:00
Treehugger Robot 11e4b589f6 Merge "Remove heuristic that determines whether to shift cells down or not" into main 2025-01-22 23:55:00 -08:00
Adnan Begovic 27772e9780 launcher3: Only translate on positive values.
Don't translate canvas on non positive values
  when utilizing delegate cell drawing.

Bug: 391731169
Test: manual, existing
Flag: com.android.launcher3.one_grid_specs
Change-Id: I44f51d40e5a6352e6d4eed2b9e475b2a37b6ea9d
2025-01-22 18:55:57 -08:00
Sunny Goyal a5fef475a5 Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."
Revert submission 31416515-revert-31332401-recents-device-state-LXBUANUQFL

Reason for revert: Fixing build breakage and resubmitting

Reverted changes: /q/submissionid:31416515-revert-31332401-recents-device-state-LXBUANUQFL

Change-Id: I3b89356df57f1e7ff1a9e364c0d766578e23798c
2025-01-22 18:31:06 -08:00
Shamali P 7d64195793 Fix issue that recommendations were visible in landscape mode.
ag/30344959 showed the recommendations if available, to avoid the issue
of widgets list flashing when exiting search mode. However, we usually
hide recommendations in phone landscape due to the sticky header layout
not having enough space. In this fix, instead, we rebind recommendations
as before (to let the logic there decide whether to show or hide them),
and in order to fix the flashing problem that the earlier change was handling, we reset the recycler view.

Bug: 391231345
Flag: EXEMPT bugfix
Test: Manual, we don't have tests for interactions between screens
Change-Id: I535aa43cc553c9287c5d38ef7cde30f01e84d347
2025-01-22 16:19:35 -08:00
Federico Baron 8d3883def3 Remove heuristic that determines whether to shift cells down or not
We decided to always shift the cells down, so that the new row always
shows up at the top

Bug: 391697719
Test: GridMigrationTest
Flag: com.android.launcher3.one_grid_specs
Change-Id: Id093e0d64e437bf218f942bfdf6d2f14ee875776
2025-01-22 23:19:43 +00:00
Adnan Begovic 3cabbe8f1d launcher3: Add support for custom layouts in ArrowTipView.
Allow overriding of various interfaces that allow a subclass
  of ArrowTipView to stipulate its own layout.

Test: manual, existing
Flag: com.android.launcher3.one_grid_specs
Bug: 388311172
Change-Id: Id42e2a18faf5ca6a4259c0e707f09584a6804cb0
2025-01-22 14:51:21 -08:00