granularity level: instruction
.class public final Lh1/a0;
.super Ljava/lang/Object;
.source "SourceFile"
.field public static final d:J
.field public final a:Ljava/lang/String;
.field public final b:Ljava/lang/String;
.field public final c:J
.method public static constructor <clinit>()V
.locals 3
sget-object v0, Ljava/util/concurrent/TimeUnit;->DAYS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v1, 0x7
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toMillis(J)J
move-result-wide v0
sput-wide v0, Lh1/a0;->d:J
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;J)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lh1/a0;->a:Ljava/lang/String;
iput-object p2, p0, Lh1/a0;->b:Ljava/lang/String;
iput-wide p3, p0, Lh1/a0;->c:J
return-void
.end method
.method public static a(Ljava/lang/String;Ljava/lang/String;J)Ljava/lang/String;
.locals 2
:try_start_0
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
const-string v1, "token"
invoke-virtual {v0, v1, p0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string p0, "appVersion"
invoke-virtual {v0, p0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string p0, "timestamp"
invoke-virtual {v0, p0, p2, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
move-result-object p0
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string p2, "Failed to encode token: "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string p1, "FirebaseMessaging"
invoke-static {p1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
const/4 p0, 0x0
return-object p0
.end method
.method public static b(Ljava/lang/String;)Lh1/a0;
.locals 6
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
const-string v0, "{"
invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_1
:try_start_0
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
new-instance p0, Lh1/a0;
const-string v2, "token"
invoke-virtual {v0, v2}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
const-string v3, "appVersion"
invoke-virtual {v0, v3}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
const-string v4, "timestamp"
invoke-virtual {v0, v4}, Lorg/json/JSONObject;->getLong(Ljava/lang/String;)J
move-result-wide v4
invoke-direct {p0, v2, v3, v4, v5}, Lh1/a0;-><init>(Ljava/lang/String;Ljava/lang/String;J)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Failed to parse token: "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string v0, "FirebaseMessaging"
invoke-static {v0, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return-object v1
:cond_1
new-instance v0, Lh1/a0;
const-wide/16 v2, 0x0
invoke-direct {v0, p0, v1, v2, v3}, Lh1/a0;-><init>(Ljava/lang/String;Ljava/lang/String;J)V
return-object v0
.end method