granularity level: instruction
.class public Landroidx/core/widget/ImageViewCompat;
.super Ljava/lang/Object;
.source "ImageViewCompat.java"
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getImageTintList(Landroid/widget/ImageView;)Landroid/content/res/ColorStateList;
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintList()Landroid/content/res/ColorStateList;
move-result-object p0
return-object p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
invoke-interface {p0}, Landroidx/core/widget/TintableImageSourceView;->getSupportImageTintList()Landroid/content/res/ColorStateList;
move-result-object p0
goto :goto_0
:cond_1
const/4 p0, 0x0
:goto_0
return-object p0
.end method
.method public static getImageTintMode(Landroid/widget/ImageView;)Landroid/graphics/PorterDuff$Mode;
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_0
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintMode()Landroid/graphics/PorterDuff$Mode;
move-result-object p0
return-object p0
:cond_0
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
if-eqz v0, :cond_1
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
invoke-interface {p0}, Landroidx/core/widget/TintableImageSourceView;->getSupportImageTintMode()Landroid/graphics/PorterDuff$Mode;
move-result-object p0
goto :goto_0
:cond_1
const/4 p0, 0x0
:goto_0
return-object p0
.end method
.method public static setImageTintList(Landroid/widget/ImageView;Landroid/content/res/ColorStateList;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_1
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageTintList(Landroid/content/res/ColorStateList;)V
sget p1, Landroid/os/Build$VERSION;->SDK_INT:I
if-ne p1, v1, :cond_2
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object p1
if-eqz p1, :cond_2
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintList()Landroid/content/res/ColorStateList;
move-result-object v0
if-eqz v0, :cond_2
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawableState()[I
move-result-object v0
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
:cond_0
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
:cond_1
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
if-eqz v0, :cond_2
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
invoke-interface {p0, p1}, Landroidx/core/widget/TintableImageSourceView;->setSupportImageTintList(Landroid/content/res/ColorStateList;)V
:cond_2
:goto_0
return-void
.end method
.method public static setImageTintMode(Landroid/widget/ImageView;Landroid/graphics/PorterDuff$Mode;)V
.locals 2
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_1
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageTintMode(Landroid/graphics/PorterDuff$Mode;)V
sget p1, Landroid/os/Build$VERSION;->SDK_INT:I
if-ne p1, v1, :cond_2
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
move-result-object p1
if-eqz p1, :cond_2
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintList()Landroid/content/res/ColorStateList;
move-result-object v0
if-eqz v0, :cond_2
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawableState()[I
move-result-object v0
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
:cond_0
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
:cond_1
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
if-eqz v0, :cond_2
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
invoke-interface {p0, p1}, Landroidx/core/widget/TintableImageSourceView;->setSupportImageTintMode(Landroid/graphics/PorterDuff$Mode;)V
:cond_2
:goto_0
return-void
.end method