cb.smali
.class public final Lcom/tendcloud/tenddata/cb;
.super Ljava/lang/Object;
.source "td"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/tendcloud/tenddata/cb$a;
}
.end annotation
# static fields
.field private static volatile c:Lcom/tendcloud/tenddata/cb;
# instance fields
.field a:Landroid/content/ServiceConnection;
.field private final b:Ljava/util/concurrent/LinkedBlockingQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/LinkedBlockingQueue<",
"Landroid/os/IBinder;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lcom/tendcloud/tenddata/cb;
invoke-direct {v0}, Lcom/tendcloud/tenddata/cb;-><init>()V
sput-object v0, Lcom/tendcloud/tenddata/cb;->c:Lcom/tendcloud/tenddata/cb;
return-void
.end method
.method private constructor <init>()V
.registers 3
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>(I)V
iput-object v0, p0, Lcom/tendcloud/tenddata/cb;->b:Ljava/util/concurrent/LinkedBlockingQueue;
.line 3
new-instance v0, Lcom/tendcloud/tenddata/cb$1;
invoke-direct {v0, p0}, Lcom/tendcloud/tenddata/cb$1;-><init>(Lcom/tendcloud/tenddata/cb;)V
iput-object v0, p0, Lcom/tendcloud/tenddata/cb;->a:Landroid/content/ServiceConnection;
return-void
.end method
.method static synthetic a(Lcom/tendcloud/tenddata/cb;)Ljava/util/concurrent/LinkedBlockingQueue;
.registers 1
.line 1
iget-object p0, p0, Lcom/tendcloud/tenddata/cb;->b:Ljava/util/concurrent/LinkedBlockingQueue;
return-object p0
.end method
.method public static a(Landroid/content/Context;)Z
.registers 3
const/16 v0, 0x1d
const/4 v1, 0x0
.line 2
:try_start_3
invoke-static {v0}, Lcom/tendcloud/tenddata/af;->b(I)Z
move-result v0
if-eqz v0, :cond_a
return v1
.line 3
:cond_a
invoke-static {}, Lcom/tendcloud/tenddata/bz;->b()Z
move-result v0
if-nez v0, :cond_11
return v1
.line 4
:cond_11
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
move-result-object p0
const-string v0, "com.huawei.hwid"
invoke-virtual {p0, v0, v1}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
:try_end_1a
.catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_1a} :catch_1c
const/4 p0, 0x1
return p0
:catch_1c
return v1
.end method
.method private b(Landroid/content/Context;)V
.registers 5
.line 1
:try_start_0
new-instance v0, Landroid/content/Intent;
const-string v1, "com.uodis.opendevice.OPENIDS_SERVICE"
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v1, "com.huawei.hwid"
.line 2
invoke-virtual {v0, v1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
.line 3
iget-object v1, p0, Lcom/tendcloud/tenddata/cb;->a:Landroid/content/ServiceConnection;
const/4 v2, 0x1
invoke-virtual {p1, v0, v1, v2}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
move-result v0
:try_end_13
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_13} :catch_3b
if-eqz v0, :cond_3b
.line 4
:try_start_15
iget-object v0, p0, Lcom/tendcloud/tenddata/cb;->b:Ljava/util/concurrent/LinkedBlockingQueue;
invoke-virtual {v0}, Ljava/util/concurrent/LinkedBlockingQueue;->take()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/IBinder;
.line 5
new-instance v1, Lcom/tendcloud/tenddata/cb$a;
const/4 v2, 0x0
invoke-direct {v1, v0, v2}, Lcom/tendcloud/tenddata/cb$a;-><init>(Landroid/os/IBinder;Lcom/tendcloud/tenddata/cb$1;)V
.line 6
invoke-virtual {v1}, Lcom/tendcloud/tenddata/cb$a;->getOAID()Ljava/lang/String;
move-result-object v0
.line 7
invoke-static {}, Lcom/tendcloud/tenddata/df;->a()Lcom/tendcloud/tenddata/df;
move-result-object v1
invoke-virtual {v1, v0}, Lcom/tendcloud/tenddata/df;->setOAID(Ljava/lang/String;)V
:try_end_2e
.catch Ljava/lang/Throwable; {:try_start_15 .. :try_end_2e} :catch_2e
.catchall {:try_start_15 .. :try_end_2e} :catchall_34
.line 8
:catch_2e
:try_start_2e
iget-object v0, p0, Lcom/tendcloud/tenddata/cb;->a:Landroid/content/ServiceConnection;
invoke-virtual {p1, v0}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
:try_end_33
.catch Ljava/lang/Throwable; {:try_start_2e .. :try_end_33} :catch_3b
goto :goto_3b
:catchall_34
move-exception v0
:try_start_35
iget-object v1, p0, Lcom/tendcloud/tenddata/cb;->a:Landroid/content/ServiceConnection;
invoke-virtual {p1, v1}, Landroid/content/Context;->unbindService(Landroid/content/ServiceConnection;)V
:try_end_3a
.catch Ljava/lang/Throwable; {:try_start_35 .. :try_end_3a} :catch_3a
.line 9
:catch_3a
:try_start_3a
throw v0
:try_end_3b
.catch Ljava/lang/Throwable; {:try_start_3a .. :try_end_3b} :catch_3b
:catch_3b
:cond_3b
:goto_3b
return-void
.end method
.method public static bindHWServiceGetOAID(Landroid/content/Context;)V
.registers 2
.line 1
sget-object v0, Lcom/tendcloud/tenddata/cb;->c:Lcom/tendcloud/tenddata/cb;
invoke-direct {v0, p0}, Lcom/tendcloud/tenddata/cb;->b(Landroid/content/Context;)V
return-void
.end method