256 lines
6 KiB
Smali
256 lines
6 KiB
Smali
.class final Lcom/google/firebase/messaging/m;
|
|
.super Ljava/lang/Object;
|
|
.source "com.google.firebase:firebase-messaging@@20.0.0"
|
|
|
|
# interfaces
|
|
.implements Ljava/io/Closeable;
|
|
|
|
|
|
# instance fields
|
|
.field final aED:Ljava/net/URL;
|
|
|
|
.field aSu:Lcom/google/android/gms/tasks/Task;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/android/gms/tasks/Task<",
|
|
"Landroid/graphics/Bitmap;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private volatile aSv:Ljava/io/InputStream;
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>(Ljava/net/URL;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/google/firebase/messaging/m;->aED:Ljava/net/URL;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static cY(Ljava/lang/String;)Lcom/google/firebase/messaging/m;
|
|
.locals 3
|
|
|
|
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
new-instance v0, Lcom/google/firebase/messaging/m;
|
|
|
|
new-instance v2, Ljava/net/URL;
|
|
|
|
invoke-direct {v2, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v2}, Lcom/google/firebase/messaging/m;-><init>(Ljava/net/URL;)V
|
|
:try_end_0
|
|
.catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
nop
|
|
|
|
const-string v0, "Not downloading image, bad URL: "
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/String;
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
const-string v0, "FirebaseMessaging"
|
|
|
|
invoke-static {v0, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return-object v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method final Am()[B
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/m;->aED:Ljava/net/URL;
|
|
|
|
invoke-virtual {v0}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getContentLength()I
|
|
|
|
move-result v1
|
|
|
|
const/high16 v2, 0x100000
|
|
|
|
if-gt v1, v2, :cond_4
|
|
|
|
invoke-virtual {v0}, Ljava/net/URLConnection;->getInputStream()Ljava/io/InputStream;
|
|
|
|
move-result-object v0
|
|
|
|
:try_start_0
|
|
iput-object v0, p0, Lcom/google/firebase/messaging/m;->aSv:Ljava/io/InputStream;
|
|
|
|
invoke-static {v0}, Lcom/google/android/gms/internal/e/i;->s(Ljava/io/InputStream;)Ljava/io/InputStream;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Lcom/google/android/gms/internal/e/i;->r(Ljava/io/InputStream;)[B
|
|
|
|
move-result-object v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
|
|
:cond_0
|
|
const/4 v0, 0x2
|
|
|
|
const-string v3, "FirebaseMessaging"
|
|
|
|
invoke-static {v3, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
array-length v0, v1
|
|
|
|
iget-object v4, p0, Lcom/google/firebase/messaging/m;->aED:Ljava/net/URL;
|
|
|
|
invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4}, 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, 0x22
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v5, "Downloaded "
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " bytes from "
|
|
|
|
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v3, v0}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_1
|
|
array-length v0, v1
|
|
|
|
if-gt v0, v2, :cond_2
|
|
|
|
return-object v1
|
|
|
|
:cond_2
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
const-string v1, "Image exceeds max size of 1048576"
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
:try_start_1
|
|
throw v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
:catchall_1
|
|
move-exception v2
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
:try_start_2
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
invoke-static {v1, v0}, Lcom/google/android/gms/internal/e/l;->a(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
|
|
|
|
:cond_3
|
|
:goto_0
|
|
throw v2
|
|
|
|
:cond_4
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
const-string v1, "Content-Length exceeds max size of 1048576"
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final close()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/google/firebase/messaging/m;->aSv:Ljava/io/InputStream;
|
|
|
|
invoke-static {v0}, Lcom/google/android/gms/internal/e/j;->t(Ljava/io/InputStream;)V
|
|
|
|
return-void
|
|
.end method
|