UserApi$UserApiHelper.smali
.class Lcom/sandboxol/center/web/UserApi$UserApiHelper;
.super Ljava/lang/Object;
.source "UserApi.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/sandboxol/center/web/UserApi;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "UserApiHelper"
.end annotation
# static fields
.field private static final instance:Lcom/sandboxol/center/web/UserApi$UserApiHelper;
# instance fields
.field private api:Lcom/sandboxol/center/web/IUserApi;
.field private lock:Ljava/lang/Object;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;
invoke-direct {v0}, Lcom/sandboxol/center/web/UserApi$UserApiHelper;-><init>()V
sput-object v0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->instance:Lcom/sandboxol/center/web/UserApi$UserApiHelper;
return-void
.end method
.method private constructor <init>()V
.registers 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
iput-object v0, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->lock:Ljava/lang/Object;
return-void
.end method
.method static synthetic access$000()Lcom/sandboxol/center/web/UserApi$UserApiHelper;
.registers 1
.line 1
sget-object v0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->instance:Lcom/sandboxol/center/web/UserApi$UserApiHelper;
return-object v0
.end method
.method static synthetic access$100(Lcom/sandboxol/center/web/UserApi$UserApiHelper;Landroid/content/Context;)Lcom/sandboxol/center/web/IUserApi;
.registers 2
.line 1
invoke-direct {p0, p1}, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->getApi(Landroid/content/Context;)Lcom/sandboxol/center/web/IUserApi;
move-result-object p0
return-object p0
.end method
.method private getApi(Landroid/content/Context;)Lcom/sandboxol/center/web/IUserApi;
.registers 5
.line 1
iget-object v0, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->api:Lcom/sandboxol/center/web/IUserApi;
if-nez v0, :cond_35
.line 2
iget-object v0, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->lock:Ljava/lang/Object;
monitor-enter v0
.line 3
:try_start_7
iget-object v1, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->api:Lcom/sandboxol/center/web/IUserApi;
:try_end_9
.catchall {:try_start_7 .. :try_end_9} :catchall_32
if-nez v1, :cond_30
.line 4
:try_start_b
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
check-cast v1, Lcom/sandboxol/common/base/app/BaseApplication;
invoke-virtual {v1}, Lcom/sandboxol/common/base/app/BaseApplication;->getMetaDataBaseUrl()Ljava/lang/String;
move-result-object v1
const-class v2, Lcom/sandboxol/center/web/IUserApi;
invoke-static {v1, v2}, Lcom/sandboxol/common/retrofit/RetrofitFactory;->httpsCreate(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/sandboxol/center/web/IUserApi;
iput-object v1, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->api:Lcom/sandboxol/center/web/IUserApi;
:try_end_1f
.catch Ljava/lang/Exception; {:try_start_b .. :try_end_1f} :catch_20
.catchall {:try_start_b .. :try_end_1f} :catchall_32
goto :goto_30
:catch_20
move-exception v1
.line 5
:try_start_21
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
const-string v1, "token_app_exception"
.line 6
invoke-static {p1, v1}, Lcom/sandboxol/common/interfaces/ReportDataAdapter;->onEvent(Landroid/content/Context;Ljava/lang/String;)V
.line 7
invoke-static {}, Landroid/os/Process;->myPid()I
move-result p1
invoke-static {p1}, Landroid/os/Process;->killProcess(I)V
.line 8
:cond_30
:goto_30
monitor-exit v0
goto :goto_35
:catchall_32
move-exception p1
monitor-exit v0
:try_end_34
.catchall {:try_start_21 .. :try_end_34} :catchall_32
throw p1
.line 9
:cond_35
:goto_35
iget-object p1, p0, Lcom/sandboxol/center/web/UserApi$UserApiHelper;->api:Lcom/sandboxol/center/web/IUserApi;
return-object p1
.end method