135 lines
3.4 KiB
Smali
135 lines
3.4 KiB
Smali
|
.class public Landroidx/browser/trusted/PackageIdentityUtils$Pre28Implementation;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "PackageIdentityUtils.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Landroidx/browser/trusted/PackageIdentityUtils$SignaturesCompat;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Landroidx/browser/trusted/PackageIdentityUtils;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x9
|
||
|
name = "Pre28Implementation"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public getFingerprintsForPackage(Ljava/lang/String;Landroid/content/pm/PackageManager;)Ljava/util/List;
|
||
|
.locals 3
|
||
|
.annotation build Landroid/annotation/SuppressLint;
|
||
|
value = {
|
||
|
"PackageManagerGetSignatures"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation build Landroidx/annotation/Nullable;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/lang/String;",
|
||
|
"Landroid/content/pm/PackageManager;",
|
||
|
")",
|
||
|
"Ljava/util/List<",
|
||
|
"[B>;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Throws;
|
||
|
value = {
|
||
|
Landroid/content/pm/PackageManager$NameNotFoundException;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
invoke-virtual {p2, p1, v0}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
new-instance p2, Ljava/util/ArrayList;
|
||
|
|
||
|
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
|
||
|
|
||
|
array-length v0, v0
|
||
|
|
||
|
invoke-direct {p2, v0}, Ljava/util/ArrayList;-><init>(I)V
|
||
|
|
||
|
iget-object p1, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
|
||
|
|
||
|
array-length v0, p1
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-ge v1, v0, :cond_1
|
||
|
|
||
|
aget-object v2, p1, v1
|
||
|
|
||
|
invoke-static {v2}, Landroidx/browser/trusted/PackageIdentityUtils;->getCertificateSHA256Fingerprint(Landroid/content/pm/Signature;)[B
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
if-nez v2, :cond_0
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
return-object p1
|
||
|
|
||
|
:cond_0
|
||
|
invoke-virtual {p2, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
add-int/lit8 v1, v1, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
return-object p2
|
||
|
.end method
|
||
|
|
||
|
.method public packageMatchesToken(Ljava/lang/String;Landroid/content/pm/PackageManager;Landroidx/browser/trusted/TokenContents;)Z
|
||
|
.locals 0
|
||
|
.annotation system Ldalvik/annotation/Throws;
|
||
|
value = {
|
||
|
Ljava/io/IOException;,
|
||
|
Landroid/content/pm/PackageManager$NameNotFoundException;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
invoke-virtual {p0, p1, p2}, Landroidx/browser/trusted/PackageIdentityUtils$Pre28Implementation;->getFingerprintsForPackage(Ljava/lang/String;Landroid/content/pm/PackageManager;)Ljava/util/List;
|
||
|
|
||
|
move-result-object p2
|
||
|
|
||
|
if-nez p2, :cond_0
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_0
|
||
|
invoke-static {p1, p2}, Landroidx/browser/trusted/TokenContents;->create(Ljava/lang/String;Ljava/util/List;)Landroidx/browser/trusted/TokenContents;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {p3, p1}, Landroidx/browser/trusted/TokenContents;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
.end method
|