Commit Graph

545 Commits

Author SHA1 Message Date
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
Treehugger Robot
2711f8d0d9 Merge "Removing flag enable_smartspace_removal_toggle" into main 2025-04-16 18:57:40 -07:00
Jeff DeCew
9593f2b612 Merge "Set shouldForceThemeIcon = true in ThemeManager" into main 2025-04-16 18:16:17 -07:00
Sunny Goyal
613db2b609 Removing flag enable_smartspace_removal_toggle
Test: Presubmit
Flag: EXEMPT cleanup
Bug: 303471576
Change-Id: Iae8cc3afbf15c66612589fd1e19377e4339af7fc
2025-04-16 10:54:45 -07:00
Ioana Alexandru
a58f02bcec Set shouldForceThemeIcon = true in ThemeManager
This is now preferred over a boolean config value.

Bug: 406507218
Test: manual
Flag: EXEMPT minor change
Change-Id: I3c6f359d7eb78784ea4c9a9f462bc6a6f1914bb6
2025-04-16 09:03:13 +02:00
Andy Wickham
16a024df71 Adds Blur and BlurFallback styles for All Apps.
Technically these styles can be used throughout Launcher, e.g.
Widget Picker and Folders, but this CL only applies it to All Apps.

At a high level, views wishing to apply transparency to show blur
should use these new attr values rather than colors directly.

When blur changes, e.g. starting or stopping battery saver, the
style is re-applied and revelant views are invalidated. For
Launcher, this is handled by DepthController, and for Taskbar it's
handled by a CrossWindowBlurListener.

Also updated the Private Space animation slightly to account for
the translucent decorators (specifically, we can't use the mask
view to cover them when blur is enabled).

Screenshots: https://drive.google.com/drive/folders/1tU472KHotgEBpT-Ec9VOBWPBf_YdVqv2?resourcekey=0-ebf7W8O6iDJ4UVMtRzTABg&usp=sharing
Private Space animations: https://drive.google.com/file/d/1h5pn8Xb17TPcbujr7uSAJNTq8kwNZoIp/view?usp=drive_link&resourcekey=0-TzpaJ16Gg8_QJctBx4oiIg
Private Space QS Tile animations: https://drive.google.com/file/d/1dCuqnqd5z2kSBEakGobMlEkMwFDBWRbJ/view?usp=drive_link&resourcekey=0-qRVFPb-a6OzaZQOf4x86Jw

Bug: 371343636
Test: Manual
Flag: com.android.launcher3.all_apps_blur
Change-Id: Ia9f581f50d1adc0830569656bdeb751deb710a9c
2025-04-15 16:42:56 -07:00
Treehugger Robot
14a18dbf9b Merge "Fix launcher tests in studio" into main 2025-04-15 13:05:00 -07:00
Dave Mankoff
396d69956b Fix launcher tests in studio
Fixes: 410874290
Flag: EXEMPT small fixes for gradle
Test: test_gradle_build.sh
Change-Id: Iab8ad757d11e1d0ba5f85a7063e2d087ffc38d2b
2025-04-15 19:05:48 +00:00
Adnan Begovic
ee79e0f5d2 launcher3: Use @UiExecutor within ThemeManager.
Use the provided @UiExecutor within the ThemeManager
instead of referencing the MAIN_EXECUTOR directly.

Bug: 407593767
Test: ThemeManagerTest
Flag: NONE - new module
Change-Id: I6359adc1308bdb209dcf6c6e1c2d3fc7f4438585
2025-04-15 09:04:44 -07:00
Sunny Goyal
040ff3a7bf Adding HomeScreenRepo to expose homescreen data as repository
Bug: 390572144
Test: Presubmit
Flag: com.android.launcher3.model_repository
Change-Id: If82a388a44d7a9c448f6eb4901c2acdb508ccfdc
2025-04-11 13:28:08 -07:00
Charlie Anderson
6f5f8cac25 Update folder previews to new specs
Bug: 403616844
Flag: com.android.launcher3.enable_launcher_icon_shapes
Test: visually comparing against spec

Change-Id: I671b3de7d4ac574122ee3a33451f6cb1d6155f29
2025-04-03 16:42:35 -07:00
Sunny Goyal
50884dadfe Lazily loading theme icons
Theme icons are generated and stored in cache, but only loaded if requested in lookup flags
This allows to keep the memory usage low, but not loading theme icons for all the apps

Bug: 381897614
Flag: com.android.launcher3.extendible_theme_manager
Test: Updated tests
Change-Id: I494eab9c4f70670e6f5aeb864ed5287f6b9f1b9e
2025-03-31 13:07:03 -07:00
Sunny Goyal
45f1a5190c Merge "Using item inflater for predicted items and previews" into main 2025-03-28 15:18:11 -07:00
Will Osborn
5c00b41505 Merge "Refactor RecentsAnimationDeviceState and TaskAnimationManager using new PerDisplay library" into main 2025-03-28 14:05:39 -07:00
Sunny Goyal
bdd3f29342 Using item inflater for predicted items and previews
Bug: 406668365
Test: Verified manually in picker
Flag: EXEMPT refactor
Change-Id: If8ca919a19b7d1b6cbdc33823a9f294df1afa968
2025-03-28 13:05:25 -07:00
Will Osborn
ec8d20d0ed Refactor RecentsAnimationDeviceState and TaskAnimationManager using new PerDisplay library
Test: locally tested on Tangor
Bug: 399371607
Flag: EXEMPT refactor

Change-Id: Ie52f53a2d5dee757a8dc3b19248736bc15e5e0c6
2025-03-28 12:08:36 +00:00
Shamali P
472709d9ca Delete the filter code as it will be provided differently in refactor
With the dagger update the initialization happens in constructor which
we would avoid once we work on refactor and move it into a repository
class. The list will also be fetched from a different data source, so,
makes sense to delete it at the moment.

Bug: 406324964
Flag: EXEMPT BUGFIX
Test: Not applicable as code is removed
Change-Id: Iab8bb1e94677abf9b5b882f4d3485b002faf3e0f
2025-03-27 14:15:05 -07:00
Sunny Goyal
2201485e22 Merge "Using ItemInflator for inflating Folder instead of duplicating code" into main 2025-03-27 12:45:01 -07:00
Sunny Goyal
0479ff832c Using ItemInflator for inflating Folder instead of duplicating code
Bug: 406668365
Flag: EXEMPT refactor
Test: atest FolderTest
Change-Id: I63186ba620b5380edfc5e8cded253a85379a5d82
2025-03-27 09:48:46 -07:00
Sunny Goyal
3b307455a0 Revert^2 "Simplifying model testing rules"
35b6d322ab

Change-Id: I3ed574a517dbe350b6dfe5b1d3ed198203d22f44
2025-03-26 23:08:55 -07:00
Priyanka Advani (xWF)
35b6d322ab Revert "Simplifying model testing rules"
Revert submission 32704934-model-test-cleanup

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

Reverted changes: /q/submissionid:32704934-model-test-cleanup

Change-Id: Ieeb7f5b5699afeae27f946f060147bb68afc36e5
2025-03-26 16:12:16 -07:00
Sunny Goyal
cb84230913 Simplifying model testing rules
> Using Sandbox application everywhere to avoid test leaks
> Removing LauncherModelHelper and moving some utility methods to rules and extensions

Bug: 406521480
Flag: EXEMPT test only
Test: Presubmit

Change-Id: I17bd5ec2bdb0fc0cbe02be9c8ee76595effe3f11
2025-03-26 11:34:15 -07:00
Sunny Goyal
e8d901fbdb Deflaking ShortcutsChangedTaskTest by not using an active model
When using an active model, the data can change on the model thread while
the test is running on a different thread.
Instead using the model data directly without an active model running

Bug: 399155567
Flag: EXEMPT testfix
Test: Presubmit
Change-Id: I332cd7ec0f5a2fb4760ce080f016c725b2233c45
2025-03-25 12:12:20 -07:00