From b4004dfc84b7c51519645020ea9431b051f5db62 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 29 Apr 2015 16:55:42 -0700 Subject: 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 --- core/java/android/content/res/Resources.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'core/java/android/content/res') 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); } -- cgit v1.1