Add a default widget category provider that uses application category.
The category provider can be customized by any launcher via resource
override. For instance, one can override it to provide custom categories
using an allowlist or use a different mechanism such as query play
services.
We still need to get proper strings for categories from UX writer.
Bug: 318410881
Test: WidgetRecommendationCategoryProviderTest
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_recommendations DEVELOPMENT
Change-Id: I5c4e0d22eaffc8254ddd54356f8c62f00e22a3c4
diff --git a/res/values/config.xml b/res/values/config.xml
index 5bdd7ebb..29c4e66 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -194,6 +194,11 @@
<string-array name="filtered_components" ></string-array>
+ <!-- Widget component names to be included in weather category of widget suggestions. -->
+ <string-array name="weather_recommendations"></string-array>
+ <!-- Widget component names to be included in fitness category of widget suggestions. -->
+ <string-array name="fitness_recommendations"></string-array>
+
<!-- Name of the class used to generate colors from the wallpaper colors. Must be implementing the LauncherAppWidgetHostView.ColorGenerator interface. -->
<string name="color_generator_class" translatable="false"/>
@@ -252,6 +257,9 @@
<!-- Used for custom widgets -->
<array name="custom_widget_providers"/>
+ <!-- Used for determining category of a widget presented in widget recommendations. -->
+ <string name="widget_recommendation_category_provider_class" translatable="false"></string>
+
<!-- Embed parameters -->
<dimen name="activity_split_ratio" format="float">0.5</dimen>
<integer name="min_width_split">720</integer>