Commit Graph

18353 Commits

Author SHA1 Message Date
Anushree Ganjam a77c28cd78 Merge "Add 0-state web data loader logs" into main 2024-05-14 23:13:03 +00:00
Charlie Anderson 8aa2898a58 Merge "Fix blank pink loading icons by ensuring that cache entry won't downgrade existing icon." into main 2024-05-14 18:57:09 +00:00
Shamali Patwa 8a5eddb923 Merge changes from topic "update-strings" into main
* changes:
  Add comments on suggestion category related strings
  Clean-up unused categories (follow up cleans up strings)
2024-05-14 18:38:54 +00:00
Chris Göllner fa09b12443 Merge "Convert SysUiState flags from int to long" into main 2024-05-14 10:44:40 +00:00
Shamali P 4f492626bd Clean-up unused categories (follow up cleans up strings)
Bug: N/A
Test: Unit tests
Flag: N/A
Change-Id: Id3bd76858d731b9e0eb977c094ebd3b19e1338ce
2024-05-13 23:13:56 +00:00
Treehugger Robot 0d4567b57b Merge "Remove COLLECT_SEARCH_HISTORY" into main 2024-05-13 18:15:58 +00:00
Charlie Anderson d073ab0b39 Fix blank pink loading icons by ensuring that cache entry won't downgrade existing icon.
Bug: 326607598
Test: manually tested B&R
Flag: N/A
Change-Id: I8aac643ec5ca3162cd62bf1051cc751800c626dd
2024-05-13 13:55:15 -04:00
Andrew Cole f3fe08388c Merge "Always Return Adaptive Icon" into main 2024-05-13 16:42:35 +00:00
Chris Göllner 0cd995e4ef Convert SysUiState flags from int to long
We already reached the limit of 32 flags for an int. To be able to have
more, changing from int to long.

This is needed, as new flags have to be added.

Flag: NONE
Test: Manually running SysUI and Launcher
Test: Unit tests in CL
Bug: 335625543
Change-Id: Iec1d40218264c7c64c50fd09764aa07c0caa7787
2024-05-13 14:47:33 +01:00
Anushree Ganjam 7ca0231aa4 Add 0-state web data loader logs
Bug: 328525875
Test: Manual
Flag: Aconfig com.google.android.apps.nexuslauncher.zero_state_web_data_loader DEVELOPMENT

Change-Id: I8492bade13962587f301c4bec461af291fa394d1
2024-05-10 16:05:48 -07:00
Fengjiang Li 1db1dfcb67 Do not use PackageManagerHelper created on boot for LoaderTask.
This CL partially reverts ag/26827295.

Re-using the PackageManagerHelper obj created earlier than LoaderTask obj will lead to the bug where private space user handle is not recognized. This is a temporary fix to create a separate PackageManagerHelper obj for LoaderTask. The real fix should be on framework side.

Also note that PackageManager service instance is now created much later in launcher lifecycle than before.

Fix: 338091143
Test: manual
Flag: NONE
Change-Id: Iab467fe8979aec52c5837c8fd676f821b2e3eb3c
2024-05-10 22:49:21 +00:00
Andrew Cole 10149b6656 Always Return Adaptive Icon
As part of a cleanup for how we deal with legacy icons, we are consolidating our handling of how we wrap non-adaptive icons in an adaptive icon format. This requires adding a parameter to make these functions conform to their earlier specifications.

Bug: 318867282
Flag: None
Test: AllAppsSearchImageTest
Change-Id: I002c430646f8933c638b78a409c9766b6328838a
2024-05-10 14:04:23 -07:00
Charlie Anderson 0171058c0f Merge "add more logging around package updates and widget click handling in Launcher" into main 2024-05-10 17:19:06 +00:00
Helen Cheuk 399638ac23 Merge "Add focus outline to AppPairIcon" into main 2024-05-10 16:46:09 +00:00
Shamali Patwa 26d55c2a7e Merge "Fix NPE in WidgetsTwoPaneSheet" into main 2024-05-10 14:28:00 +00:00
Charlie Anderson 5fa4f02c70 add more logging around package updates and widget click handling in Launcher
Bug: 336976070
Test: locally verified
Flag: N/A

Change-Id: I8a1204fb6d96eccbc20b0ddd3c1e6fb1ae75fc6c
2024-05-10 10:00:51 -04:00
hyunyoungs aa0633b508 Remove COLLECT_SEARCH_HISTORY
Bug: 270391455
Test: compiles
Flag: LEGACY COLLECT_SEARCH_HISTORY DISABLED
Change-Id: If250dc6548e5572dbb34e5b7afdc50a5fa09d9af
2024-05-10 01:40:49 -07:00
Winson Chung 36f38cb028 Merge "Add multi-instance state to item infos" into main 2024-05-10 04:16:38 +00:00
Willie Koomson 2b73f89b14 Fix NPE in WidgetsTwoPaneSheet
Check if mSelectedHeader is null.

Bug: 27214675
Test: build
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I640ac0b46846b94655414788177fcc1fa52fcee8
2024-05-10 00:52:31 +00:00
Anushree Ganjam 798340dc6d Merge "Hardcode the className instead of class.getSimpleName()." into main 2024-05-09 20:13:13 +00:00
Willie Koomson 8b0469b096 Merge changes I2fd961c0,Id3d21f44 into main
* changes:
  Go to NORMAL state before adding widget with add button
  Retain add button on rotation for two-pane and bottom sheet
2024-05-09 19:04:15 +00:00
Winson Chung 94e8ad0731 Add multi-instance state to item infos
- Add legacy resource for supported multi-instance apps that
  matches the current SystemUI resource of the same name, and will
  be removed as apps migrate to the V manifest property to declare
  multi-instance support
- Load the multi-instance state from PackageManager when the db is
  first loaded or when packages are updated
- The multi-instance check is then used to determine if an app pair
  can be saved (ie. whether the action can be shown)

Bug: 323112914
Test: atest NexusLauncherTests

Change-Id: I565b4bee4ab5f7040910306b1fd60a4fc3bf9a1c
2024-05-09 18:43:38 +00:00
Willie Koomson badcf77c28 Go to NORMAL state before adding widget with add button
Updates add button behavior to go to NORMAL state before adding the
widget to the workspace. This has the effect of dismissing the All Apps
view if it is open.

This fixes an issue where the add button did not work if used from the
WidgetsBottomSheet while All Apps is open, particularly if a new screen
had to be created. See screencasts in gerrit for before/after.

Bug: 335906123
Test: manual, add widget with button from all apps > bottom sheet while
 there is no space on the launcher
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: I2fd961c09c473045088feba5d572c26a812e6619
2024-05-08 22:56:53 +00:00
Willie Koomson 245c244fed Retain add button on rotation for two-pane and bottom sheet
Reselects the WidgetCell that was selected when reloading the sheet on
rotation. WidgetsFullSheet is excluded because it does not retain the
open header on rotation.

Bug: 331429554
Test: manual, see screencast
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Id3d21f44b1dc525e144296f513f5a460fc51474c
2024-05-08 22:56:52 +00:00
Anushree Ganjam c9eda41c31 Hardcode the className instead of class.getSimpleName().
class.getSimpleName() causes issues with obfuscation.

Bug: 332171918
Test: Manual
Flag: NA
Change-Id: I5119a7ba0e4e27d8745c94df67881934fed282a4
2024-05-08 12:31:24 -07:00
helencheuk cc54eb4907 Add focus outline to AppPairIcon
Bug: 327470960
Test: Manual
Flag: ACONFIG com.android.launcher3.enable_focus_outline Trunkfood
Change-Id: I6a9c6abc3441b5f40bb4f352a844cecad4a1474b
2024-05-08 18:10:52 +01:00
Anna Zhuravleva 9f3bca37e6 Merge "Log animation jank" into main 2024-05-08 08:22:57 +00:00
Andy Wickham 48d3d47c1f Merge "Use ValueAnimator instead of property setter" into main 2024-05-08 01:25:13 +00:00
Sunny Goyal 85fe0d96cf Merge "Fixing LauncherIcons leaking outside sandbox context" into main 2024-05-07 21:42:59 +00: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
Shamali Patwa b257ac4289 Merge "Fix close animation issue during predictive back / swipe up" into main 2024-05-07 18:07:28 +00:00
Brandon Dayauon c2ce6254c3 Use ValueAnimator instead of property setter
Referencing the view by ID animates correctly. Passed in views are supposedly not the same
and therefore, not animating the correct thing. (fixes on the device that can repro issue).

Bug:339179262
Bug:299294792
Test manually verified on device that can repro:https://drive.google.com/file/d/16L4wEroGEDsp_BIkmoARg9vR43upF6_8/view?usp=sharing
Flag: aconfig com.android.launcher3.enable_private_space nextfood

Change-Id: I20b06cc50928c35afa3dc1e8800b3a5bff0769be
2024-05-07 10:30:18 -07:00
Schneider Victor-tulias c6c8a22daf Merge "Add debug logs for b/319168409" into main 2024-05-07 13:56:56 +00:00
Shamali P ac5c6c775b Fix close animation issue during predictive back / swipe up
Bug: 333714698
Test: Manual
Flag: N/A
Change-Id: I07859bc0a3783356cc27358bb23a0d6555aa1492
2024-05-07 13:47:24 +00:00
Shamali Patwa 4f8ef8f54b Merge "Readjust the available size for the recommendations in 2-pane sheet" into main 2024-05-06 22:53:19 +00:00
Brandon Dayauon 9fa457e876 Merge "Update private space animation timings" into main 2024-05-06 18:15:05 +00:00
Schneider Victor-tulias 8288819aa6 Add debug logs for b/319168409
Flag: N/A
Bug: 319168409
Test: TaplDragTest#testDragAppIcon

Change-Id: I96d26cc78af0a3f4145fc3486c4b6adfbd110c9e
2024-05-06 16:22:03 +00:00
Shamali P c0e4dcf238 Readjust the available size for the recommendations in 2-pane sheet
Now that we exclude the space taken by size string and description,
offsetting the size provided to the recommendation table to keep the
widgets within non-scrollable view as much possible.

Bug: N/A
Test: Screenshot
Flag: N/A

Change-Id: I0193cd1ba5de0b0ff98dab9aeb352264afd3ff3a
2024-05-06 15:50:42 +00: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
Holly Jiuyu Sun 6b85675657 Merge "[reset] Clean up ActivityAllAppsContainerView#reset." into main 2024-05-03 00:49:26 +00:00
Anushree Ganjam c1adbe3b4b Merge "Revert "When AllAppsSearchBarController's mInput edit text focus is false, we should hidekeyboard."" into main 2024-05-03 00:34:32 +00:00
Willie Koomson a6f1bd55d4 Merge changes from topic "update-widget-font" into main
* changes:
  Fix resize frame corner radius for widgets added with button
  Hide add button text if cell is too narrow
  Update font settings to match POR
2024-05-02 23:07:40 +00:00
Holly Sun d7b532afcb [reset] Clean up ActivityAllAppsContainerView#reset.
Digged into the history of this part, some code is duplicated and thus removed. See https://docs.google.com/document/d/1mp1HwLhkLE_o0o_InhntFz3oIGsg94b9XucAal0IgOE/edit?tab=t.0#bookmark=id.130cyqeojzrk

ag/24198780 introduced the `MAIN_EXECUTOR.getHandler().post` part, which is still needed for logging purpose.

Bug: 328505782
Test: manual
Flag: NA
Change-Id: Ie7622c497b803f722fd734d30c4c3d9692d152c6
2024-05-02 15:38:49 -07:00
Anushree Ganjam bc2acdaf5c Revert "When AllAppsSearchBarController's mInput edit text focus is false, we should hidekeyboard."
This reverts commit d169cb3667.

Reason for revert: Probably causes jank regression. See b/336280300 for details.

Bug: b/336280300

Change-Id: I82918a33b04c58f0778d584d57e418d7dbb1e672
2024-05-02 22:29:15 +00:00
Willie Koomson 14c321de31 Fix resize frame corner radius for widgets added with button
Before this CL, the resize frame showed a mismatched corner radius
for widgets that have a non-default corner radius, when using the
add button. This is because widgets added with the button may not have
had `onLayout` called before the resize frame is set up.

This change adds a layout listener to the widget view, so that the frame
can set its corner radius once the view has been laid out.

Bug: none
Test: manual test
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Ia9c37ae595be48e4ecab7930e17efca9a27ed05d
2024-05-02 19:55:41 +00:00
Willie Koomson 1156e8419a Hide add button text if cell is too narrow
If the WidgetCell is not wide enough, hide the add button text and show
an icon-only plus button.

Bug: 333735974
Test: manual
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add NEXTFOOD
Change-Id: Ieb0b2e679bd4a5785a0f7f01e177ad412a355ce7
2024-05-02 19:55:41 +00:00
Willie Koomson 61dc97ecb2 Update font settings to match POR
Updates font color, size, weight, and line height for text in the widget
picker to match POR and pass a11y test.

Bug: 317948371
Flag: NONE
Test: Accessibility Scanner contrast test
Change-Id: I3c7676c507b81a616876206681972ebb9fefd0c3
2024-05-02 19:55:33 +00:00
Treehugger Robot 03cd176277 Merge "Add support for animating non-running tasks" into main 2024-05-02 18:24:56 +00:00
Sunny Goyal 93221e00a5 Merge "Converting ModelTask to an interface instead of an abstract class" into main 2024-05-02 17:41:09 +00:00