Update the search widget icon if the global search provider changes.
Note that this change is necessary because the launcher might
receive the PM broadcast before the SearchManagerService does.
Change-Id: I5a03e2fb16dee232a83d24b834ef6bd0eaabe774
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java
index db3a4cb..94163ac 100644
--- a/src/com/android/launcher2/LauncherApplication.java
+++ b/src/com/android/launcher2/LauncherApplication.java
@@ -17,6 +17,7 @@
package com.android.launcher2;
import android.app.Application;
+import android.app.SearchManager;
import android.content.ContentResolver;
import android.content.Intent;
import android.content.IntentFilter;
@@ -57,6 +58,9 @@
filter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
filter.addAction(Intent.ACTION_LOCALE_CHANGED);
registerReceiver(mModel, filter);
+ filter = new IntentFilter();
+ filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
+ registerReceiver(mModel, filter);
// Register for changes to the favorites
ContentResolver resolver = getContentResolver();