summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/res
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-04-30 15:59:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-30 15:59:21 +0000
commit8310f87d96791e8b864df5e821fe65273c2dd874 (patch)
treea064fe0a0d7f44035942cd0e6b80d6e2f0581648 /core/java/android/content/res
parent8f72b4037022c4f860caafa296e2ac309bde177f (diff)
parentb4004dfc84b7c51519645020ea9431b051f5db62 (diff)
downloadframeworks_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.java13
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);
}