diff options
| author | Alan Viverette <alanv@google.com> | 2015-04-29 16:55:42 -0700 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2015-04-29 16:55:42 -0700 |
| commit | b4004dfc84b7c51519645020ea9431b051f5db62 (patch) | |
| tree | d5042af055f64c0ab121140b9ee642bbb518f7f7 /core/java/android/content/res | |
| parent | 0e0c9d9392e4b4580939632ca4e74f2073e59290 (diff) | |
| download | frameworks_base-b4004dfc84b7c51519645020ea9431b051f5db62.zip frameworks_base-b4004dfc84b7c51519645020ea9431b051f5db62.tar.gz frameworks_base-b4004dfc84b7c51519645020ea9431b051f5db62.tar.bz2 | |
ActionBar SearchView's default hint shouldn't override SearchableInfo
Moves the queryHint to defaultQueryHint, specifies the override order
as queryHint > SearchableInfo > defaultQueryHint.
Cleans up annotations and comments for several related methods.
Bug: 20614122
Change-Id: Ib58ec309e6814cd512df147d789ec0cd546018af
Diffstat (limited to 'core/java/android/content/res')
| -rw-r--r-- | core/java/android/content/res/Resources.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index 334d180..6e77e33 100644 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -393,10 +393,11 @@ public class Resources { * @throws NotFoundException Throws NotFoundException if the given ID does not exist. * * @return String The string data associated with the resource, - * stripped of styled text information. + * stripped of styled text information. */ + @NonNull public String getString(@StringRes int id) throws NotFoundException { - CharSequence res = getText(id); + final CharSequence res = getText(id); if (res != null) { return res.toString(); } @@ -421,11 +422,11 @@ public class Resources { * @throws NotFoundException Throws NotFoundException if the given ID does not exist. * * @return String The string data associated with the resource, - * stripped of styled text information. + * stripped of styled text information. */ - public String getString(@StringRes int id, Object... formatArgs) - throws NotFoundException { - String raw = getString(id); + @NonNull + public String getString(@StringRes int id, Object... formatArgs) throws NotFoundException { + final String raw = getString(id); return String.format(mConfiguration.locale, raw, formatArgs); } |
