granularity level: instruction
.class public final Lw/b;
.super Ljava/lang/Object;
.source "SourceFile"
.field public static h:I
.field public static i:Landroid/app/PendingIntent;
.field public static final j:Ljava/util/regex/Pattern;
.field public final a:Lb/i;
.field public final b:Landroid/content/Context;
.field public final c:Lw/n;
.field public final d:Ljava/util/concurrent/ScheduledThreadPoolExecutor;
.field public e:Landroid/os/Messenger;
.field public f:Landroid/os/Messenger;
.field public g:Lw/e;
.method public static constructor <clinit>()V
.locals 1
const-string v0, "\\|ID\\|([^|]+)\\|:?+(.*)"
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object v0
sput-object v0, Lw/b;->j:Ljava/util/regex/Pattern;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 4
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Lb/i;
invoke-direct {v0}, Lb/i;-><init>()V
iput-object v0, p0, Lw/b;->a:Lb/i;
iput-object p1, p0, Lw/b;->b:Landroid/content/Context;
new-instance v0, Lw/n;
invoke-direct {v0, p1}, Lw/n;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lw/b;->c:Lw/n;
new-instance p1, Landroid/os/Messenger;
new-instance v0, Lw/c;
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v0, p0, v1}, Lw/c;-><init>(Lw/b;Landroid/os/Looper;)V
invoke-direct {p1, v0}, Landroid/os/Messenger;-><init>(Landroid/os/Handler;)V
iput-object p1, p0, Lw/b;->e:Landroid/os/Messenger;
new-instance p1, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
const/4 v0, 0x1
invoke-direct {p1, v0}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(I)V
sget-object v1, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v2, 0x3c
invoke-virtual {p1, v2, v3, v1}, Ljava/util/concurrent/ThreadPoolExecutor;->setKeepAliveTime(JLjava/util/concurrent/TimeUnit;)V
invoke-virtual {p1, v0}, Ljava/util/concurrent/ThreadPoolExecutor;->allowCoreThreadTimeOut(Z)V
iput-object p1, p0, Lw/b;->d:Ljava/util/concurrent/ScheduledThreadPoolExecutor;
return-void
.end method
.method public final a(Landroid/os/Bundle;)Lo0/o;
.locals 8
const-class v0, Lw/b;
monitor-enter v0
:try_start_0
sget v1, Lw/b;->h:I
add-int/lit8 v2, v1, 0x1
sput v2, Lw/b;->h:I
invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
monitor-exit v0
new-instance v2, Lo0/i;
invoke-direct {v2}, Lo0/i;-><init>()V
iget-object v3, p0, Lw/b;->a:Lb/i;
monitor-enter v3
:try_start_1
iget-object v4, p0, Lw/b;->a:Lb/i;
invoke-virtual {v4, v1, v2}, Lb/i;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
monitor-exit v3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
new-instance v3, Landroid/content/Intent;
invoke-direct {v3}, Landroid/content/Intent;-><init>()V
const-string v4, "com.google.android.gms"
invoke-virtual {v3, v4}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
iget-object v4, p0, Lw/b;->c:Lw/n;
invoke-virtual {v4}, Lw/n;->a()I
move-result v4
const/4 v5, 0x2
if-ne v4, v5, :cond_0
const-string v4, "com.google.iid.TOKEN_REQUEST"
goto :goto_0
:cond_0
const-string v4, "com.google.android.c2dm.intent.REGISTER"
:goto_0
invoke-virtual {v3, v4}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {v3, p1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
iget-object p1, p0, Lw/b;->b:Landroid/content/Context;
monitor-enter v0
:try_start_2
sget-object v4, Lw/b;->i:Landroid/app/PendingIntent;
if-nez v4, :cond_1
new-instance v4, Landroid/content/Intent;
invoke-direct {v4}, Landroid/content/Intent;-><init>()V
const-string v6, "com.google.example.invalidpackage"
invoke-virtual {v4, v6}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
sget v6, Li0/a;->a:I
const/4 v7, 0x0
invoke-static {p1, v7, v4, v6}, Landroid/app/PendingIntent;->getBroadcast(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object p1
sput-object p1, Lw/b;->i:Landroid/app/PendingIntent;
:cond_1
const-string p1, "app"
sget-object v4, Lw/b;->i:Landroid/app/PendingIntent;
invoke-virtual {v3, p1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit v0
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result p1
new-instance v0, Ljava/lang/StringBuilder;
add-int/lit8 p1, p1, 0x5
invoke-direct {v0, p1}, Ljava/lang/StringBuilder;-><init>(I)V
const-string p1, "|ID|"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "|"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "kid"
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, p1, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const-string p1, "Rpc"
const/4 v0, 0x3
invoke-static {p1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p1
if-eqz p1, :cond_2
invoke-virtual {v3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object p1
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v4
new-instance v6, Ljava/lang/StringBuilder;
add-int/lit8 v4, v4, 0x8
invoke-direct {v6, v4}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v4, "Sending "
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "Rpc"
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {p1, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_2
const-string p1, "google.messenger"
iget-object v4, p0, Lw/b;->e:Landroid/os/Messenger;
invoke-virtual {v3, p1, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
iget-object p1, p0, Lw/b;->f:Landroid/os/Messenger;
if-nez p1, :cond_3
iget-object p1, p0, Lw/b;->g:Lw/e;
if-eqz p1, :cond_5
:cond_3
invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;
move-result-object p1
iput-object v3, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
:try_start_3
iget-object v4, p0, Lw/b;->f:Landroid/os/Messenger;
if-eqz v4, :cond_4
invoke-virtual {v4, p1}, Landroid/os/Messenger;->send(Landroid/os/Message;)V
goto :goto_1
:cond_4
iget-object v4, p0, Lw/b;->g:Lw/e;
iget-object v4, v4, Lw/e;->a:Landroid/os/Messenger;
invoke-virtual {v4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-virtual {v4, p1}, Landroid/os/Messenger;->send(Landroid/os/Message;)V
:try_end_3
.catch Landroid/os/RemoteException; {:try_start_3 .. :try_end_3} :catch_0
goto :goto_1
:catch_0
nop
const-string p1, "Rpc"
invoke-static {p1, v0}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p1
if-eqz p1, :cond_5
const-string p1, "Rpc"
const-string v0, "Messenger failed, fallback to startService"
invoke-static {p1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_5
iget-object p1, p0, Lw/b;->c:Lw/n;
invoke-virtual {p1}, Lw/n;->a()I
move-result p1
if-ne p1, v5, :cond_6
iget-object p1, p0, Lw/b;->b:Landroid/content/Context;
invoke-virtual {p1, v3}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
goto :goto_1
:cond_6
iget-object p1, p0, Lw/b;->b:Landroid/content/Context;
invoke-virtual {p1, v3}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;
:goto_1
iget-object p1, p0, Lw/b;->d:Ljava/util/concurrent/ScheduledThreadPoolExecutor;
new-instance v0, Landroidx/lifecycle/b;
const/4 v3, 0x1
invoke-direct {v0, v3, v2}, Landroidx/lifecycle/b;-><init>(ILjava/lang/Object;)V
sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v4, 0x1e
invoke-virtual {p1, v0, v4, v5, v3}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
move-result-object p1
iget-object v0, v2, Lo0/i;->a:Lo0/o;
sget-object v3, Lw/o;->a:Lw/o;
new-instance v4, Ll/k;
invoke-direct {v4, p0, v1, p1}, Ll/k;-><init>(Lw/b;Ljava/lang/String;Ljava/util/concurrent/ScheduledFuture;)V
invoke-virtual {v0, v3, v4}, Lo0/o;->a(Ljava/util/concurrent/Executor;Lo0/d;)V
iget-object p1, v2, Lo0/i;->a:Lo0/o;
return-object p1
:catchall_0
move-exception p1
monitor-exit v0
throw p1
:catchall_1
move-exception p1
:try_start_4
monitor-exit v3
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw p1
:catchall_2
move-exception p1
monitor-exit v0
throw p1
.end method
.method public final b(Ljava/lang/String;Landroid/os/Bundle;)V
.locals 3
iget-object v0, p0, Lw/b;->a:Lb/i;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lw/b;->a:Lb/i;
invoke-virtual {v1, p1}, Lb/i;->remove(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lo0/i;
if-nez v1, :cond_1
const-string p2, "Rpc"
const-string v1, "Missing callback for "
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
if-eqz v2, :cond_0
invoke-virtual {v1, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_0
:cond_0
new-instance p1, Ljava/lang/String;
invoke-direct {p1, v1}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
:goto_0
invoke-static {p2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
monitor-exit v0
return-void
:cond_1
invoke-virtual {v1, p2}, Lo0/i;->a(Ljava/lang/Object;)V
monitor-exit v0
return-void
:catchall_0
move-exception p1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method