bo.smali

.class public final Lcom/tendcloud/tenddata/bo;
.super Ljava/lang/Object;
.source "td"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/tendcloud/tenddata/bo$a;
    }
.end annotation


# static fields
.field static a:Landroid/os/Handler; = null

.field static b:Landroid/os/HandlerThread; = null

.field private static volatile c:Lcom/tendcloud/tenddata/bo; = null

.field private static final d:I = 0x1

.field private static final e:I = 0x2

.field private static final f:I = 0x3


# direct methods
.method static constructor <clinit>()V
    .registers 2

    .line 1
    :try_start_0
    invoke-static {}, Lcom/tendcloud/tenddata/ag;->a()Lcom/tendcloud/tenddata/ag;

    move-result-object v0

    invoke-static {}, Lcom/tendcloud/tenddata/bo;->a()Lcom/tendcloud/tenddata/bo;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/tendcloud/tenddata/ag;->register(Ljava/lang/Object;)V
    :try_end_b
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_b} :catch_c

    goto :goto_10

    :catch_c
    move-exception v0

    .line 2
    invoke-static {v0}, Lcom/tendcloud/tenddata/bq;->postSDKError(Ljava/lang/Throwable;)V

    :goto_10
    return-void
.end method

.method private constructor <init>()V
    .registers 4

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Landroid/os/HandlerThread;

    const-string v1, "lockScreenThread"

    const/16 v2, 0xa

    invoke-direct {v0, v1, v2}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;I)V

    sput-object v0, Lcom/tendcloud/tenddata/bo;->b:Landroid/os/HandlerThread;

    .line 3
    sget-object v0, Lcom/tendcloud/tenddata/bo;->b:Landroid/os/HandlerThread;

    invoke-virtual {v0}, Landroid/os/HandlerThread;->start()V

    .line 4
    new-instance v0, Lcom/tendcloud/tenddata/bo$1;

    sget-object v1, Lcom/tendcloud/tenddata/bo;->b:Landroid/os/HandlerThread;

    invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, p0, v1}, Lcom/tendcloud/tenddata/bo$1;-><init>(Lcom/tendcloud/tenddata/bo;Landroid/os/Looper;)V

    sput-object v0, Lcom/tendcloud/tenddata/bo;->a:Landroid/os/Handler;

    return-void
.end method

.method public static a()Lcom/tendcloud/tenddata/bo;
    .registers 2

    .line 2
    sget-object v0, Lcom/tendcloud/tenddata/bo;->c:Lcom/tendcloud/tenddata/bo;

    if-nez v0, :cond_17

    .line 3
    const-class v0, Lcom/tendcloud/tenddata/bo;

    monitor-enter v0

    .line 4
    :try_start_7
    sget-object v1, Lcom/tendcloud/tenddata/bo;->c:Lcom/tendcloud/tenddata/bo;

    if-nez v1, :cond_12

    .line 5
    new-instance v1, Lcom/tendcloud/tenddata/bo;

    invoke-direct {v1}, Lcom/tendcloud/tenddata/bo;-><init>()V

    sput-object v1, Lcom/tendcloud/tenddata/bo;->c:Lcom/tendcloud/tenddata/bo;

    .line 6
    :cond_12
    monitor-exit v0

    goto :goto_17

    :catchall_14
    move-exception v1

    monitor-exit v0
    :try_end_16
    .catchall {:try_start_7 .. :try_end_16} :catchall_14

    throw v1

    .line 7
    :cond_17
    :goto_17
    sget-object v0, Lcom/tendcloud/tenddata/bo;->c:Lcom/tendcloud/tenddata/bo;

    return-object v0
.end method

.method static synthetic a(Lcom/tendcloud/tenddata/bo;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/tendcloud/tenddata/bo;->f()V

    return-void
.end method

.method static synthetic b(Lcom/tendcloud/tenddata/bo;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/tendcloud/tenddata/bo;->e()V

    return-void
.end method

.method private c()Landroid/os/Handler;
    .registers 2

    .line 2
    sget-object v0, Lcom/tendcloud/tenddata/bo;->a:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic c(Lcom/tendcloud/tenddata/bo;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/tendcloud/tenddata/bo;->d()V

    return-void
.end method

.method static synthetic d(Lcom/tendcloud/tenddata/bo;)Landroid/os/Handler;
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/tendcloud/tenddata/bo;->c()Landroid/os/Handler;

    move-result-object p0

    return-object p0
.end method

.method private d()V
    .registers 3

    .line 2
    :try_start_0
    new-instance v0, Lcom/tendcloud/tenddata/by;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/by;-><init>()V

    const-string v1, "env"

    .line 3
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->b:Ljava/lang/String;

    const-string v1, "userPresent"

    .line 4
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->c:Ljava/lang/String;

    .line 5
    sget-object v1, Lcom/tendcloud/tenddata/a;->ENV:Lcom/tendcloud/tenddata/a;

    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->a:Lcom/tendcloud/tenddata/a;

    .line 6
    invoke-static {}, Lcom/tendcloud/tenddata/ag;->a()Lcom/tendcloud/tenddata/ag;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/tendcloud/tenddata/ag;->post(Ljava/lang/Object;)V
    :try_end_18
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_18} :catch_19

    goto :goto_1d

    :catch_19
    move-exception v0

    .line 7
    invoke-static {v0}, Lcom/tendcloud/tenddata/bq;->postSDKError(Ljava/lang/Throwable;)V

    :goto_1d
    return-void
.end method

.method private e()V
    .registers 3

    .line 1
    :try_start_0
    new-instance v0, Lcom/tendcloud/tenddata/by;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/by;-><init>()V

    const-string v1, "env"

    .line 2
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->b:Ljava/lang/String;

    const-string v1, "screenOff"

    .line 3
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->c:Ljava/lang/String;

    .line 4
    sget-object v1, Lcom/tendcloud/tenddata/a;->ENV:Lcom/tendcloud/tenddata/a;

    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->a:Lcom/tendcloud/tenddata/a;

    .line 5
    invoke-static {}, Lcom/tendcloud/tenddata/ag;->a()Lcom/tendcloud/tenddata/ag;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/tendcloud/tenddata/ag;->post(Ljava/lang/Object;)V
    :try_end_18
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_18} :catch_19

    goto :goto_1d

    :catch_19
    move-exception v0

    .line 6
    invoke-static {v0}, Lcom/tendcloud/tenddata/bq;->postSDKError(Ljava/lang/Throwable;)V

    :goto_1d
    return-void
.end method

.method private f()V
    .registers 3

    .line 1
    :try_start_0
    new-instance v0, Lcom/tendcloud/tenddata/by;

    invoke-direct {v0}, Lcom/tendcloud/tenddata/by;-><init>()V

    const-string v1, "env"

    .line 2
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->b:Ljava/lang/String;

    const-string v1, "screenOn"

    .line 3
    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->c:Ljava/lang/String;

    .line 4
    sget-object v1, Lcom/tendcloud/tenddata/a;->ENV:Lcom/tendcloud/tenddata/a;

    iput-object v1, v0, Lcom/tendcloud/tenddata/by;->a:Lcom/tendcloud/tenddata/a;

    .line 5
    invoke-static {}, Lcom/tendcloud/tenddata/ag;->a()Lcom/tendcloud/tenddata/ag;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/tendcloud/tenddata/ag;->post(Ljava/lang/Object;)V
    :try_end_18
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_18} :catch_19

    goto :goto_1d

    :catch_19
    move-exception v0

    .line 6
    invoke-static {v0}, Lcom/tendcloud/tenddata/bq;->postSDKError(Ljava/lang/Throwable;)V

    :goto_1d
    return-void
.end method


# virtual methods
.method public b()V
    .registers 4

    .line 2
    :try_start_0
    sget-object v0, Lcom/tendcloud/tenddata/ab;->g:Landroid/content/Context;

    if-eqz v0, :cond_22

    .line 3
    new-instance v0, Lcom/tendcloud/tenddata/bo$a;

    invoke-direct {v0, p0}, Lcom/tendcloud/tenddata/bo$a;-><init>(Lcom/tendcloud/tenddata/bo;)V

    .line 4
    new-instance v1, Landroid/content/IntentFilter;

    invoke-direct {v1}, Landroid/content/IntentFilter;-><init>()V

    const-string v2, "android.intent.action.SCREEN_ON"

    .line 5
    invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v2, "android.intent.action.SCREEN_OFF"

    .line 6
    invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    const-string v2, "android.intent.action.USER_PRESENT"

    .line 7
    invoke-virtual {v1, v2}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 8
    sget-object v2, Lcom/tendcloud/tenddata/ab;->g:Landroid/content/Context;

    invoke-virtual {v2, v0, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    :try_end_22
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_22} :catch_22

    :catch_22
    :cond_22
    return-void
.end method