p.smali
.class public final Le7/p;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T::",
"Landroid/os/IInterface;",
">",
"Ljava/lang/Object;"
}
.end annotation
# static fields
.field private static final l:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Landroid/os/Handler;",
">;"
}
.end annotation
.end field
# instance fields
.field private final a:Landroid/content/Context;
.field private final b:Le7/f;
.field private final c:Ljava/lang/String;
.field private final d:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Le7/g;",
">;"
}
.end annotation
.end field
.field private e:Z
.field private final f:Landroid/content/Intent;
.field private final g:Le7/l;
.annotation system Ldalvik/annotation/Signature;
value = {
"Le7/l<",
"TT;>;"
}
.end annotation
.end field
.field private final h:Ljava/lang/ref/WeakReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/WeakReference<",
"Le7/k;",
">;"
}
.end annotation
.end field
.field private final i:Landroid/os/IBinder$DeathRecipient;
.field private j:Landroid/content/ServiceConnection;
.field private k:Landroid/os/IInterface;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
sput-object v0, Le7/p;->l:Ljava/util/Map;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Le7/f;Ljava/lang/String;Landroid/content/Intent;Le7/l;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Le7/f;",
"Ljava/lang/String;",
"Landroid/content/Intent;",
"Le7/l<",
"TT;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Le7/p;->d:Ljava/util/List;
new-instance v0, Le7/h;
invoke-direct {v0, p0}, Le7/h;-><init>(Le7/p;)V
iput-object v0, p0, Le7/p;->i:Landroid/os/IBinder$DeathRecipient;
iput-object p1, p0, Le7/p;->a:Landroid/content/Context;
iput-object p2, p0, Le7/p;->b:Le7/f;
iput-object p3, p0, Le7/p;->c:Ljava/lang/String;
iput-object p4, p0, Le7/p;->f:Landroid/content/Intent;
iput-object p5, p0, Le7/p;->g:Le7/l;
new-instance p1, Ljava/lang/ref/WeakReference;
const/4 p2, 0x0
invoke-direct {p1, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
iput-object p1, p0, Le7/p;->h:Ljava/lang/ref/WeakReference;
return-void
.end method
.method static synthetic d(Le7/p;Le7/g;)V
.registers 6
iget-object v0, p0, Le7/p;->k:Landroid/os/IInterface;
const/4 v1, 0x0
if-nez v0, :cond_5d
iget-boolean v0, p0, Le7/p;->e:Z
if-nez v0, :cond_5d
iget-object v0, p0, Le7/p;->b:Le7/f;
const-string v2, "Initiate binding to the service."
new-array v3, v1, [Ljava/lang/Object;
invoke-virtual {v0, v2, v3}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
new-instance p1, Le7/o;
invoke-direct {p1, p0}, Le7/o;-><init>(Le7/p;)V
iput-object p1, p0, Le7/p;->j:Landroid/content/ServiceConnection;
const/4 v0, 0x1
iput-boolean v0, p0, Le7/p;->e:Z
iget-object v2, p0, Le7/p;->a:Landroid/content/Context;
iget-object v3, p0, Le7/p;->f:Landroid/content/Intent;
invoke-virtual {v2, v3, p1, v0}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result p1
if-nez p1, :cond_5c
iget-object p1, p0, Le7/p;->b:Le7/f;
const-string v0, "Failed to bind to the service."
new-array v2, v1, [Ljava/lang/Object;
invoke-virtual {p1, v0, v2}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iput-boolean v1, p0, Le7/p;->e:Z
iget-object p1, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_3c
:goto_3c
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_57
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Le7/g;
invoke-virtual {v0}, Le7/g;->b()Lj7/p;
move-result-object v0
if-eqz v0, :cond_3c
new-instance v1, Le7/q;
invoke-direct {v1}, Le7/q;-><init>()V
invoke-virtual {v0, v1}, Lj7/p;->d(Ljava/lang/Exception;)V
goto :goto_3c
:cond_57
iget-object p0, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {p0}, Ljava/util/List;->clear()V
:cond_5c
return-void
:cond_5d
iget-boolean v0, p0, Le7/p;->e:Z
if-eqz v0, :cond_70
iget-object v0, p0, Le7/p;->b:Le7/f;
const-string v2, "Waiting to bind to the service."
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {v0, v2, v1}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object p0, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {p0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
return-void
:cond_70
invoke-virtual {p1}, Le7/g;->run()V
return-void
.end method
.method static synthetic e(Le7/p;)Landroid/os/IInterface;
.registers 1
iget-object p0, p0, Le7/p;->k:Landroid/os/IInterface;
return-object p0
.end method
.method static synthetic f(Le7/p;)Le7/f;
.registers 1
iget-object p0, p0, Le7/p;->b:Le7/f;
return-object p0
.end method
.method static synthetic g(Le7/p;)Landroid/content/ServiceConnection;
.registers 1
iget-object p0, p0, Le7/p;->j:Landroid/content/ServiceConnection;
return-object p0
.end method
.method static synthetic h(Le7/p;)Landroid/content/Context;
.registers 1
iget-object p0, p0, Le7/p;->a:Landroid/content/Context;
return-object p0
.end method
.method static synthetic i(Le7/p;)Le7/l;
.registers 1
iget-object p0, p0, Le7/p;->g:Le7/l;
return-object p0
.end method
.method static synthetic j(Le7/p;)V
.registers 5
iget-object v0, p0, Le7/p;->b:Le7/f;
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
const-string v3, "linkToDeath"
invoke-virtual {v0, v3, v2}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
:try_start_a
iget-object v0, p0, Le7/p;->k:Landroid/os/IInterface;
invoke-interface {v0}, Landroid/os/IInterface;->asBinder()Landroid/os/IBinder;
move-result-object v0
iget-object v2, p0, Le7/p;->i:Landroid/os/IBinder$DeathRecipient;
invoke-interface {v0, v2, v1}, Landroid/os/IBinder;->linkToDeath(Landroid/os/IBinder$DeathRecipient;I)V
:try_end_15
.catch Landroid/os/RemoteException; {:try_start_a .. :try_end_15} :catch_16
return-void
:catch_16
move-exception v0
iget-object p0, p0, Le7/p;->b:Le7/f;
const-string v2, "linkToDeath failed"
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {p0, v0, v2, v1}, Le7/f;->c(Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method static synthetic k(Le7/p;)Ljava/util/List;
.registers 1
iget-object p0, p0, Le7/p;->d:Ljava/util/List;
return-object p0
.end method
.method static synthetic l(Le7/p;Le7/g;)V
.registers 2
invoke-direct {p0, p1}, Le7/p;->r(Le7/g;)V
return-void
.end method
.method static synthetic m(Le7/p;)V
.registers 5
iget-object v0, p0, Le7/p;->b:Le7/f;
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
const-string v3, "unlinkToDeath"
invoke-virtual {v0, v3, v2}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Le7/p;->k:Landroid/os/IInterface;
invoke-interface {v0}, Landroid/os/IInterface;->asBinder()Landroid/os/IBinder;
move-result-object v0
iget-object p0, p0, Le7/p;->i:Landroid/os/IBinder$DeathRecipient;
invoke-interface {v0, p0, v1}, Landroid/os/IBinder;->unlinkToDeath(Landroid/os/IBinder$DeathRecipient;I)Z
return-void
.end method
.method static synthetic o(Le7/p;Landroid/os/IInterface;)V
.registers 2
iput-object p1, p0, Le7/p;->k:Landroid/os/IInterface;
return-void
.end method
.method static synthetic p(Le7/p;)V
.registers 2
const/4 v0, 0x0
iput-object v0, p0, Le7/p;->j:Landroid/content/ServiceConnection;
return-void
.end method
.method static synthetic q(Le7/p;)V
.registers 2
const/4 v0, 0x0
iput-boolean v0, p0, Le7/p;->e:Z
return-void
.end method
.method private final r(Le7/g;)V
.registers 6
sget-object v0, Le7/p;->l:Ljava/util/Map;
monitor-enter v0
:try_start_3
iget-object v1, p0, Le7/p;->c:Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_25
new-instance v1, Landroid/os/HandlerThread;
iget-object v2, p0, Le7/p;->c:Ljava/lang/String;
const/16 v3, 0xa
invoke-direct {v1, v2, v3}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;I)V
invoke-virtual {v1}, Ljava/lang/Thread;->start()V
iget-object v2, p0, Le7/p;->c:Ljava/lang/String;
new-instance v3, Landroid/os/Handler;
invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
invoke-direct {v3, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
invoke-interface {v0, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_25
iget-object v1, p0, Le7/p;->c:Ljava/lang/String;
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Landroid/os/Handler;
monitor-exit v0
:try_end_2e
.catchall {:try_start_3 .. :try_end_2e} :catchall_32
invoke-virtual {v1, p1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
return-void
:catchall_32
move-exception p1
:try_start_33
monitor-exit v0
:try_end_34
.catchall {:try_start_33 .. :try_end_34} :catchall_32
throw p1
.end method
# virtual methods
.method public final a(Le7/g;)V
.registers 4
new-instance v0, Le7/i;
invoke-virtual {p1}, Le7/g;->b()Lj7/p;
move-result-object v1
invoke-direct {v0, p0, v1, p1}, Le7/i;-><init>(Le7/p;Lj7/p;Le7/g;)V
invoke-direct {p0, v0}, Le7/p;->r(Le7/g;)V
return-void
.end method
.method public final b()V
.registers 2
new-instance v0, Le7/j;
invoke-direct {v0, p0}, Le7/j;-><init>(Le7/p;)V
invoke-direct {p0, v0}, Le7/p;->r(Le7/g;)V
return-void
.end method
.method public final c()Landroid/os/IInterface;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
iget-object v0, p0, Le7/p;->k:Landroid/os/IInterface;
return-object v0
.end method
.method final bridge synthetic n()V
.registers 6
iget-object v0, p0, Le7/p;->b:Le7/f;
const/4 v1, 0x0
new-array v2, v1, [Ljava/lang/Object;
const-string v3, "reportBinderDeath"
invoke-virtual {v0, v3, v2}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Le7/p;->h:Ljava/lang/ref/WeakReference;
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Le7/k;
if-nez v0, :cond_55
iget-object v0, p0, Le7/p;->b:Le7/f;
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
iget-object v3, p0, Le7/p;->c:Ljava/lang/String;
aput-object v3, v2, v1
const-string v1, "%s : Binder has died."
invoke-virtual {v0, v1, v2}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
iget-object v0, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_28
:goto_28
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_4f
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Le7/g;
invoke-virtual {v1}, Le7/g;->b()Lj7/p;
move-result-object v1
if-eqz v1, :cond_28
new-instance v2, Landroid/os/RemoteException;
iget-object v3, p0, Le7/p;->c:Ljava/lang/String;
invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v3
const-string v4, " : Binder has died."
invoke-virtual {v3, v4}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3}, Landroid/os/RemoteException;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, v2}, Lj7/p;->d(Ljava/lang/Exception;)V
goto :goto_28
:cond_4f
iget-object v0, p0, Le7/p;->d:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->clear()V
return-void
:cond_55
iget-object v2, p0, Le7/p;->b:Le7/f;
const-string v3, "calling onBinderDied"
new-array v1, v1, [Ljava/lang/Object;
invoke-virtual {v2, v3, v1}, Le7/f;->d(Ljava/lang/String;[Ljava/lang/Object;)V
invoke-interface {v0}, Le7/k;->a()V
return-void
.end method