summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2015-02-18 17:26:22 -0800
committerAdam Cohen <adamcohen@google.com>2015-02-18 17:30:15 -0800
commit87cf88393cedb66633bbcf51c283d525ef88932f (patch)
tree218ff09ecfda750a4675f628bc8683e806e0810b /src
parent7034f1467dfa1b4e3e1acccb5af086d32e498fa6 (diff)
downloadandroid_packages_apps_Trebuchet-87cf88393cedb66633bbcf51c283d525ef88932f.tar.gz
android_packages_apps_Trebuchet-87cf88393cedb66633bbcf51c283d525ef88932f.tar.bz2
android_packages_apps_Trebuchet-87cf88393cedb66633bbcf51c283d525ef88932f.zip
Mark WIDGET_CATEGORY_HOME and WIDGET_CATEGORY_SEARCHBOX on the search widget
Bug 17334589 Change-Id: I0e14381cfc19822451e68eb7f070d94525e126c3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 61915b755..0fb8f4df1 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3910,8 +3910,11 @@ public class Launcher extends Activity
}
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);