Loading core/java/android/preference/PreferenceFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.preference; import android.annotation.Nullable; import android.annotation.XmlRes; import android.app.Activity; import android.app.Fragment; import android.content.Intent; Loading Loading @@ -294,7 +295,7 @@ public abstract class PreferenceFragment extends Fragment implements * * @param preferencesResId The XML resource ID to inflate. */ public void addPreferencesFromResource(int preferencesResId) { public void addPreferencesFromResource(@XmlRes int preferencesResId) { requirePreferenceManager(); setPreferenceScreen(mPreferenceManager.inflateFromResource(getActivity(), Loading core/java/android/speech/tts/TextToSpeech.java +1 −1 Original line number Diff line number Diff line Loading @@ -918,7 +918,7 @@ public class TextToSpeech { * * @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}. */ public int addSpeech(CharSequence text, String packagename, int resourceId) { public int addSpeech(CharSequence text, String packagename, @RawRes int resourceId) { synchronized (mStartLock) { mUtterances.put(text, makeResourceUri(packagename, resourceId)); return SUCCESS; Loading core/java/android/view/ContextThemeWrapper.java +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.annotation.StyleRes; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Configuration; Loading @@ -36,7 +37,7 @@ public class ContextThemeWrapper extends ContextWrapper { super(null); } public ContextThemeWrapper(Context base, int themeResId) { public ContextThemeWrapper(Context base, @StyleRes int themeResId) { super(base); mThemeResource = themeResId; } Loading core/java/android/view/View.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.DrawableRes; import android.annotation.FloatRange; import android.annotation.IdRes; import android.annotation.IntDef; import android.annotation.LayoutRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Size; Loading Loading @@ -18614,7 +18615,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * layout_* parameters. * @see LayoutInflater */ public static View inflate(Context context, int resource, ViewGroup root) { public static View inflate(Context context, @LayoutRes int resource, ViewGroup root) { LayoutInflater factory = LayoutInflater.from(context); return factory.inflate(resource, root); } core/java/android/view/Window.java +2 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.IdRes; import android.annotation.LayoutRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StyleRes; import android.annotation.SystemApi; import android.content.Context; import android.content.res.Configuration; Loading Loading @@ -738,7 +739,7 @@ public abstract class Window { * 0 here will override the animations the window would * normally retrieve from its theme. */ public void setWindowAnimations(int resId) { public void setWindowAnimations(@StyleRes int resId) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.windowAnimations = resId; dispatchWindowAttributesChanged(attrs); Loading Loading
core/java/android/preference/PreferenceFragment.java +2 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.preference; import android.annotation.Nullable; import android.annotation.XmlRes; import android.app.Activity; import android.app.Fragment; import android.content.Intent; Loading Loading @@ -294,7 +295,7 @@ public abstract class PreferenceFragment extends Fragment implements * * @param preferencesResId The XML resource ID to inflate. */ public void addPreferencesFromResource(int preferencesResId) { public void addPreferencesFromResource(@XmlRes int preferencesResId) { requirePreferenceManager(); setPreferenceScreen(mPreferenceManager.inflateFromResource(getActivity(), Loading
core/java/android/speech/tts/TextToSpeech.java +1 −1 Original line number Diff line number Diff line Loading @@ -918,7 +918,7 @@ public class TextToSpeech { * * @return Code indicating success or failure. See {@link #ERROR} and {@link #SUCCESS}. */ public int addSpeech(CharSequence text, String packagename, int resourceId) { public int addSpeech(CharSequence text, String packagename, @RawRes int resourceId) { synchronized (mStartLock) { mUtterances.put(text, makeResourceUri(packagename, resourceId)); return SUCCESS; Loading
core/java/android/view/ContextThemeWrapper.java +2 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.view; import android.annotation.StyleRes; import android.content.Context; import android.content.ContextWrapper; import android.content.res.Configuration; Loading @@ -36,7 +37,7 @@ public class ContextThemeWrapper extends ContextWrapper { super(null); } public ContextThemeWrapper(Context base, int themeResId) { public ContextThemeWrapper(Context base, @StyleRes int themeResId) { super(base); mThemeResource = themeResId; } Loading
core/java/android/view/View.java +2 −1 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.DrawableRes; import android.annotation.FloatRange; import android.annotation.IdRes; import android.annotation.IntDef; import android.annotation.LayoutRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Size; Loading Loading @@ -18614,7 +18615,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * layout_* parameters. * @see LayoutInflater */ public static View inflate(Context context, int resource, ViewGroup root) { public static View inflate(Context context, @LayoutRes int resource, ViewGroup root) { LayoutInflater factory = LayoutInflater.from(context); return factory.inflate(resource, root); }
core/java/android/view/Window.java +2 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.IdRes; import android.annotation.LayoutRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StyleRes; import android.annotation.SystemApi; import android.content.Context; import android.content.res.Configuration; Loading Loading @@ -738,7 +739,7 @@ public abstract class Window { * 0 here will override the animations the window would * normally retrieve from its theme. */ public void setWindowAnimations(int resId) { public void setWindowAnimations(@StyleRes int resId) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.windowAnimations = resId; dispatchWindowAttributesChanged(attrs); Loading