bj$a.smali

.class final Lcom/loc/bj$a;
.super Landroid/os/HandlerThread;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/loc/bj;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "a"
.end annotation


# instance fields
.field final synthetic a:Lcom/loc/bj;


# direct methods
.method public constructor <init>(Lcom/loc/bj;Ljava/lang/String;)V
    .registers 3

    iput-object p1, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    invoke-direct {p0, p2}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    return-void
.end method


# virtual methods
.method protected final onLooperPrepared()V
    .registers 7

    :try_start_0
    invoke-super {p0}, Landroid/os/HandlerThread;->onLooperPrepared()V

    iget-object v0, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    invoke-static {v0}, Lcom/loc/bj;->a(Lcom/loc/bj;)Ljava/lang/Object;

    move-result-object v1

    monitor-enter v1
    :try_end_a
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_a} :catch_51

    :try_start_a
    iget-object v0, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    invoke-static {v0}, Lcom/loc/bj;->b(Lcom/loc/bj;)Z

    move-result v0

    if-nez v0, :cond_38

    iget-object v2, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    new-instance v0, Lcom/loc/bj$1;

    invoke-direct {v0, v2}, Lcom/loc/bj$1;-><init>(Lcom/loc/bj;)V

    iput-object v0, v2, Lcom/loc/bj;->g:Landroid/telephony/PhoneStateListener;

    const-string/jumbo v3, "android.telephony.PhoneStateListener"

    const/4 v0, 0x0

    invoke-static {}, Lcom/loc/cj;->c()I

    move-result v4

    const/4 v5, 0x7

    if-ge v4, v5, :cond_3a

    const-string/jumbo v4, "LISTEN_SIGNAL_STRENGTH"
    :try_end_29
    .catchall {:try_start_a .. :try_end_29} :catchall_4e

    :try_start_29
    invoke-static {v3, v4}, Lcom/loc/cd;->b(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_2c
    .catch Ljava/lang/Throwable; {:try_start_29 .. :try_end_2c} :catch_53
    .catchall {:try_start_29 .. :try_end_2c} :catchall_4e

    move-result v0

    :goto_2d
    if-nez v0, :cond_42

    :try_start_2f
    iget-object v0, v2, Lcom/loc/bj;->c:Landroid/telephony/TelephonyManager;

    iget-object v2, v2, Lcom/loc/bj;->g:Landroid/telephony/PhoneStateListener;

    const/16 v3, 0x10

    invoke-virtual {v0, v2, v3}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V
    :try_end_38
    .catch Ljava/lang/Throwable; {:try_start_2f .. :try_end_38} :catch_57
    .catchall {:try_start_2f .. :try_end_38} :catchall_4e

    :cond_38
    :goto_38
    :try_start_38
    monitor-exit v1

    :goto_39
    return-void

    :cond_3a
    const-string/jumbo v4, "LISTEN_SIGNAL_STRENGTHS"
    :try_end_3d
    .catchall {:try_start_38 .. :try_end_3d} :catchall_4e

    :try_start_3d
    invoke-static {v3, v4}, Lcom/loc/cd;->b(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_40
    .catch Ljava/lang/Throwable; {:try_start_3d .. :try_end_40} :catch_55
    .catchall {:try_start_3d .. :try_end_40} :catchall_4e

    move-result v0

    goto :goto_2d

    :cond_42
    :try_start_42
    iget-object v3, v2, Lcom/loc/bj;->c:Landroid/telephony/TelephonyManager;

    iget-object v2, v2, Lcom/loc/bj;->g:Landroid/telephony/PhoneStateListener;

    or-int/lit8 v0, v0, 0x10

    invoke-virtual {v3, v2, v0}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V
    :try_end_4b
    .catch Ljava/lang/Throwable; {:try_start_42 .. :try_end_4b} :catch_4c
    .catchall {:try_start_42 .. :try_end_4b} :catchall_4e

    goto :goto_38

    :catch_4c
    move-exception v0

    goto :goto_38

    :catchall_4e
    move-exception v0

    :try_start_4f
    monitor-exit v1

    throw v0
    :try_end_51
    .catch Ljava/lang/Throwable; {:try_start_4f .. :try_end_51} :catch_51

    :catch_51
    move-exception v0

    goto :goto_39

    :catch_53
    move-exception v3

    goto :goto_2d

    :catch_55
    move-exception v3

    goto :goto_2d

    :catch_57
    move-exception v0

    goto :goto_38
.end method

.method public final run()V
    .registers 4

    :try_start_0
    invoke-super {p0}, Landroid/os/HandlerThread;->run()V
    :try_end_3
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_3} :catch_4

    :goto_3
    return-void

    :catch_4
    move-exception v0

    :try_start_5
    iget-object v0, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    iget-object v0, v0, Lcom/loc/bj;->c:Landroid/telephony/TelephonyManager;

    iget-object v1, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    iget-object v1, v1, Lcom/loc/bj;->g:Landroid/telephony/PhoneStateListener;

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/telephony/TelephonyManager;->listen(Landroid/telephony/PhoneStateListener;I)V

    iget-object v0, p0, Lcom/loc/bj$a;->a:Lcom/loc/bj;

    const/4 v1, 0x0

    iput-object v1, v0, Lcom/loc/bj;->g:Landroid/telephony/PhoneStateListener;

    invoke-virtual {p0}, Lcom/loc/bj$a;->quit()Z
    :try_end_19
    .catch Ljava/lang/Throwable; {:try_start_5 .. :try_end_19} :catch_1a

    goto :goto_3

    :catch_1a
    move-exception v0

    goto :goto_3
.end method