diff options
author | Satish Sampath <satish@android.com> | 2009-05-15 21:47:07 +0100 |
---|---|---|
committer | Satish Sampath <satish@android.com> | 2009-05-15 22:00:07 +0100 |
commit | cbd8a246f86704fb348247245904a9f114f11280 (patch) | |
tree | fd3e00a40b034fdc3db6ce31711d972878e0ba90 /core | |
parent | eae850cefe7e149f396c9e8ca1f34ec02b20a3f0 (diff) | |
download | frameworks_base-cbd8a246f86704fb348247245904a9f114f11280.zip frameworks_base-cbd8a246f86704fb348247245904a9f114f11280.tar.gz frameworks_base-cbd8a246f86704fb348247245904a9f114f11280.tar.bz2 |
Additional logging in buildSearchableList().
It is useful to know when the system could not find a unique global search provider, either due to clash of priority values or other reasons.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/server/search/Searchables.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/java/android/server/search/Searchables.java b/core/java/android/server/search/Searchables.java index 9586d56..62631d6 100644 --- a/core/java/android/server/search/Searchables.java +++ b/core/java/android/server/search/Searchables.java @@ -24,6 +24,7 @@ import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; +import android.util.Log; import java.util.ArrayList; import java.util.HashMap; @@ -34,6 +35,8 @@ import java.util.List; */ public class Searchables { + private static final String LOG_TAG = "Searchables"; + // static strings used for XML lookups, etc. // TODO how should these be documented for the developer, in a more structured way than // the current long wordy javadoc in SearchManager.java ? @@ -184,7 +187,6 @@ public class Searchables { * TODO: sort the list somehow? UI choice. */ public void buildSearchableList() { - // These will become the new values at the end of the method HashMap<ComponentName, SearchableInfo> newSearchablesMap = new HashMap<ComponentName, SearchableInfo>(); @@ -223,6 +225,11 @@ public class Searchables { ComponentName globalSearchActivity = globalSearchIntent.resolveActivity(pm); SearchableInfo newDefaultSearchable = newSearchablesMap.get(globalSearchActivity); + if (newDefaultSearchable == null) { + Log.w(LOG_TAG, "No searchable info found for new default searchable activity " + + globalSearchActivity); + } + // Store a consistent set of new values synchronized (this) { mSearchablesMap = newSearchablesMap; |