Commit Graph

567 Commits

Author SHA1 Message Date
Sebastian Franco
cc18ee380e Do not modify the original item info when adding a new item in Worksapce
Fix: 418114270
Test: NA
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbd6f0d18f69d5d33862aaad015c4c8c5907fb46)
Merged-In: Ic0dd00da4f363868a1c2abeeb736b86f6f706631
Change-Id: Ic0dd00da4f363868a1c2abeeb736b86f6f706631
2025-06-25 21:04:11 -07:00
Brian Isganitis
8f8e82c02d Implement InMemoryLauncherPrefs backed by InMemorySharedPreferences.
Flag: EXEMPT bugfix
Bug: 415787583
Test: InMemoryLauncherPrefsTest
Change-Id: I507d02e45c7ace1cf6cb8df7018f6767e1fdb8af
2025-06-06 17:11:16 -04:00
Toni Barzic
2d0ca1a195 Move logic for stable scale factor to DisplayController
When selecting grid size to use for desktop, size breakpoints are
compared to the display dimensions with "stable" device density.
Expose the scale factor that needs to be applied to dimensions
provided in spec via DisplayController::Info, so it can be more easily
faked in tests.

Bug: 375643744
Test: atest DeviceProfileDumpTest
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Change-Id: I836430cc052f72c0f89b6cdd5ab5309a3482d94e
2025-06-05 05:16:23 +00:00
Sebastián Franco
b11936e0f5 Merge "Moving AllApps device profile variables to their own class" into main 2025-06-02 13:34:10 -07:00
Treehugger Robot
2f9d81a9d7 Merge "Converting FastBitmapDrawable to kotlin" into main 2025-05-30 17:38:05 -07:00
Catherine Liang
829f57c522 Merge "Move custom Launcher theme flag to shared SysUI package (1/3)" into main 2025-05-30 10:51:09 -07:00
Sebastian Franco
136295f62a Moving AllApps device profile variables to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I6490422d04f9f0aeaadf8271d4d11172f344660a
2025-05-30 09:56:01 -07:00
Sunny Goyal
e674891dfa Converting FastBitmapDrawable to kotlin
Will be adding more functionality in followup cl, and this will make it easier

Bug: 421146818
Flag: EXEMPT refactor
Test: atest FastBitmapDrawableTest
Change-Id: I7ce3ca0dc126efe410c8b7ebec6c601666b7cb54
2025-05-30 08:52:52 -07:00
Shamali Patwa
cddba00520 Merge changes from topic "widget-picker-launcher" into main
* changes:
  Add dagger2-compiler to some of picker module targets.
  Add no-op widget picker module to some test modules / graphs.
  Wire the compose based widget picker in widget picker activity
  Repository and datasource implementations backing the widget picker.
  Add widget picker module dependency to launcher when compose is enabled
  Open widget picker activity instead of full sheet when refactor flag is on
2025-05-30 04:18:55 -07:00
Shamali Patwa
9d946aa755 Add no-op widget picker module to some test modules / graphs.
Bug: 408283627
Flag: EXEMPT not applicable
Test: dagger build
Change-Id: I77b2f9f32037303ddfd7f2950c7b235f9aff8f2c
2025-05-29 13:26:10 -07:00
Catherine Liang
4bbf978043 Move custom Launcher theme flag to shared SysUI package (1/3)
This allows the flag to be shared with Customization Picker.

Flag: com.android.systemui.shared.extendible_theme_manager
Test: manually verified by building w/ soong and gradle
Test: manually verified by flipping flag
Bug: 397782741
Change-Id: I131f54602e33dd2b92ce0068f5fc43da3e150a01
2025-05-29 18:47:43 +00:00
Treehugger Robot
ba8a5a2235 Merge "Disable surface effects when a theme controller doesn't support adaptive themed icons" into main 2025-05-29 09:57:49 -07:00
Sunny Goyal
ac35781625 Disable surface effects when a theme controller doesn't support adaptive themed icons
Bug: 420985075
Bug: 415118235
Flag: com.android.launcher3.extendible_theme_manager
Test: Verified on device
Change-Id: I82c46e529aa59be345bf6cdfcfa29fdf784c0068
2025-05-28 16:38:24 -07:00
Sunny Goyal
bb0f554148 Converting StatsLogManager to kotlin
This is make it easier to create factory classes for individual when adding more injected parameters

Bug: 361850561
Test: Presumit
Flag: EXEMPT refactor
Change-Id: Ie68e9e24aae801b7fed14d1b03df760e5b67c183
2025-05-28 14:12:13 -07:00
Treehugger Robot
13a600cd96 Merge "Adding ListenableRef as an alternative to StateFlows." into main 2025-05-27 18:01:25 -07:00
Sebastián Franco
e1d31e5406 Revert "Revert "Moving DeviceProfile properties into DevicePrope..."
Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Reason for revert: Error is fixed

Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
2025-05-23 14:08:11 -07:00
Priyanka Advani (xWF)
7705e92d93 Revert "Moving DeviceProfile properties into DeviceProperties da..."
Revert submission 33672643-DataDeviceProfile1

Reason for revert: Droidmonitor created revert due to b/419867875. Will be verifying through ABTD before submission.

Fix: 419867875

Reverted changes: /q/submissionid:33672643-DataDeviceProfile1

Change-Id: Icb66aefbbcee24e05806b2139923e1f2ea1c65e3
2025-05-23 13:53:04 -07:00
Sunny Goyal
a57d75cd11 Adding ListenableRef as an alternative to StateFlows.
This allows using listener pattern instead of coroutines within the recommended repository pattern and avoid the jank due to coroutines

Bug: 390572144
Test: atest ListenableRefTest
Flag: com.android.launcher3.model_repository
Change-Id: I9f74166e01e1bdb4cb8afce3213022ea10137230
2025-05-23 13:52:16 -07:00
Sebastian Franco
e1111e28c2 Moving DeviceProfile properties into DeviceProperties data class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I638f88cd76b926917965dbf9e70b5bdfff5971e0
2025-05-23 10:42:26 -07:00
Treehugger Robot
091890adbc Merge "Support workspace cells with two-line labels" into main 2025-05-21 18:25:15 -07:00
Toni Barzic
83b8cc19ca Support workspace cells with two-line labels
Adds `maxLineCount` attribute to CellSpec. The attribute indicates the max
number of lines of text the cell was speced to support. It's used to:
*   enable two-line labels in `BubbleTextViews` for workspace (including
    folder children) items
*   Update cell dimension calculation to inform cell vertical padding

When calculating cell content size the icon text size will be included
`maxLineCount` times, so the cell content gets centered as if it
contains `maxLineCount` lines of text. That way the icon position will
be consistent between cells with text that fits into one line, and cells
that contain two lines of text.

Adds `maxLineCountMatchesWorkspace` attribute to specify that the cell
should inherit `maxLineCount` from workspace cell spec.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: I150a62f427a0ad755a4746a736d9846d3bea4d2e
2025-05-21 22:04:33 +00:00
Kevin Lim
f7ce5a06fe [Multiline] Clean-up multiline flag on Launcher3
Bug: b/409605328
Flag: EXEMPT removing multiline_search_bar
Test: Unit tests all passing
Change-Id: Id377b7c99af0d0265102888b8021c0809f53a6b9
2025-05-20 18:52:14 -07:00
Shamali Patwa
b7b5e60d9f Merge "Pass device profile as constructor arg to DatabaseWidgetPreviewLoader" into main 2025-05-16 14:06:39 -07:00
Shamali P
4cb6ff3838 Pass device profile as constructor arg to DatabaseWidgetPreviewLoader
This is so, we can use it with compose, and let caller pass the needed
dependencies. May also convert to dagger in
 followup

Bug: 408283627
Flag: EXEMPT BUGFIX
Test: N/A
Change-Id: I9b04011ec2592df3bd02bd74ec4889eb05928e7f
2025-05-16 11:47:18 -07:00
Sunny Goyal
869b20cb27 Adding repository for AppsList data
Flag: com.android.launcher3.model_repository
Test: atest AppsListRepositoryTest
Bug: 390572144
Change-Id: I6e5993c91f77ed8f0b6f2c12c9d743c87a497134
2025-05-14 21:19:18 -07:00
Brian Isganitis
70e62fce31 Merge changes from topic "taskbar-wmproxy-module" into main
* changes:
  Filter out DEFAULT_DISPLAY from Taskbar unit tests.
  Refactor test dagger graph to stub PerDisplayRepository instances.
  Only use mockito-kotlin in SandboxApplication.
2025-05-14 14:17:21 -07:00
Sunny Goyal
fabe5b213d Merge "Adding support for diff in WorkspaceData, so that UI can apply incremental updates" into main 2025-05-12 18:27:05 -07:00
Brian Isganitis
bcf2a81aa3 Only use mockito-kotlin in SandboxApplication.
Flag: TEST_ONLY
Bug: 415826632
Test: Related tests
Change-Id: I8a2704a8b55a0fd785577d6641665a34c1c9b650
2025-05-12 15:51:52 -04:00
Sunny Goyal
e40896639b Simplifying startup latency logger by moving everything to a single class
> Moving some latency logic out of Launcher and into logger
> This makes it easier to move the logger completely out of Launcher

Bug: 390572144
Test: atest StartupLatencyLoggerTest
Flag: EXEMPT refactor

Change-Id: I6f6d99e7ed6c77610534c64461ec34200780225f
2025-05-12 09:39:06 -07:00
Sunny Goyal
473bc9a06a Adding support for diff in WorkspaceData, so that UI can apply incremental updates
Bug: 390572144
Flag: com.android.launcher3.model_repository
Test: atest WorkspaceDataTest

Change-Id: I5fead4fdedfa2f6ac03ca106f7f0a5900af3760e
2025-05-09 15:26:09 -07:00
Coco Duan
b97962a927 Merge "Show all default widgets in glanceable hub widget picker" into main 2025-05-09 11:48:32 -07:00
Uwais Ashraf
1ae9814920 Merge "Create separate worker threads for IO work and lighter BG work" into main 2025-05-09 09:45:40 -07:00
Coco Duan
cc55afe1fd Show all default widgets in glanceable hub widget picker
Update the predicate condition to correctly use the host's specified
filter for default widgets.

Fixes: b/415899961
Test: verify in hub widget picker on tablet
Test: atest WidgetPickerDataProviderTest
Flag: EXEMPT bugfix
Change-Id: I5a68d49dfda08059de880bca6964ac1620ffff36
2025-05-09 07:18:36 +00:00
Uwais Ashraf
c1102750dd Create separate worker threads for IO work and lighter BG work
Documentation largely pulled from Kotlin coroutines docs.

Flag: com.android.launcher3.enable_coroutine_threading_improvements
Bug: 416206104
Test: Presubmits
Change-Id: I89b7222e31680619e311fa9e9986da5c12d80ed4
2025-05-09 06:49:48 +00:00
Sunny Goyal
57a195b790 Making workspaceData immutable
BgDataModel holds a mutable handle of the data, which ensures that all edits go through this class and there is a single place to keep the repository updated

Bug: 390572144
Test: Updated existing model tests
Flag: EXEMPT refactor
Change-Id: I991b707dd21801d1abd00510f676549947285012
2025-05-07 13:21:21 -07:00
Shamali Patwa
fce9328959 Merge "Log when a required attribute is missing in the AutoInstall layout." into main 2025-05-07 06:21:12 -07:00
Treehugger Robot
0b0dd2683a Merge "Reparse all grids for secondary displays for DP" into main 2025-05-06 13:03:00 -07:00
Sunny Goyal
53cc9a7806 Merge "Moving predicted items to ItemIdMap instead of extraItems" into main 2025-05-06 10:29:39 -07:00
Sebastián Franco
73dd3d3723 Merge "Making the Launcher Customizar available to Launcher3 and not only Nexus" into main 2025-05-06 08:56:51 -07:00
Ajinkya Chalke
bb3571806e Reparse all grids for secondary displays for DP
- This is required to show a half width all apps sheet on external
  monitor connected to the phone. Without this the apps sheet covers the
  full width of the external monitor in projected mode.
- Create a new class to hold all the properties that need to be
  overridden. Set this class as part of DP buider.
- Override all props that are overridden for isTwoPanels.
- Update isTwoPanels to override using the new class in DP constructor.

Flag: com.android.window.flags.enable_taskbar_connected_displays
Bug: 414342881
Test: m
Change-Id: Ia035620c96c5a8912b99314014d4b19a125c7c5c
2025-05-06 12:32:53 +00:00
Sebastian Franco
3fd034c932 Making the Launcher Customizar available to Launcher3 and not only Nexus
Bug: 390496167
Bug: 411322054
Test: All Image tests
Flag: EXEMPT test only
Change-Id: I5e6cd806036bbc548ba9526efd619eec7ab9facd
2025-05-05 22:56:38 +00:00
Sunny Goyal
aef6c7932e Moving predicted items to ItemIdMap instead of extraItems
> This allows the whole workspace model to be contained in itemIdMap instead of spread across multiple data containers
> Deprecating extraItems, all non-workspace data should use separate repositories
> Design: http://go/launchermodel-re-arch?#heading=h.5y8n4r164d5s

Bug: 390572144
Test: atest PredictionUpdateTaskTest
Flag: EXEMPT refactor
Change-Id: I886d0a8d5bbbf9f5c2054d4a2442bf03f9c4eab5
2025-05-05 15:52:37 -07:00
Shamali Patwa
b7ee8bc7a0 Log when a required attribute is missing in the AutoInstall layout.
Current implementation fails but doesn't give error message on what caused failed.


Bug: 413665268
Test: Unit test
Flag: EXEMPT BUGFIX
Change-Id: Iedbd18bb37c0e4d1ac8b86d426d469ddc5fe163f
2025-05-05 12:39:38 -07:00
Sebastian Franco
fc8537d5de Creating NexusLauncherE2ETests test suite, this cl only adds the Launcher3 part
The test don't run yet in presubmit, first I will have the NexusLauncherE2ETests
target ready and then I will add it to the presubmit.

Bug: 324261526
Flag: EXEMPT test only
Test: atest NexusLauncherE2ETests
Change-Id: I4daa204ec735456c481b0682ca518da381af7bb7
2025-05-05 18:53:08 +00:00
Jagrut Desai
f52ffc1232 Auto-Stashing Functionality for Pinned Taskbar
This cl includes :
- Refactor to remove unpinning/pinning in desktop mode with refactor of DisplayController, TaksbarPinningController, and its tests.
- Combined the auto stashing conditions under one method shouldAllowTaskbarToAutoStash() which takes in consideration isTransientTaskbar, isInDesktop, and Always Show Taskbar option is turned on/off in desktop mode.
- enabled taksbar divider popup support in desktop mode.
- Intorduced animation for pinned taksbar when autostadhing is enabled.
- Enable to onSwipeToUnstashTaskbar for TaskbarInputStashController for pinned taksbar in desktop mode.

Test: Presubmit, Unit, Manual
Bug: 381535785
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ie5ecf3a3c72bf8dfadf2d0c908269305fe5bad0b
2025-04-30 10:39:58 -07:00
Pat Manning
9ee290e81f Cancel ongoing dismiss animation when Launcher state changes.
Fix: 410744889
Test: Manual
Flag: com.android.launcher3.enable_expressive_dismiss_task_motion
Change-Id: I5e81de6762e7d0ea47f8574599901aac1bb8bb77
2025-04-28 10:27:29 +01:00
Treehugger Robot
59e208c28e Merge "Moving various launcher binding logic, outside LauncherModel" into main 2025-04-23 12:32:54 -07:00
Sunny Goyal
3678af5a81 Fixing crashes due to code 1032 SQLITE_READONLY_DBMOVED
1) Moving any DB file deletion before opening the DB to avoid deleting already opened file
2) Using a sandbox directory for BackupAndRestoreDBSelectionTest which can delete actively opened files causing other tests to fail

Bug: 403551539
Flag: EXEMPT bugfix
Test: Presubmit
Change-Id: Ib1088a0e486edf755e5f7dcd738eb835af78b4c4
2025-04-22 16:09:52 -07:00
Sunny Goyal
c078d6554c Moving various launcher binding logic, outside LauncherModel
This brings the BgCallbacks closer to a repository pattern making is easier to switch eventually

Bug: 390572144
Flag: EXEMPT refactor
Test: Updated AsyncBindingTest to use real ModelCalbacks
Change-Id: I9c932b00ea8ac7330473b9c0f5d778453fe7a390
2025-04-22 14:12:17 -07:00
Sunny Goyal
54e5ed0d36 Creating a dumpmanager class to allow dumping state from singleton objects
Bug: 410927105
Flag: EXEMPT refactor
Test: atest DumpManagerTest
Change-Id: Idcd1c74b1edf7a79ec8e4fa91676e617afa04907
2025-04-17 11:05:20 -07:00