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
This commit is contained in:
Narayan Kamath
2011-06-28 13:46:59 +01:00
parent 234c4cd544
commit cb1a477868
3 changed files with 17 additions and 1 deletions

View File

@@ -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 @@ public class LauncherApplication extends Application {
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();