apkfuckery/com.discord/smali/androidx/appcompat/widget/TintResources.smali

68 lines
2 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class Landroidx/appcompat/widget/TintResources;
.super Landroidx/appcompat/widget/ResourcesWrapper;
.source "TintResources.java"
# instance fields
.field private final mContextRef:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Landroid/content/Context;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/content/res/Resources;)V
.locals 0
invoke-direct {p0, p2}, Landroidx/appcompat/widget/ResourcesWrapper;-><init>(Landroid/content/res/Resources;)V
new-instance p2, Ljava/lang/ref/WeakReference;
invoke-direct {p2, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object p2, p0, Landroidx/appcompat/widget/TintResources;->mContextRef:Ljava/lang/ref/WeakReference;
return-void
.end method
# virtual methods
.method public getDrawable(I)Landroid/graphics/drawable/Drawable;
2019-11-15 02:21:15 +00:00
.locals 3
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Throws;
value = {
Landroid/content/res/Resources$NotFoundException;
}
.end annotation
invoke-super {p0, p1}, Landroidx/appcompat/widget/ResourcesWrapper;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v0
iget-object v1, p0, Landroidx/appcompat/widget/TintResources;->mContextRef:Ljava/lang/ref/WeakReference;
invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/content/Context;
if-eqz v0, :cond_0
if-eqz v1, :cond_0
2019-11-15 02:21:15 +00:00
invoke-static {}, Landroidx/appcompat/widget/ResourceManagerInternal;->get()Landroidx/appcompat/widget/ResourceManagerInternal;
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
move-result-object v2
invoke-virtual {v2, v1, p1, v0}, Landroidx/appcompat/widget/ResourceManagerInternal;->tintDrawableUsingColorFilter(Landroid/content/Context;ILandroid/graphics/drawable/Drawable;)Z
2019-07-24 11:27:29 +00:00
:cond_0
return-object v0
.end method