Merge "Mark WIDGET_CATEGORY_HOME and WIDGET_CATEGORY_SEARCHBOX on the search widget" into ub-launcher3-master
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 58b0854..7445b8c 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3966,8 +3966,11 @@
}
Bundle opts = new Bundle();
+ // We indicate that this widget is both acting as a search box affordance as well
+ // as being present on the home screen.
opts.putInt(AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY,
- AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX);
+ AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX |
+ AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
SharedPreferences sp = getSharedPreferences(
LauncherAppState.getSharedPreferencesKey(), MODE_PRIVATE);