Updates drag and drop, tap to add and preview related code.
Bug: 370950552
Flag: com.android.launcher3.enable_widget_picker_refactor
Test: Drag and drop shortcuts on home screen
Change-Id: Iccfe329296dbf4b0770628e77df5cd9b42ac9b21
Adds sealed class for widget info that can contain either appwidget info
or shortcut info.
Also kept the aosp config.xml empty to keep everything eligible for
featured
Bug: 370950552
Flag: com.android.launcher3.enable_widget_picker_refactor
Test: Open picker for homescreen and lockscreen hosts
Change-Id: Iceafc2c1234063b16421f90bf00cf96114e9870c
- Shows an error message when there are no widgets to show.
- Also adds a spacer item for edge padding to offset floating toolbar.
Bug: 408283627
Flag: com.android.launcher3.enable_widget_picker_refactor
Test: Test changes
Change-Id: I89e78a9dafc23bb02be13e6fde08971835ff18f0
- Switched the tests that probe old picker to use disabled flag
- Added some more tests for new code
- A test to use the tap to add listener to add widget to homescreen
- Updated compose unit test to cover for expanding an item
Bug: 408283627
Flag: EXEMPT independent module
Test: Test changes
Change-Id: I238896ec6e24596db93953a22bb43f6c7abbb9d1
* changes:
Override the picker theme colors to map to resources in launcher
Update picker tests to wrap content with widget picker theme.
Replace the color / text style tokens with the newly defined picker specific tokens
Define composition locals for configuring color / font tokens specific to widget picker.
Text styles at the moment uses default tokens, but can be replaced in follow up.
Bug: 408283627
Flag: EXEMPT independent module
Test: See demo
Change-Id: I91764c5aca3daa729c89882f653bb0f088248170
These handle those two operations for home screen when widget picker is
opened as a separate activity.
Bug: 408283627
Flag: com.android.launcher3.enable_widget_picker_refactor
Test: Not applicable.
Test: See demo in comments
Change-Id: I37f626b57610379a8af4e7a229406ed0656806c2
- Uses new picker behind a flag.
- Includes appropriate implementation of picker module based on whether compose is enabled.
Bug: 408283627
Flag: EXEMPT independent module
Test: Upcoming in follow up cls
Change-Id: I13e69379bc89c6d2e6909f9d11937997affc6a58
This CL adds a Soong build flag in Android.bp files to enable Compose code when building Launcher.
The flag is disabled by default, and it will be enabled once agreed with the System Health team. More details in go/launcher-enabling-compose-next-steps.
To turn this flag on, one simply has to `build-flag set RELEASE_ENABLE_COMPOSE_IN_LAUNCHER true` before compiling.
- When the flag is enabled, Launcher3 will use a ComposeFacade object that provides features implemented using Compose. This Facade also provides a function to check whether Compose is enabled or not.
- When the flag is disabled, Launcher3 will implement a ComposeFacade object that throws an exception if a feature using Compose is requested. Thus, it is important to always check isComposableAvailable function before requesting a Compose feature.
Bug: 346288480
Test: Builds
Flag: EXEMPT Build flag: RELEASE_ENABLE_COMPOSE_IN_LAUNCHER
Change-Id: I5f2703f74960aeb104d0386ed3ef49784ed85234