summaryrefslogtreecommitdiff
path: root/graphics/java
diff options
context:
space:
mode:
author Nader Jawad <njawad@google.com> 2019-02-28 11:03:34 -0800
committer Nader Jawad <njawad@google.com> 2019-03-01 00:15:24 +0000
commitabe349cda9d237083277ed235d7a06825d3da29e (patch)
tree55597f8d6b6f5e3f8380705b6eab8adc2c37f776 /graphics/java
parent13952bc10c9f6a539e38246904f0cc0b0984592c (diff)
Added nullability annotations to StateListDrawable APIs
Addressing API review feedback to add nullability annotations to StateListDrawable#findStateDrawableIndex getStateDrawable and getStateSet Bug: 126699087 Bug: 126699432 Test: N/A Change-Id: I5a74ee9a9208800cd1430bc24856c0aeff77c61a
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/drawable/StateListDrawable.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/drawable/StateListDrawable.java b/graphics/java/android/graphics/drawable/StateListDrawable.java
index 2855227a1002..f67188c22609 100644
--- a/graphics/java/android/graphics/drawable/StateListDrawable.java
+++ b/graphics/java/android/graphics/drawable/StateListDrawable.java
@@ -256,7 +256,7 @@ public class StateListDrawable extends DrawableContainer {
* @see #getStateCount()
* @see #getStateDrawable(int)
*/
- public int[] getStateSet(int index) {
+ public @NonNull int[] getStateSet(int index) {
return mStateListState.mStateSets[index];
}
@@ -268,7 +268,7 @@ public class StateListDrawable extends DrawableContainer {
* @see #getStateCount()
* @see #getStateSet(int)
*/
- public Drawable getStateDrawable(int index) {
+ public @Nullable Drawable getStateDrawable(int index) {
return mStateListState.getChild(index);
}
@@ -280,7 +280,7 @@ public class StateListDrawable extends DrawableContainer {
* @see #getStateDrawable(int)
* @see #getStateSet(int)
*/
- public int findStateDrawableIndex(int[] stateSet) {
+ public int findStateDrawableIndex(@NonNull int[] stateSet) {
return mStateListState.indexOfStateSet(stateSet);
}