diff options
| author | Alan Viverette <alanv@google.com> | 2015-04-30 15:59:20 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-30 15:59:21 +0000 |
| commit | 8310f87d96791e8b864df5e821fe65273c2dd874 (patch) | |
| tree | a064fe0a0d7f44035942cd0e6b80d6e2f0581648 /core/java/android/content/res | |
| parent | 8f72b4037022c4f860caafa296e2ac309bde177f (diff) | |
| parent | b4004dfc84b7c51519645020ea9431b051f5db62 (diff) | |
| download | frameworks_base-8310f87d96791e8b864df5e821fe65273c2dd874.zip frameworks_base-8310f87d96791e8b864df5e821fe65273c2dd874.tar.gz frameworks_base-8310f87d96791e8b864df5e821fe65273c2dd874.tar.bz2 | |
Merge "ActionBar SearchView's default hint shouldn't override SearchableInfo" into mnc-dev
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); } |
