summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher3/Utilities.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index bd9a60882..b51ef168a 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -532,14 +532,9 @@ public final class Utilities {
*/
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public static AppWidgetProviderInfo getSearchWidgetProvider(Context context) {
- ComponentName searchComponent = null;
- try {
- Intent assistIntent = new Intent(Intent.ACTION_ASSIST);
- searchComponent = assistIntent.resolveActivity(context.getPackageManager());
- } catch (Exception e) {
- Log.e(TAG, "Exception in resolveSearchAppWidget: " + e);
- }
-
+ SearchManager searchManager =
+ (SearchManager) context.getSystemService(Context.SEARCH_SERVICE);
+ ComponentName searchComponent = searchManager.getGlobalSearchActivity();
if (searchComponent == null) return null;
String providerPkg = searchComponent.getPackageName();