Commit Graph

494 Commits

Author SHA1 Message Date
Catherine Liang c6c724ac82 Merge "Add ability to preview dark theme into Launcher preview" into main 2024-11-08 20:37:49 +00:00
Catherine Liang daf1defe55 Add ability to preview dark theme into Launcher preview
Dark theme preview currently works for views and themed icons but
doesn't work for widgets (remote views).

Flag: com.android.systemui.shared.new_customization_picker_ui
Test: manually verified
Bug: 371985937
Change-Id: I33193dff09d5900f1480720143ea272125a4c06c
2024-11-07 19:09:38 +00:00
Shamali P ea078cb647 Add a resource override for providing default widgets filter.
The implementation in this CL is no-op i.e. all widgets will be shown

Bug: 356127021
Flag: com.android.launcher3.enable_tiered_widgets_by_default_in_picker
Test: Verified with other child cls
Change-Id: I0a6f8973dc8ec58fd87d29b3f291b5e290ea988d
2024-11-04 22:17:23 +00:00
George Lin 2b6f265bf9 Shape screen communication with the Launcher's app (2/2)
This is a revertx2 of ag/29934361 with the fix of b/376371559

Support querying / preview / apply for the shapes from the Launcher's
app.

Test: Manually tested that it works
Fixes: 376371559
Bug: 348664593
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I232040f4c3661f149de4c88810e51f6dd8bac9c3
2024-11-01 18:07:05 +00:00
George Lin 50d2c82de6 Fix grid entry is missing
Test: Manually tested that the entry shows up again
Fixes: 376371559
Flag: EXEMPT bugfix
Change-Id: I8ecc842b948f0ed0676d3600d9538450012c7e80
2024-11-01 17:37:55 +00:00
Treehugger Robot 9486f5b455 Merge "OneGrid Grid Option Updates" into main 2024-10-30 22:06:11 +00:00
fbaron ebc10c9ecc OneGrid Grid Option Updates
Bug: 330900048
Flag: com.android.launcher3.one_grid_specs
Test: n/a
Change-Id: I919195dbc7ac78c3be42f0f9d7620193a24d7e99
2024-10-30 11:38:09 -07:00
Charlie Anderson 04cac2fc6a Merge "Convert IconShape to use Dagger" into main 2024-10-30 17:43:52 +00:00
Charlie Anderson c8e557a394 Convert IconShape to use Dagger
Bug: 372012340
Test: presubmit
Flag: EXEMPT dagger change
Change-Id: Ic4161fc0eac45cd71191f048472df01691018949
2024-10-30 11:34:15 -04:00
Daniel Chapin cd958b38ac Revert "Shape screen communication with the Launcher's app (2/2)"
Revert submission 29934361-launcher-communication

Reason for revert: b/376371559 

Reverted changes: /q/submissionid:29934361-launcher-communication

Change-Id: I26b2339fdb4da11312d4587ab31c23880ef0d746
2024-10-30 14:56:08 +00:00
George Lin f052a2ccf7 Shape screen communication with the Launcher's app (2/2)
Support querying / preview / apply for the shapes from the Launcher's
app.

Test: Manually tested that it works
Bug: 348664593
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I2b2fa570eb71c8975354f154640cc4891f16116b
2024-10-28 15:36:57 +00:00
fbaron a796d74e36 Refactor grid migration
In this CL:
-Make GridsizeMigrationLogic functions pure (no side effects)
-Make it so GridSizeMigrationLogic contains the migration logic and does NOT interact with the database
-Let GridSizeMigrationUtil receive the results from the logic layer and use those results to interact with the database appropriately

In future CLs:
-Refactor GridSizeMigrationLogic to Kotlin

Bug: 358399271
Flag: com.android.launcher3.grid_migration_refactor
Test: GridSizeMigrationTest
Change-Id: Ifcc5ca356558a7463352580f2e89eef8c86ed16b
2024-10-23 22:26:38 +00:00
Catherine Liang b5fdc80bb2 Handle messages to update Launcher preview color
Receive color update messages with a list of color resource ids and a
corresponding list of color overrides, and adjust the preview
accordingly.

Flag: com.android.systemui.shared.new_customization_picker_ui
Test: manually verified that the selected colors are previewed
Bug: 350718581
Change-Id: Ibcde0575416df00b76627ac1004f21f5f9af1196
2024-10-04 19:33:45 +00:00
Sunny Goyal be796be5e6 Fixing wallpaper preview rendered not being cleaned properly
> Using a single RunnableList for all the cleanup
> Performing cleanup when renderer surface is released

Bug: 362292374
Test: Verified manually using heapdump
Flag: EXEMPT bugfix
Change-Id: Idc1ee20dee2a2944d8e1c1d06b2662818d2b7001
2024-09-26 19:46:45 +00:00
randypfohl f29dc7c5ec abstracting fallback views to support container instead of activity
Test: Built and tested locally

Flag: NONE just abstracting in this cl

Bug:292269949

Change-Id: I0ce5efb4f193211216430f373605107c87de2c1a
2024-09-20 10:23:31 -07:00
Sunny Goyal 621918feda Changing min-sdk version of Launcher to 31
Bug: 368071216
Flag: EXEMPT refactor -> dead code removal
Test: Presubmit
Change-Id: I1f0113c56de56f12f3a174eb31c3f8e8a09407e6
2024-09-20 06:00:10 +00:00
George Lin b72dc07489 Merge "Wait for device profile reload" into main 2024-09-17 21:30:18 +00:00
George Lin b31f1452f1 Wait for device profile reload
Test: Manually tested the option updated after apply
Bug: 348664593
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I795b95407483a730ee22a184a6db96f64f6ee829
2024-09-17 14:15:21 +00:00
Liran Binyamin 69f4974e24 Hide hotseat when bubble bar is expanded.
Added logic to stash the hotseat when on launcher home screen.

Bug: 280494203
Test: Manual:
http://recall/-/gx8ASgewUeUS3QYohfrd1J/fjfjUw296LRXUm9uYqXU4K
all tests in com.android.launcher3.taskbar
Flag: com.android.wm.shell.enable_bubble_bar

Change-Id: I67b298831eaed9c549a2fae7dc5a0d9fae51f7c4
2024-09-16 15:50:28 -07:00
Sunny Goyal 65342edc89 Removing obsolete flags
Flag: EXEMPT legacy ENABLE_PARAMETRIZE_REORDER, KEYGUARD_ANIMATION, ENABLE_SCRIM_FOR_APP_LAUNCH
Bug: 289420844
Bug: 270390904
Bug: 270393276
Test: Verified manually
Change-Id: I0eb166168100419fdf4d264f7ccddeeba86524b7
2024-09-10 21:24:47 +00:00
George Lin de4d7457a8 Send message to launcher renderer to update grid (3/3)
This CL supports external surface view callbacks to send messages to
update the launcher's preview grid.

Bug: 348664593
Test: Manually tested. See bug.
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: I8108ae2c49af6b4fc1a207c6ece23e82616baa61
2024-09-05 16:49:15 +00:00
Sebastián Franco 51c8ae668d Merge "Remove unused methods" into main 2024-07-18 03:05:15 +00:00
Shamali P 3ae39c72de Cleanup widgetsModel and add tests
1. Removes unused method `getAllWidgetComponentsWithoutShortcuts`
2. Exposes widgets either as component map or package item map - to
eliminate the duplicate logic around widget sections.
3. Add tests that validate that each package is unique - to help
cover the redirect issue seen in past.
4. In follow up cls, other methods that deal with picker specific data
types like WidgetsListBaseEntry will also be moved out - leaving the
model to only be responsible for providing all widgets map or widgets
by package.

Bug: 341611976
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: Ife70874d312b51c66025a6ec678480f2b5c41793
2024-07-17 14:29:31 +00:00
Sebastian Franco c275326e40 Remove unused methods
Bug: 353303621
Test: compiles
Flag: NONE Removing code
Change-Id: Ibfdc983c5d29d8e928e4277dac285d4e62bdc1fd
2024-07-16 19:10:32 -07:00
Fengjiang Li 6944c9e63f [Launcher Jank] Add TODO for LauncherPreviewRenderer to set bg handler on smartspace BaseTemplateCard
Fix: 347775522
Flag: NONE - performance change
Test: manual
Change-Id: I19ba67e1eabfe02c45909d85d723bc28a78ae6df
2024-07-09 13:38:32 -07:00
Sunny Goyal bf3efe8af0 Fixing LauncherIcons leaking outside sandbox context
Since LauncherIcons was using a global static pool, a custom
instance for a test could leak into the global pool, affecting
other tests

Bug: 335280439
Test: Verified image test on device
Flag: None
Change-Id: Iedd19c8e69c928e44b65eae7eba0167b03b5df6b
2024-05-07 12:13:37 -07:00
Charlie Anderson 496198ac4a Merge "Fixes padding for app icons in Launcher preview for Foldable devices in unfolded state." into main 2024-05-03 18:46:00 +00:00
Charlie Anderson 0920311107 Fixes padding for app icons in Launcher preview for Foldable devices in unfolded state.
Also adds unit tests for the padding.

Bug: 332566064
Test: manually verify
Flag: N/A
Change-Id: Ic9227086b4025b4f266f2f2305159f032c21556b
2024-05-03 16:07:24 +00:00
Federico Baron c113ce9f9f Merge "Migrate smartspace as a widget and smartspace removal toggle flags to aconfig" into main 2024-04-29 21:46:03 +00: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
fbaron 9d08e0fe70 Migrate smartspace as a widget and smartspace removal toggle flags to aconfig
Bug: 336823684, 336823681
Test: none
Flag: ACONFIG enable_smartspace_as_a_widget DISABLED
Flag: ACONFIG enable_smartspace_removal_toggle DISABLED
Change-Id: I4cba42e09f58365f761ab866b15a494817e6bb0f
2024-04-25 14:26:30 -07:00
Sunny Goyal edbe8e5ffc Merge "Fixing MainThreadInitializedObject" into main 2024-04-23 18:06:38 +00:00
Sunny Goyal 10fa016352 Fixing MainThreadInitializedObject
> Making SafeCloseable implementation mandatory, to prevent leaks during test and preview
> Removing getNoCreate method and defining executeIfCreated to avoid null pointer exceptions
> Fixing sandbox value leaking into main, by Checking sandbox against App context
> Converting sanbox to an interface instead a class

Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: I951dcde871898e745ff6490a1c4f8fd1512888f5
2024-04-22 17:04:33 -07:00
Sebastian Franco b41d4b4e7a Make getWidgetProviderInfoByProviderName return the correct WidgetItem
for Pixel own widgets.

The pixel own widgets can have categories and getWidgetProviderInfoByProviderName
might not find the right widget if the widget has a category.

Flag: NA
Test: Manaul testing =(
Test: Make sure the placement in the widget picker is correct.
Test: All widgets in widget_section.xml with alsoKeepInApp set to false will previously dissapear on the preview.
Fix: 331628371
Change-Id: I1e4c8ae3dd21f8aef3e4aac99ce6ce6701e94760
2024-04-22 10:47:50 -07:00
Shamali Patwa 1b8fcf4371 Merge "Revert "When getting a widget provider by name, check all categories"" into main 2024-04-18 22:14:29 +00:00
Shamali Patwa 7e5ed568b9 Revert "When getting a widget provider by name, check all categories"
This reverts commit 1f69351310.

Reason for revert: Testing odd behavior between google app and pixel weather and duplicate items issue

Change-Id: If181aa3e86969e8821b7e1cc765c3801f04489d2
2024-04-18 18:16:38 +00:00
Sebastián Franco f0c030380a Merge "When getting a widget provider by name, check all categories" into main 2024-04-17 16:24:21 +00:00
Sebastian Franco 1f69351310 When getting a widget provider by name, check all categories
Some widgets have different categories for special cases for Pixel
widgets and because of that, some times we can't find the provider,
so we need to go through all of the categories.

Flag: NA
Test: Manaul testing =(
Test: All widgets in widget_section.xml with alsoKeepInApp set to false will previously dissapear on the preview.
Fix: 331628371
Change-Id: Iffbb788cbb27c79a215d06d21c9d623462d6f7e6
2024-04-15 19:21:21 -07:00
Sunny Goyal 4a22ed81ea Using resource overrides for PluginManager instead of code-swap
Bug: 330920490
Test: Presubmit
Flag: None
Change-Id: Ib1cd50f95873928b9ce104e8e95d21f1dca9c6e3
2024-04-12 11:38:32 -07:00
Jeremy Sim da4ba9336e Merge "Reparent folders and app pairs" into main 2024-03-30 03:06:44 +00: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
Sunny Goyal 77954bae4e Cleaning up some build configurations
> Removing Launcher3Go-without-quickstep
> Removing src_ui_overrides to src_no_quickstep
> Removing unnecessary code swpa for GO builds

Bug: 330920490
Flag: None
Test: Presubmit, everything builds
Change-Id: I5746dbc7c5a37c1d99d78b55bf2a6adce1a711c9
2024-03-26 17:16:52 +00:00
Jeremy Sim 46ca78ee78 Merge "Refactor how app pair icons draw" into main 2024-03-26 02:39:37 +00:00
Jeremy Sim b37faec287 Refactor how app pair icons draw
This changes (and cleans up) the way app pair icons are composed. Previously, the background and 2 icons were drawn individually and separately onto the canvas. Now, they are composed into a combined drawable first. This also allows the full icon drawable to be requested by external functions (which will be needed for display app pairs in folder previews).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Visually confirmed that app pairs loooks the same in all scenarios: rotation, disabled, themed, taskbar, pinned taskbar. Screenshot test to follow.
Change-Id: I7242e0c525ef578a54a06fb9137fcfc42c6f0e86
2024-03-25 16:43:40 -07:00
Sunny Goyal bd7ec3335b Using xml override instead of code swap for predicted icon
Bug: 330920490
Flag: None
Test: Presubmit
Change-Id: I5ff52464b931630da003fb6aeff2a4fd9d2dd3b3
2024-03-25 15:18:48 -07:00
Catherine Liang 975a0695fb Merge "Remove createWindowContext in Launcher preview renderer" into main 2024-03-11 14:13:01 +00:00
Catherine Liang 0089efe18a Remove createWindowContext in Launcher preview renderer
The line causes an error in Window Manager. When removed, it doesn't
seem to have an effect for the Wallpaper Picker use case. The preview
render still shows correctly after config changes including rotation
and dark/light theme because the picker restarts and re-requests a
preview.

Flag: NA
Bug: 328089367
Test: manually tested with config changes and different lifecycle cases
Test: manually tested with multi crop flag on and off
Change-Id: Id1bd30c7ab4c50d29622b647bd368aafbd5c043f
2024-03-05 20:32:45 +00:00
Catherine Liang 71767d1605 Fix Launcher preview crash
Launcher preview could crash when unfolding a foldable device due to the
folded state display id no longer being valid, resulting in getting a
null display. This was leading to an empty preview bundle being
returned, which is unexpected because null is expected in the case of an
exception. Instead of crashing in getDisplayId, it's better to throw an
exception earlier on if the display is null and return null.

Flag: NA
Bug: 326637851
Test: manually verified by testing unfold in WPP in old and new preview

Change-Id: Ibc353d9447a71d33092d96029a812017487d0970
2024-02-26 21:35:20 +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
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