2019-02-04 20:08:30 +00:00
|
|
|
.class final Lcom/google/firebase/iid/ay;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
.method private static T(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyPair;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/16 v0, 0x8
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-static {p0, v0}, Landroid/util/Base64;->decode(Ljava/lang/String;I)[B
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Landroid/util/Base64;->decode(Ljava/lang/String;I)[B
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
:try_end_0
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
const-string v0, "RSA"
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/security/KeyFactory;->getInstance(Ljava/lang/String;)Ljava/security/KeyFactory;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Ljava/security/spec/X509EncodedKeySpec;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Ljava/security/spec/X509EncodedKeySpec;-><init>([B)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/security/KeyFactory;->generatePublic(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance v1, Ljava/security/spec/PKCS8EncodedKeySpec;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1}, Ljava/security/spec/PKCS8EncodedKeySpec;-><init>([B)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/security/KeyFactory;->generatePrivate(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Ljava/security/KeyPair;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/security/KeyPair;-><init>(Ljava/security/PublicKey;Ljava/security/PrivateKey;)V
|
|
|
|
:try_end_1
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/security/spec/InvalidKeySpecException; {:try_start_1 .. :try_end_1} :catch_1
|
2019-02-04 20:08:30 +00:00
|
|
|
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p0
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x13
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v0, "Invalid key stored "
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
new-instance p1, Lcom/google/firebase/iid/c;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/google/firebase/iid/c;-><init>(Ljava/lang/Exception;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
new-instance p1, Lcom/google/firebase/iid/c;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/google/firebase/iid/c;-><init>(Ljava/lang/Exception;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;Z)Lcom/google/firebase/iid/az;
|
|
|
|
.locals 8
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const-string v2, "Writing key to properties file"
|
|
|
|
|
|
|
|
invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance v0, Ljava/util/Properties;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/Properties;-><init>()V
|
|
|
|
|
|
|
|
const-string v2, "pub"
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
invoke-virtual {p2}, Lcom/google/firebase/iid/az;->lR()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/util/Properties;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const-string v2, "pri"
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
invoke-virtual {p2}, Lcom/google/firebase/iid/az;->vu()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/util/Properties;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
const-string v2, "cre"
|
|
|
|
|
2019-02-27 00:16:35 +00:00
|
|
|
iget-wide v3, p2, Lcom/google/firebase/iid/az;->aPv:J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/util/Properties;->setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, p1}, Lcom/google/firebase/iid/ay;->s(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p0}, Ljava/io/File;->createNewFile()Z
|
|
|
|
|
|
|
|
new-instance v2, Ljava/io/RandomAccessFile;
|
|
|
|
|
|
|
|
const-string v3, "rw"
|
|
|
|
|
|
|
|
invoke-direct {v2, p0, v3}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
:try_end_0
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-virtual {v2}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
:try_end_1
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_3
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_2
|
|
|
|
|
|
|
|
:try_start_2
|
|
|
|
invoke-virtual {p0}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock;
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/nio/channels/FileChannel;->size()J
|
|
|
|
|
|
|
|
move-result-wide v5
|
|
|
|
:try_end_2
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
|
|
|
|
cmp-long p3, v5, v3
|
|
|
|
|
|
|
|
if-lez p3, :cond_2
|
|
|
|
|
|
|
|
:try_start_3
|
|
|
|
invoke-virtual {p0, v3, v4}, Ljava/nio/channels/FileChannel;->position(J)Ljava/nio/channels/FileChannel;
|
|
|
|
|
|
|
|
invoke-static {p0}, Lcom/google/firebase/iid/ay;->c(Ljava/nio/channels/FileChannel;)Lcom/google/firebase/iid/az;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object p2
|
2019-02-04 20:08:30 +00:00
|
|
|
:try_end_3
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1
|
2019-02-04 20:08:30 +00:00
|
|
|
.catch Lcom/google/firebase/iid/c; {:try_start_3 .. :try_end_3} :catch_0
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_3} :catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
|
|
|
|
:try_start_4
|
|
|
|
invoke-static {p1, p0}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
:try_end_4
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_3
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:try_start_5
|
|
|
|
invoke-static {p1, v2}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/io/RandomAccessFile;)V
|
|
|
|
:try_end_5
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
return-object p2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p3
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p3
|
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
:try_start_6
|
|
|
|
const-string v5, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {v5, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
const-string v1, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-static {p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
add-int/lit8 v5, v5, 0x40
|
|
|
|
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v5, "Tried reading key pair before writing new one, but failed with: "
|
|
|
|
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v6, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-static {v1, p3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {p0, v3, v4}, Ljava/nio/channels/FileChannel;->position(J)Ljava/nio/channels/FileChannel;
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/nio/channels/Channels;->newOutputStream(Ljava/nio/channels/WritableByteChannel;)Ljava/io/OutputStream;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {v0, p3, p1}, Ljava/util/Properties;->store(Ljava/io/OutputStream;Ljava/lang/String;)V
|
|
|
|
:try_end_6
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_6 .. :try_end_6} :catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
|
|
|
|
:try_start_7
|
|
|
|
invoke-static {p1, p0}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
:try_end_7
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_7 .. :try_end_7} :catch_3
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:try_start_8
|
|
|
|
invoke-static {p1, v2}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/io/RandomAccessFile;)V
|
|
|
|
:try_end_8
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object p2
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
move-object p3, p1
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
goto :goto_1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
:try_start_9
|
|
|
|
throw p2
|
|
|
|
:try_end_9
|
|
|
|
.catchall {:try_start_9 .. :try_end_9} :catchall_1
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception p3
|
|
|
|
|
|
|
|
move-object v7, p3
|
|
|
|
|
|
|
|
move-object p3, p2
|
|
|
|
|
|
|
|
move-object p2, v7
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:goto_1
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p0, :cond_4
|
|
|
|
|
|
|
|
:try_start_a
|
|
|
|
invoke-static {p3, p0}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
throw p2
|
|
|
|
:try_end_a
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/lang/Throwable; {:try_start_a .. :try_end_a} :catch_3
|
2019-02-04 20:08:30 +00:00
|
|
|
.catchall {:try_start_a .. :try_end_a} :catchall_2
|
|
|
|
|
|
|
|
:catchall_2
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
move-object p2, p1
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
goto :goto_2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:catch_3
|
2019-02-04 20:08:30 +00:00
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
:try_start_b
|
|
|
|
throw p0
|
|
|
|
:try_end_b
|
|
|
|
.catchall {:try_start_b .. :try_end_b} :catchall_3
|
|
|
|
|
|
|
|
:catchall_3
|
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
move-object v7, p2
|
|
|
|
|
|
|
|
move-object p2, p0
|
|
|
|
|
|
|
|
move-object p0, v7
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:goto_2
|
2019-02-04 20:08:30 +00:00
|
|
|
:try_start_c
|
|
|
|
invoke-static {p2, v2}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/io/RandomAccessFile;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
:try_end_c
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_c .. :try_end_c} :catch_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:catch_4
|
2019-02-04 20:08:30 +00:00
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
const-string p2, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
|
|
|
add-int/lit8 p3, p3, 0x15
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0, p3}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string p3, "Failed to write key: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-static {p2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static a(Landroid/content/SharedPreferences;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
|
|
|
.locals 3
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "|P|"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-interface {p0, v0, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v2, "|K|"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v2}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {p0, v2, v1}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {v0, v2}, Lcom/google/firebase/iid/ay;->T(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyPair;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Lcom/google/firebase/iid/ay;->b(Landroid/content/SharedPreferences;Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide p0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0, p0, p1}, Lcom/google/firebase/iid/az;-><init>(Ljava/security/KeyPair;J)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
return-object v1
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
return-object v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const-string v0, "com.google.android.gms.appid"
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-static {p0, p1}, Lcom/google/firebase/iid/ay;->a(Landroid/content/SharedPreferences;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p2, v0}, Lcom/google/firebase/iid/az;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
:try_end_0
|
|
|
|
.catch Lcom/google/firebase/iid/c; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
:cond_0
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const-string v1, "Writing key to shared preferences"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v0, "|P|"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
invoke-virtual {p2}, Lcom/google/firebase/iid/az;->lR()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {p0, v0, v1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
const-string v0, "|K|"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
invoke-virtual {p2}, Lcom/google/firebase/iid/az;->vu()Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {p0, v0, v1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
const-string v0, "cre"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-02-27 00:16:35 +00:00
|
|
|
iget-wide v0, p2, Lcom/google/firebase/iid/az;->aPv:J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
|
|
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static synthetic a(Ljava/lang/Throwable;Ljava/io/FileInputStream;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/FileInputStream;->close()V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, p1}, Lcom/google/android/gms/internal/e/c;->a(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/FileInputStream;->close()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static synthetic a(Ljava/lang/Throwable;Ljava/io/RandomAccessFile;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->close()V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, p1}, Lcom/google/android/gms/internal/e/c;->a(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->close()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static synthetic a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {p1}, Ljava/nio/channels/FileChannel;->close()V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, p1}, Lcom/google/android/gms/internal/e/c;->a(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/nio/channels/FileChannel;->close()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
.method static aq(Landroid/content/Context;)Ljava/io/File;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-static {p0}, Landroidx/core/content/ContextCompat;->getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const-string v1, "noBackupFilesDir doesn\'t exist, using regular files directory instead"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static b(Landroid/content/SharedPreferences;Ljava/lang/String;)J
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "cre"
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/google/firebase/iid/y;->y(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-interface {p0, p1, v0}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide p0
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-wide p0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
:cond_0
|
|
|
|
const-wide/16 p0, 0x0
|
|
|
|
|
|
|
|
return-wide p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static c(Ljava/nio/channels/FileChannel;)Lcom/google/firebase/iid/az;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;,
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/Properties;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/Properties;-><init>()V
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/nio/channels/Channels;->newInputStream(Ljava/nio/channels/ReadableByteChannel;)Ljava/io/InputStream;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/Properties;->load(Ljava/io/InputStream;)V
|
|
|
|
|
|
|
|
const-string p0, "pub"
|
|
|
|
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v1, "pri"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, v1}, Lcom/google/firebase/iid/ay;->T(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyPair;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v1, "cre"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/Properties;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
new-instance v2, Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0, v0, v1}, Lcom/google/firebase/iid/az;-><init>(Ljava/security/KeyPair;J)V
|
|
|
|
|
|
|
|
return-object v2
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
new-instance v0, Lcom/google/firebase/iid/c;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/firebase/iid/c;-><init>(Ljava/lang/Exception;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Lcom/google/firebase/iid/c;
|
|
|
|
|
|
|
|
const-string v0, "Invalid properties file"
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/google/firebase/iid/c;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
.method static p(Landroid/content/Context;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 4
|
|
|
|
.annotation build Landroidx/annotation/WorkerThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lcom/google/firebase/iid/az;
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
invoke-static {}, Lcom/google/firebase/iid/b;->uZ()Ljava/security/KeyPair;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v2, v3}, Lcom/google/firebase/iid/az;-><init>(Ljava/security/KeyPair;J)V
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {p0, p1, v0, v1}, Lcom/google/firebase/iid/ay;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;Z)Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x3
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Lcom/google/firebase/iid/az;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
|
|
|
|
const-string p0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {p0, v2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
const-string p0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const-string p1, "Loaded key after generating new one, using loaded one"
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string v1, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
const-string v1, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const-string v2, "Generated new key"
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/google/firebase/iid/ay;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
.method private static r(Landroid/content/Context;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 3
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0, p1}, Lcom/google/firebase/iid/ay;->s(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/io/File;->exists()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_0
|
|
|
|
invoke-static {p0}, Lcom/google/firebase/iid/ay;->u(Ljava/io/File;)Lcom/google/firebase/iid/az;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object p0
|
2019-02-04 20:08:30 +00:00
|
|
|
:try_end_0
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Lcom/google/firebase/iid/c; {:try_start_0 .. :try_end_0} :catch_1
|
2019-02-04 20:08:30 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
return-object p0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, 0x28
|
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v1, "Failed to read key from file, retrying: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:try_start_1
|
|
|
|
invoke-static {p0}, Lcom/google/firebase/iid/ay;->u(Ljava/io/File;)Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
:try_end_1
|
2019-02-17 02:24:41 +00:00
|
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-02-17 02:24:41 +00:00
|
|
|
:catch_2
|
2019-02-04 20:08:30 +00:00
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x2d
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v0, "IID file exists, but failed to read from it: "
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "FirebaseInstanceId"
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
new-instance p1, Lcom/google/firebase/iid/c;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Lcom/google/firebase/iid/c;-><init>(Ljava/lang/Exception;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
.method private static s(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
const-string p1, "com.google.InstanceId.properties"
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_0
|
|
|
|
const-string v0, "UTF-8"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/16 v0, 0xb
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x21
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v0, "com.google.InstanceId_"
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, ".properties"
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p0}, Lcom/google/firebase/iid/ay;->aq(Landroid/content/Context;)Ljava/io/File;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static u(Ljava/io/File;)Lcom/google/firebase/iid/az;
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;,
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/FileInputStream;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
|
|
|
|
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-virtual {v0}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_2
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
const-wide v4, 0x7fffffffffffffffL
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
|
|
|
|
|
|
|
move-object v1, v7
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
invoke-virtual/range {v1 .. v6}, Ljava/nio/channels/FileChannel;->lock(JJZ)Ljava/nio/channels/FileLock;
|
|
|
|
|
|
|
|
invoke-static {v7}, Lcom/google/firebase/iid/ay;->c(Ljava/nio/channels/FileChannel;)Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
if-eqz v7, :cond_0
|
|
|
|
|
|
|
|
:try_start_2
|
|
|
|
invoke-static {p0, v7}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
:try_end_2
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-static {p0, v0}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/io/FileInputStream;)V
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
move-object v2, p0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
:try_start_3
|
|
|
|
throw v1
|
|
|
|
:try_end_3
|
|
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception v2
|
|
|
|
|
|
|
|
move-object v8, v2
|
|
|
|
|
|
|
|
move-object v2, v1
|
|
|
|
|
|
|
|
move-object v1, v8
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
|
|
|
|
:try_start_4
|
|
|
|
invoke-static {v2, v7}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/nio/channels/FileChannel;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
throw v1
|
|
|
|
:try_end_4
|
|
|
|
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_1
|
|
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_2
|
|
|
|
|
|
|
|
:catchall_2
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p0
|
|
|
|
|
|
|
|
:try_start_5
|
|
|
|
throw p0
|
|
|
|
:try_end_5
|
|
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_2
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-static {p0, v0}, Lcom/google/firebase/iid/ay;->a(Ljava/lang/Throwable;Ljava/io/FileInputStream;)V
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2019-02-04 20:32:01 +00:00
|
|
|
.method final q(Landroid/content/Context;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 4
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Lcom/google/firebase/iid/c;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {p1, p2}, Lcom/google/firebase/iid/ay;->r(Landroid/content/Context;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p1, p2, v1}, Lcom/google/firebase/iid/ay;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Lcom/google/firebase/iid/c; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
:try_start_1
|
|
|
|
const-string v2, "com.google.android.gms.appid"
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2, v3}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-static {v2, p2}, Lcom/google/firebase/iid/ay;->a(Landroid/content/SharedPreferences;Ljava/lang/String;)Lcom/google/firebase/iid/az;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
invoke-static {p1, p2, v2, v3}, Lcom/google/firebase/iid/ay;->a(Landroid/content/Context;Ljava/lang/String;Lcom/google/firebase/iid/az;Z)Lcom/google/firebase/iid/az;
|
|
|
|
:try_end_1
|
|
|
|
.catch Lcom/google/firebase/iid/c; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
|
|
|
|
return-object v2
|
|
|
|
|
|
|
|
:catch_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
move-object v1, p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
throw v1
|
|
|
|
.end method
|