160 lines
4.4 KiB
Smali
160 lines
4.4 KiB
Smali
.class public Landroidx/appcompat/widget/VectorEnabledTintResources;
|
|
.super Landroid/content/res/Resources;
|
|
.source "VectorEnabledTintResources.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final MAX_SDK_WHERE_REQUIRED:I = 0x14
|
|
|
|
.field private static sCompatVectorFromResourcesEnabled:Z = false
|
|
|
|
|
|
# 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 static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/content/res/Resources;)V
|
|
.locals 2
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroid/content/res/Resources;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-virtual {p2}, Landroid/content/res/Resources;->getAssets()Landroid/content/res/AssetManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p2}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p0, v0, v1, p2}, Landroid/content/res/Resources;-><init>(Landroid/content/res/AssetManager;Landroid/util/DisplayMetrics;Landroid/content/res/Configuration;)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/VectorEnabledTintResources;->mContextRef:Ljava/lang/ref/WeakReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static isCompatVectorFromResourcesEnabled()Z
|
|
.locals 1
|
|
|
|
sget-boolean v0, Landroidx/appcompat/widget/VectorEnabledTintResources;->sCompatVectorFromResourcesEnabled:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static setCompatVectorFromResourcesEnabled(Z)V
|
|
.locals 0
|
|
|
|
sput-boolean p0, Landroidx/appcompat/widget/VectorEnabledTintResources;->sCompatVectorFromResourcesEnabled:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static shouldBeUsed()Z
|
|
.locals 2
|
|
|
|
invoke-static {}, Landroidx/appcompat/widget/VectorEnabledTintResources;->isCompatVectorFromResourcesEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x14
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/VectorEnabledTintResources;->mContextRef:Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/content/Context;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {}, Landroidx/appcompat/widget/AppCompatDrawableManager;->get()Landroidx/appcompat/widget/AppCompatDrawableManager;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0, p0, p1}, Landroidx/appcompat/widget/AppCompatDrawableManager;->onDrawableLoadedFromResources(Landroid/content/Context;Landroidx/appcompat/widget/VectorEnabledTintResources;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
invoke-super {p0, p1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method final superGetDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|