2019-02-04 20:08:30 +00:00
|
|
|
.class public Landroidx/core/widget/ImageViewCompat;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "ImageViewCompat.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.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
|
|
|
|
.param p0 # Landroid/widget/ImageView;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static getImageTintMode(Landroid/widget/ImageView;)Landroid/graphics/PorterDuff$Mode;
|
|
|
|
.locals 2
|
|
|
|
.param p0 # Landroid/widget/ImageView;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setImageTintList(Landroid/widget/ImageView;Landroid/content/res/ColorStateList;)V
|
|
|
|
.locals 2
|
|
|
|
.param p0 # Landroid/widget/ImageView;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/content/res/ColorStateList;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x15
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_3
|
|
|
|
|
|
|
|
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_4
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintList()Landroid/content/res/ColorStateList;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintMode()Landroid/graphics/PorterDuff$Mode;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawableState()[I
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
|
|
|
|
|
|
|
|
invoke-interface {p0, p1}, Landroidx/core/widget/TintableImageSourceView;->setSupportImageTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static setImageTintMode(Landroid/widget/ImageView;Landroid/graphics/PorterDuff$Mode;)V
|
|
|
|
.locals 2
|
|
|
|
.param p0 # Landroid/widget/ImageView;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/graphics/PorterDuff$Mode;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x15
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_3
|
|
|
|
|
|
|
|
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_4
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintList()Landroid/content/res/ColorStateList;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getImageTintMode()Landroid/graphics/PorterDuff$Mode;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/drawable/Drawable;->isStateful()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/ImageView;->getDrawableState()[I
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/graphics/drawable/Drawable;->setState([I)Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
instance-of v0, p0, Landroidx/core/widget/TintableImageSourceView;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
check-cast p0, Landroidx/core/widget/TintableImageSourceView;
|
|
|
|
|
|
|
|
invoke-interface {p0, p1}, Landroidx/core/widget/TintableImageSourceView;->setSupportImageTintMode(Landroid/graphics/PorterDuff$Mode;)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-void
|
|
|
|
.end method
|