diff options
author | Tor Norbye <tnorbye@google.com> | 2013-05-30 16:48:33 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2015-02-18 07:49:03 -0800 |
commit | 7b9c912f536925ac6ec43935d6e97506851b33d6 (patch) | |
tree | 8dd71557e2555fde0d506ef77c46dc29184e91c4 /core/java/android/app/Fragment.java | |
parent | 44bc07d8740058398d4009615681120168673dd8 (diff) | |
download | frameworks_base-7b9c912f536925ac6ec43935d6e97506851b33d6.zip frameworks_base-7b9c912f536925ac6ec43935d6e97506851b33d6.tar.gz frameworks_base-7b9c912f536925ac6ec43935d6e97506851b33d6.tar.bz2 |
Add @ResourceInt annotations on APIs
Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
Diffstat (limited to 'core/java/android/app/Fragment.java')
-rw-r--r-- | core/java/android/app/Fragment.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index f319309..c5f534c 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -18,6 +18,7 @@ package android.app; import android.animation.Animator; import android.annotation.Nullable; +import android.annotation.StringRes; import android.content.ComponentCallbacks2; import android.content.Context; import android.content.Intent; @@ -795,7 +796,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene * * @param resId Resource id for the CharSequence text */ - public final CharSequence getText(int resId) { + public final CharSequence getText(@StringRes int resId) { return getResources().getText(resId); } @@ -805,7 +806,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene * * @param resId Resource id for the string */ - public final String getString(int resId) { + public final String getString(@StringRes int resId) { return getResources().getString(resId); } @@ -818,7 +819,7 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene * @param formatArgs The format arguments that will be used for substitution. */ - public final String getString(int resId, Object... formatArgs) { + public final String getString(@StringRes int resId, Object... formatArgs) { return getResources().getString(resId, formatArgs); } |