Skip to content

Commit

Permalink
[Checkbox] Fixed NPE crash due to layer drawable's constant state iss…
Browse files Browse the repository at this point in the history
…ue in APIs < 23.

PiperOrigin-RevId: 470825166
  • Loading branch information
leticiarossi committed Aug 30, 2022
1 parent 21b74f9 commit b8e1b57
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -157,14 +157,14 @@ public static Drawable createTintableDrawableIfNeeded(
* 21, it'll still mutate the drawable.
*
* <p>Use this method instead of the above if the passed in drawable will be a child of a {@link
* LayerDrawable} in APIs < 21, its tintList may be null, and it may be mutated, in order to
* LayerDrawable} in APIs < 23, its tintList may be null, and it may be mutated, in order to
* prevent issue where the drawable may not have its constant state set up properly.
*/
@Nullable
public static Drawable createTintableMutatedDrawableIfNeeded(
@Nullable Drawable drawable, @Nullable ColorStateList tintList, @Nullable Mode tintMode) {
return createTintableMutatedDrawableIfNeeded(
drawable, tintList, tintMode, VERSION.SDK_INT < VERSION_CODES.LOLLIPOP);
drawable, tintList, tintMode, VERSION.SDK_INT < VERSION_CODES.M);
}

@Nullable
Expand Down

0 comments on commit b8e1b57

Please sign in to comment.