df.smali

.class public final Lcom/loc/df;
.super Lcom/loc/dc;

# interfaces
.implements Ljava/lang/Thread$UncaughtExceptionHandler;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/loc/df$a;
    }
.end annotation


# static fields
.field private static e:Ljava/util/concurrent/ExecutorService;

.field private static f:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private static final g:Ljava/util/concurrent/ThreadFactory;


# instance fields
.field private d:Landroid/content/Context;


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

    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    invoke-static {v0}, Ljava/util/Collections;->synchronizedSet(Ljava/util/Set;)Ljava/util/Set;

    move-result-object v0

    sput-object v0, Lcom/loc/df;->f:Ljava/util/Set;

    new-instance v0, Lcom/loc/df$2;

    invoke-direct {v0}, Lcom/loc/df$2;-><init>()V

    sput-object v0, Lcom/loc/df;->g:Ljava/util/concurrent/ThreadFactory;

    return-void
.end method

.method private constructor <init>(Landroid/content/Context;)V
    .registers 5

    const/4 v2, -0x1

    invoke-direct {p0}, Lcom/loc/dc;-><init>()V

    iput-object p1, p0, Lcom/loc/df;->d:Landroid/content/Context;

    new-instance v0, Lcom/loc/df$a;

    invoke-direct {v0, p1}, Lcom/loc/df$a;-><init>(Landroid/content/Context;)V

    invoke-static {v0}, Lcom/loc/ao;->a(Lcom/loc/ap;)V

    :try_start_e
    invoke-static {}, Ljava/lang/Thread;->getDefaultUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;

    move-result-object v0

    iput-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    iget-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    if-nez v0, :cond_1f

    invoke-static {p0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/loc/df;->c:Z

    :goto_1e
    return-void

    :cond_1f
    iget-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v1, "com.amap.api"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v1

    if-ne v1, v2, :cond_37

    const-string/jumbo v1, "com.loc"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-eq v0, v2, :cond_40

    :cond_37
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/loc/df;->c:Z
    :try_end_3a
    .catch Ljava/lang/Throwable; {:try_start_e .. :try_end_3a} :catch_3b

    goto :goto_1e

    :catch_3b
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_1e

    :cond_40
    :try_start_40
    invoke-static {p0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/loc/df;->c:Z
    :try_end_46
    .catch Ljava/lang/Throwable; {:try_start_40 .. :try_end_46} :catch_3b

    goto :goto_1e
.end method

.method static synthetic a(Lcom/loc/df;)Landroid/content/Context;
    .registers 2

    iget-object v0, p0, Lcom/loc/df;->d:Landroid/content/Context;

    return-object v0
.end method

.method public static declared-synchronized a(Landroid/content/Context;Lcom/loc/cy;)Lcom/loc/df;
    .registers 5

    const-class v1, Lcom/loc/df;

    monitor-enter v1

    if-nez p1, :cond_11

    :try_start_5
    new-instance v0, Lcom/loc/j;

    const-string/jumbo v2, "sdk info is null"

    invoke-direct {v0, v2}, Lcom/loc/j;-><init>(Ljava/lang/String;)V

    throw v0
    :try_end_e
    .catchall {:try_start_5 .. :try_end_e} :catchall_e

    :catchall_e
    move-exception v0

    monitor-exit v1

    throw v0

    :cond_11
    :try_start_11
    invoke-virtual {p1}, Lcom/loc/cy;->a()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_24

    const-string/jumbo v0, ""

    invoke-virtual {p1}, Lcom/loc/cy;->a()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2d

    :cond_24
    new-instance v0, Lcom/loc/j;

    const-string/jumbo v2, "sdk name is invalid"

    invoke-direct {v0, v2}, Lcom/loc/j;-><init>(Ljava/lang/String;)V

    throw v0
    :try_end_2d
    .catchall {:try_start_11 .. :try_end_2d} :catchall_e

    :cond_2d
    :try_start_2d
    sget-object v0, Lcom/loc/df;->f:Ljava/util/Set;

    invoke-virtual {p1}, Lcom/loc/cy;->hashCode()I

    move-result v2

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_43

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    check-cast v0, Lcom/loc/df;
    :try_end_41
    .catch Ljava/lang/Throwable; {:try_start_2d .. :try_end_41} :catch_62
    .catchall {:try_start_2d .. :try_end_41} :catchall_e

    :goto_41
    monitor-exit v1

    return-object v0

    :cond_43
    :try_start_43
    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-nez v0, :cond_5c

    new-instance v0, Lcom/loc/df;

    invoke-direct {v0, p0}, Lcom/loc/df;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    :goto_4e
    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    sget-object v2, Lcom/loc/dc;->a:Lcom/loc/dc;

    iget-boolean v2, v2, Lcom/loc/dc;->c:Z

    invoke-virtual {v0, p0, p1, v2}, Lcom/loc/dc;->a(Landroid/content/Context;Lcom/loc/cy;Z)V
    :try_end_57
    .catch Ljava/lang/Throwable; {:try_start_43 .. :try_end_57} :catch_62
    .catchall {:try_start_43 .. :try_end_57} :catchall_e

    :goto_57
    :try_start_57
    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    check-cast v0, Lcom/loc/df;
    :try_end_5b
    .catchall {:try_start_57 .. :try_end_5b} :catchall_e

    goto :goto_41

    :cond_5c
    :try_start_5c
    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    const/4 v2, 0x0

    iput-boolean v2, v0, Lcom/loc/dc;->c:Z
    :try_end_61
    .catch Ljava/lang/Throwable; {:try_start_5c .. :try_end_61} :catch_62
    .catchall {:try_start_5c .. :try_end_61} :catchall_e

    goto :goto_4e

    :catch_62
    move-exception v0

    :try_start_63
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_66
    .catchall {:try_start_63 .. :try_end_66} :catchall_e

    goto :goto_57
.end method

.method public static declared-synchronized a()V
    .registers 3

    const-class v1, Lcom/loc/df;

    monitor-enter v1

    :try_start_3
    sget-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;

    if-eqz v0, :cond_c

    sget-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;

    invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->shutdown()V

    :cond_c
    invoke-static {}, Lcom/loc/af;->a()V
    :try_end_f
    .catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_f} :catch_2d
    .catchall {:try_start_3 .. :try_end_f} :catchall_32

    :goto_f
    :try_start_f
    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-eqz v0, :cond_28

    invoke-static {}, Ljava/lang/Thread;->getDefaultUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;

    move-result-object v0

    sget-object v2, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-ne v0, v2, :cond_28

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    iget-object v0, v0, Lcom/loc/dc;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    if-eqz v0, :cond_28

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    iget-object v0, v0, Lcom/loc/dc;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-static {v0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V

    :cond_28
    const/4 v0, 0x0

    sput-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;
    :try_end_2b
    .catch Ljava/lang/Throwable; {:try_start_f .. :try_end_2b} :catch_35
    .catchall {:try_start_f .. :try_end_2b} :catchall_32

    :goto_2b
    monitor-exit v1

    return-void

    :catch_2d
    move-exception v0

    :try_start_2e
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_31
    .catchall {:try_start_2e .. :try_end_31} :catchall_32

    goto :goto_f

    :catchall_32
    move-exception v0

    monitor-exit v1

    throw v0

    :catch_35
    move-exception v0

    :try_start_36
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_39
    .catchall {:try_start_36 .. :try_end_39} :catchall_32

    goto :goto_2b
.end method

.method public static a(Lcom/loc/cy;Ljava/lang/String;Lcom/loc/j;)V
    .registers 6

    if-eqz p2, :cond_11

    invoke-virtual {p2}, Lcom/loc/j;->c()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p2}, Lcom/loc/j;->d()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2}, Lcom/loc/j;->b()Ljava/lang/String;

    move-result-object v2

    invoke-static {p0, p1, v0, v1, v2}, Lcom/loc/df;->a(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_11
    return-void
.end method

.method public static a(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .registers 8

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-eqz v0, :cond_3c

    new-instance v0, Ljava/lang/StringBuilder;

    const-string/jumbo v1, "path:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ",type:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ",gsid:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ",code:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v1, Lcom/loc/dc;->a:Lcom/loc/dc;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string/jumbo v2, "networkError"

    invoke-virtual {v1, p0, v0, v2}, Lcom/loc/dc;->a(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;)V

    :cond_3c
    return-void
.end method

.method public static declared-synchronized b()Ljava/util/concurrent/ExecutorService;
    .registers 2

    const-class v1, Lcom/loc/df;

    monitor-enter v1

    :try_start_3
    sget-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;

    if-eqz v0, :cond_f

    sget-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;

    invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->isShutdown()Z

    move-result v0

    if-eqz v0, :cond_17

    :cond_f
    sget-object v0, Lcom/loc/df;->g:Ljava/util/concurrent/ThreadFactory;

    invoke-static {v0}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;

    move-result-object v0

    sput-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;
    :try_end_17
    .catch Ljava/lang/Throwable; {:try_start_3 .. :try_end_17} :catch_1b
    .catchall {:try_start_3 .. :try_end_17} :catchall_20

    :cond_17
    :goto_17
    :try_start_17
    sget-object v0, Lcom/loc/df;->e:Ljava/util/concurrent/ExecutorService;
    :try_end_19
    .catchall {:try_start_17 .. :try_end_19} :catchall_20

    monitor-exit v1

    return-object v0

    :catch_1b
    move-exception v0

    :try_start_1c
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_1f
    .catchall {:try_start_1c .. :try_end_1f} :catchall_20

    goto :goto_17

    :catchall_20
    move-exception v0

    monitor-exit v1

    throw v0
.end method

.method public static b(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;)V
    .registers 4

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-eqz v0, :cond_9

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    invoke-virtual {v0, p0, p1, p2}, Lcom/loc/dc;->a(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;)V

    :cond_9
    return-void
.end method

.method public static b(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    if-eqz v0, :cond_a

    sget-object v0, Lcom/loc/dc;->a:Lcom/loc/dc;

    const/4 v1, 0x1

    invoke-virtual {v0, p0, v1, p1, p2}, Lcom/loc/dc;->a(Ljava/lang/Throwable;ILjava/lang/String;Ljava/lang/String;)V

    :cond_a
    return-void
.end method


# virtual methods
.method protected final a(Landroid/content/Context;Lcom/loc/cy;Z)V
    .registers 6

    :try_start_0
    invoke-static {}, Lcom/loc/df;->b()Ljava/util/concurrent/ExecutorService;

    move-result-object v0

    if-eqz v0, :cond_c

    invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->isShutdown()Z

    move-result v1

    if-eqz v1, :cond_d

    :cond_c
    :goto_c
    return-void

    :cond_d
    new-instance v1, Lcom/loc/df$1;

    invoke-direct {v1, p0, p1, p2, p3}, Lcom/loc/df$1;-><init>(Lcom/loc/df;Landroid/content/Context;Lcom/loc/cy;Z)V

    invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
    :try_end_15
    .catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_15} :catch_16
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_15} :catch_18

    goto :goto_c

    :catch_16
    move-exception v0

    goto :goto_c

    :catch_18
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    goto :goto_c
.end method

.method protected final a(Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    iget-object v0, p0, Lcom/loc/df;->d:Landroid/content/Context;

    invoke-static {v0, p1, p2, p3}, Lcom/loc/dd;->a(Landroid/content/Context;Lcom/loc/cy;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method protected final a(Ljava/lang/Throwable;ILjava/lang/String;Ljava/lang/String;)V
    .registers 6

    iget-object v0, p0, Lcom/loc/df;->d:Landroid/content/Context;

    invoke-static {v0, p1, p2, p3, p4}, Lcom/loc/dd;->a(Landroid/content/Context;Ljava/lang/Throwable;ILjava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public final uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V
    .registers 5

    const/4 v1, 0x0

    if-nez p2, :cond_4

    :cond_3
    :goto_3
    return-void

    :cond_4
    const/4 v0, 0x0

    invoke-virtual {p0, p2, v0, v1, v1}, Lcom/loc/df;->a(Ljava/lang/Throwable;ILjava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    if-eqz v0, :cond_3

    :try_start_c
    iget-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-static {v0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V
    :try_end_11
    .catch Ljava/lang/Throwable; {:try_start_c .. :try_end_11} :catch_17

    :goto_11
    iget-object v0, p0, Lcom/loc/df;->b:Ljava/lang/Thread$UncaughtExceptionHandler;

    invoke-interface {v0, p1, p2}, Ljava/lang/Thread$UncaughtExceptionHandler;->uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V

    goto :goto_3

    :catch_17
    move-exception v0

    goto :goto_11
.end method