diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-01 08:51:31 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-01 08:51:31 -0700 |
commit | 50d87fbd691a59759d5bbe12284d322f9fa967dd (patch) | |
tree | 369668e4cbd3c38e3a7366d44d8ecc0f4c1e80e3 /core | |
parent | c56096fe1fe3486102079f06ca5de3e2bef12e47 (diff) | |
parent | 735b333bf6d297700718afd669e1c9e374d0c6e6 (diff) | |
download | frameworks_base-50d87fbd691a59759d5bbe12284d322f9fa967dd.zip frameworks_base-50d87fbd691a59759d5bbe12284d322f9fa967dd.tar.gz frameworks_base-50d87fbd691a59759d5bbe12284d322f9fa967dd.tar.bz2 |
Merge change 5879 into donut
* changes:
Represent new searchSettingsDescription attribute on searchables in SearchableInfo.
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/server/search/SearchableInfo.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/java/android/server/search/SearchableInfo.java b/core/java/android/server/search/SearchableInfo.java index 90dfa0b..8ef1f15 100644 --- a/core/java/android/server/search/SearchableInfo.java +++ b/core/java/android/server/search/SearchableInfo.java @@ -67,6 +67,7 @@ public final class SearchableInfo implements Parcelable { private final int mSearchImeOptions; private final boolean mIncludeInGlobalSearch; private final boolean mQueryAfterZeroResults; + private final String mSettingsDescription; private final String mSuggestAuthority; private final String mSuggestPath; private final String mSuggestSelection; @@ -134,6 +135,14 @@ public final class SearchableInfo implements Parcelable { public boolean shouldRewriteQueryFromText() { return 0 != (mSearchMode & SEARCH_MODE_QUERY_REWRITE_FROM_TEXT); } + + /** + * Gets the description to use for this source in system search settings, or null if + * none has been specified. + */ + public String getSettingsDescription() { + return mSettingsDescription; + } /** * Retrieve the path for obtaining search suggestions. @@ -280,6 +289,8 @@ public final class SearchableInfo implements Parcelable { mQueryAfterZeroResults = a.getBoolean( com.android.internal.R.styleable.Searchable_queryAfterZeroResults, false); + mSettingsDescription = a.getString( + com.android.internal.R.styleable.Searchable_searchSettingsDescription); mSuggestAuthority = a.getString( com.android.internal.R.styleable.Searchable_searchSuggestAuthority); mSuggestPath = a.getString( @@ -448,6 +459,7 @@ public final class SearchableInfo implements Parcelable { + ",suggestAuthority=" + searchable.getSuggestAuthority() + ",target=" + searchable.getSearchActivity().getClassName() + ",global=" + searchable.shouldIncludeInGlobalSearch() + + ",settingsDescription=" + searchable.getSettingsDescription() + ",threshold=" + searchable.getSuggestThreshold()); } else { Log.d(LOG_TAG, "Checked " + activityInfo.name + ", no searchable meta-data"); @@ -686,7 +698,8 @@ public final class SearchableInfo implements Parcelable { mSearchImeOptions = in.readInt(); mIncludeInGlobalSearch = in.readInt() != 0; mQueryAfterZeroResults = in.readInt() != 0; - + + mSettingsDescription = in.readString(); mSuggestAuthority = in.readString(); mSuggestPath = in.readString(); mSuggestSelection = in.readString(); @@ -723,6 +736,7 @@ public final class SearchableInfo implements Parcelable { dest.writeInt(mIncludeInGlobalSearch ? 1 : 0); dest.writeInt(mQueryAfterZeroResults ? 1 : 0); + dest.writeString(mSettingsDescription); dest.writeString(mSuggestAuthority); dest.writeString(mSuggestPath); dest.writeString(mSuggestSelection); |