224 lines
5.5 KiB
Smali
224 lines
5.5 KiB
Smali
.class public final Ll5/b;
|
|
.super Ljava/lang/Object;
|
|
.source "ApplicationVersionSignature.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Ljava/lang/String; = "AppVersionSignature"
|
|
|
|
.field public static final b:Ljava/util/concurrent/ConcurrentMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/ConcurrentMap<",
|
|
"Ljava/lang/String;",
|
|
"Lu4/b;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
|
|
|
|
sput-object v0, Ll5/b;->b:Ljava/util/concurrent/ConcurrentMap;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;)Landroid/content/pm/PackageInfo;
|
|
.locals 3
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.line 1
|
|
:try_start_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "Cannot resolve info for"
|
|
|
|
.line 2
|
|
invoke-static {v1}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "AppVersionSignature"
|
|
|
|
invoke-static {v1, p0, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/pm/PackageInfo;)Ljava/lang/String;
|
|
.locals 0
|
|
.param p0 # Landroid/content/pm/PackageInfo;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 1
|
|
iget p0, p0, Landroid/content/pm/PackageInfo;->versionCode:I
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/util/UUID;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static c(Landroid/content/Context;)Lu4/b;
|
|
.locals 3
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
sget-object v1, Ll5/b;->b:Ljava/util/concurrent/ConcurrentMap;
|
|
|
|
invoke-interface {v1, v0}, Ljava/util/concurrent/ConcurrentMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lu4/b;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
.line 3
|
|
invoke-static {p0}, Ll5/b;->d(Landroid/content/Context;)Lu4/b;
|
|
|
|
move-result-object v2
|
|
|
|
.line 4
|
|
invoke-interface {v1, v0, v2}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lu4/b;
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, p0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public static d(Landroid/content/Context;)Lu4/b;
|
|
.locals 1
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-static {p0}, Ll5/b;->a(Landroid/content/Context;)Landroid/content/pm/PackageInfo;
|
|
|
|
move-result-object p0
|
|
|
|
.line 2
|
|
invoke-static {p0}, Ll5/b;->b(Landroid/content/pm/PackageInfo;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 3
|
|
new-instance v0, Ll5/e;
|
|
|
|
invoke-direct {v0, p0}, Ll5/e;-><init>(Ljava/lang/Object;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static e()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
.line 1
|
|
sget-object v0, Ll5/b;->b:Ljava/util/concurrent/ConcurrentMap;
|
|
|
|
invoke-interface {v0}, Ljava/util/concurrent/ConcurrentMap;->clear()V
|
|
|
|
return-void
|
|
.end method
|