diff options
author | Bjorn Bringert <bringert@android.com> | 2009-05-05 14:06:35 +0100 |
---|---|---|
committer | Bjorn Bringert <bringert@android.com> | 2009-05-06 13:54:42 +0100 |
commit | a92041306e4d73baa10fb711fb905b9590f06b26 (patch) | |
tree | f8259eb5beeedb157e71dbe0d75c3bcce51e5929 /core/java/android/server/search/Searchables.java | |
parent | d2b124f97c52c566b68aff9fa58306f461686af0 (diff) | |
download | frameworks_base-a92041306e4d73baa10fb711fb905b9590f06b26.zip frameworks_base-a92041306e4d73baa10fb711fb905b9590f06b26.tar.gz frameworks_base-a92041306e4d73baa10fb711fb905b9590f06b26.tar.bz2 |
Refactor SearchableInfo.
- Removes the mSearchable field which was only
for communication between the constructor and
getActivityMetaData().
- Removes the badge and query rewriting fields,
since their values can be efficiently computed
on the fly.
- Makes all the other public fields private and adds getters
for them.
- Makes all fields final, except mActionKeys.
- Removes the DBG_INHIBIT_SUGGESTIONS_CONSTANT.
I don't see why we would every want that, and it
complicated making the fields final.
- Makes all fields in ActionKeyInfo final.
- Makes all fields in ActionKeyInfo private and adds getters.
- Removes the use of ActioKeyInfo.mKeyCode for failure
signalling. Uses IllegalArgumentException instead.
- Replaces the ad hoc linked list for looking up
action keys by a HashMap. This is needed to
make the fields in ActionkeyInfo final, and also avoids O(N)
lookup in the (unlikely) case that an activity
has lots of action keys.
- Don't throw exceptions when reading searchable
meta-data, since that could crash SearchManagerService.
- Adds debug logging.
Diffstat (limited to 'core/java/android/server/search/Searchables.java')
-rw-r--r-- | core/java/android/server/search/Searchables.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/server/search/Searchables.java b/core/java/android/server/search/Searchables.java index 40d7449..9586d56 100644 --- a/core/java/android/server/search/Searchables.java +++ b/core/java/android/server/search/Searchables.java @@ -210,7 +210,7 @@ public class Searchables { SearchableInfo searchable = SearchableInfo.getActivityMetaData(mContext, ai); if (searchable != null) { newSearchablesList.add(searchable); - newSearchablesMap.put(searchable.mSearchActivity, searchable); + newSearchablesMap.put(searchable.getSearchActivity(), searchable); if (searchable.shouldIncludeInGlobalSearch()) { newSearchablesInGlobalSearchList.add(searchable); } |