package androidx.core.widget; import android.content.res.ColorStateList; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.widget.CompoundButton; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import java.lang.reflect.Field; /* loaded from: classes.dex */ public final class CompoundButtonCompat { private static final String TAG = "CompoundButtonCompat"; private static Field sButtonDrawableField; private static boolean sButtonDrawableFieldFetched; private CompoundButtonCompat() { } public static void setButtonTintList(@NonNull CompoundButton compoundButton, @Nullable ColorStateList colorStateList) { Api21Impl.setButtonTintList(compoundButton, colorStateList); } @Nullable public static ColorStateList getButtonTintList(@NonNull CompoundButton compoundButton) { return Api21Impl.getButtonTintList(compoundButton); } public static void setButtonTintMode(@NonNull CompoundButton compoundButton, @Nullable PorterDuff.Mode mode) { Api21Impl.setButtonTintMode(compoundButton, mode); } @Nullable public static PorterDuff.Mode getButtonTintMode(@NonNull CompoundButton compoundButton) { return Api21Impl.getButtonTintMode(compoundButton); } @Nullable public static Drawable getButtonDrawable(@NonNull CompoundButton compoundButton) { return Api23Impl.getButtonDrawable(compoundButton); } @RequiresApi(21) public static class Api21Impl { private Api21Impl() { } public static void setButtonTintList(CompoundButton compoundButton, ColorStateList colorStateList) { compoundButton.setButtonTintList(colorStateList); } public static ColorStateList getButtonTintList(CompoundButton compoundButton) { return compoundButton.getButtonTintList(); } public static void setButtonTintMode(CompoundButton compoundButton, PorterDuff.Mode mode) { compoundButton.setButtonTintMode(mode); } public static PorterDuff.Mode getButtonTintMode(CompoundButton compoundButton) { return compoundButton.getButtonTintMode(); } } @RequiresApi(23) public static class Api23Impl { private Api23Impl() { } public static Drawable getButtonDrawable(CompoundButton compoundButton) { return compoundButton.getButtonDrawable(); } } }