diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-05-26 16:05:17 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-05-27 18:23:29 -0700 |
commit | da4fe1a6244457f144e0a331cada3ada17157809 (patch) | |
tree | 71a921324999c5c61598d08b1de864c426c8bc8e /src/com/android/launcher3/Utilities.java | |
parent | c54c701a94e213503d0c6d2ff414e91a50c14133 (diff) | |
download | android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.tar.gz android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.tar.bz2 android_packages_apps_Trebuchet-da4fe1a6244457f144e0a331cada3ada17157809.zip |
Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).
Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index c9d8cce84..4aaa02fd3 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -18,10 +18,7 @@ package com.android.launcher3; import android.annotation.TargetApi; import android.app.Activity; -import android.app.SearchManager; import android.app.WallpaperManager; -import android.appwidget.AppWidgetManager; -import android.appwidget.AppWidgetProviderInfo; import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Context; @@ -603,39 +600,6 @@ public final class Utilities { } /** - * Returns a widget with category {@link AppWidgetProviderInfo#WIDGET_CATEGORY_SEARCHBOX} - * provided by the same package which is set to be global search activity. - * If widgetCategory is not supported, or no such widget is found, returns the first widget - * provided by the package. - */ - @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) - public static AppWidgetProviderInfo getSearchWidgetProvider(Context context) { - SearchManager searchManager = - (SearchManager) context.getSystemService(Context.SEARCH_SERVICE); - ComponentName searchComponent = searchManager.getGlobalSearchActivity(); - if (searchComponent == null) return null; - String providerPkg = searchComponent.getPackageName(); - - AppWidgetProviderInfo defaultWidgetForSearchPackage = null; - - AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); - for (AppWidgetProviderInfo info : appWidgetManager.getInstalledProviders()) { - if (info.provider.getPackageName().equals(providerPkg)) { - if (ATLEAST_JB_MR1) { - if ((info.widgetCategory & AppWidgetProviderInfo.WIDGET_CATEGORY_SEARCHBOX) != 0) { - return info; - } else if (defaultWidgetForSearchPackage == null) { - defaultWidgetForSearchPackage = info; - } - } else { - return info; - } - } - } - return defaultWidgetForSearchPackage; - } - - /** * Compresses the bitmap to a byte array for serialization. */ public static byte[] flattenBitmap(Bitmap bitmap) { |