cb.smali

.class public final Lcom/loc/cb;
.super Ljava/lang/Object;


# static fields
.field static a:D


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

    const-wide v0, 0x400921fb54442d18L    # Math.PI

    sput-wide v0, Lcom/loc/cb;->a:D

    return-void
.end method

.method public static a(Landroid/content/Context;DD)Lcom/amap/api/location/DPoint;
    .registers 6

    if-nez p0, :cond_4

    const/4 v0, 0x0

    :goto_3
    return-object v0

    :cond_4
    new-instance v0, Lcom/amap/api/location/DPoint;

    invoke-direct {v0, p3, p4, p1, p2}, Lcom/amap/api/location/DPoint;-><init>(DD)V

    invoke-static {p0, v0}, Lcom/loc/cb;->a(Landroid/content/Context;Lcom/amap/api/location/DPoint;)Lcom/amap/api/location/DPoint;

    move-result-object v0

    goto :goto_3
.end method

.method public static a(Landroid/content/Context;Lcom/amap/api/location/DPoint;)Lcom/amap/api/location/DPoint;
    .registers 5

    if-nez p0, :cond_4

    const/4 v0, 0x0

    :goto_3
    return-object v0

    :cond_4
    const-string/jumbo v0, "libwgs2gcj.so"

    invoke-static {p0, v0}, Lcom/loc/cx;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_29

    new-instance v1, Ljava/io/File;

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

    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_29

    invoke-static {}, Lcom/amap/api/location/CoordUtil;->a()Z

    move-result v1

    if-nez v1, :cond_29

    :try_start_22
    invoke-static {v0}, Ljava/lang/System;->load(Ljava/lang/String;)V

    const/4 v0, 0x1

    invoke-static {v0}, Lcom/amap/api/location/CoordUtil;->a(Z)V
    :try_end_29
    .catch Ljava/lang/UnsatisfiedLinkError; {:try_start_22 .. :try_end_29} :catch_3d
    .catch Ljava/lang/Throwable; {:try_start_22 .. :try_end_29} :catch_32

    :cond_29
    :goto_29
    invoke-static {}, Lcom/amap/api/location/CoordUtil;->a()Z

    move-result v0

    invoke-static {p1, v0}, Lcom/loc/cb;->a(Lcom/amap/api/location/DPoint;Z)Lcom/amap/api/location/DPoint;

    move-result-object v0

    goto :goto_3

    :catch_32
    move-exception v0

    const-string/jumbo v1, "OffsetUtil"

    const-string/jumbo v2, "offset"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_29

    :catch_3d
    move-exception v0

    goto :goto_29
.end method

.method private static a(Lcom/amap/api/location/DPoint;Z)Lcom/amap/api/location/DPoint;
    .registers 8

    :try_start_0
    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v2

    invoke-static {v0, v1, v2, v3}, Lcom/loc/ca;->a(DD)Z

    move-result v0

    if-eqz v0, :cond_43

    const/4 v0, 0x2

    new-array v0, v0, [D

    if-eqz p1, :cond_76

    const/4 v1, 0x2

    new-array v1, v1, [D

    const/4 v2, 0x0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v4

    aput-wide v4, v1, v2

    const/4 v2, 0x1

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v4

    aput-wide v4, v1, v2
    :try_end_24
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_24} :catch_69

    :try_start_24
    invoke-static {v1, v0}, Lcom/amap/api/location/CoordUtil;->convertToGcj([D[D)I
    :try_end_27
    .catch Ljava/lang/Throwable; {:try_start_24 .. :try_end_27} :catch_44
    .catchall {:try_start_24 .. :try_end_27} :catchall_5c

    move-result v1

    if-eqz v1, :cond_74

    :try_start_2a
    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v2

    invoke-static {v0, v1, v2, v3}, Lcom/loc/ck;->a(DD)[D

    move-result-object v0

    move-object v1, v0

    :goto_37
    new-instance v0, Lcom/amap/api/location/DPoint;

    const/4 v2, 0x1

    aget-wide v2, v1, v2

    const/4 v4, 0x0

    aget-wide v4, v1, v4

    invoke-direct {v0, v2, v3, v4, v5}, Lcom/amap/api/location/DPoint;-><init>(DD)V
    :try_end_42
    .catch Ljava/lang/Throwable; {:try_start_2a .. :try_end_42} :catch_69

    move-object p0, v0

    :cond_43
    :goto_43
    return-object p0

    :catch_44
    move-exception v0

    :try_start_45
    const-string/jumbo v1, "OffsetUtil"

    const-string/jumbo v2, "cover part1"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_4e
    .catchall {:try_start_45 .. :try_end_4e} :catchall_5c

    :try_start_4e
    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v2

    invoke-static {v0, v1, v2, v3}, Lcom/loc/ck;->a(DD)[D

    move-result-object v0

    move-object v1, v0

    goto :goto_37

    :catchall_5c
    move-exception v0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v2

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v4

    invoke-static {v2, v3, v4, v5}, Lcom/loc/ck;->a(DD)[D

    throw v0
    :try_end_69
    .catch Ljava/lang/Throwable; {:try_start_4e .. :try_end_69} :catch_69

    :catch_69
    move-exception v0

    const-string/jumbo v1, "OffsetUtil"

    const-string/jumbo v2, "cover part2"

    invoke-static {v0, v1, v2}, Lcom/loc/ca;->a(Ljava/lang/Throwable;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_43

    :cond_74
    move-object v1, v0

    goto :goto_37

    :cond_76
    :try_start_76
    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLongitude()D

    move-result-wide v0

    invoke-virtual {p0}, Lcom/amap/api/location/DPoint;->getLatitude()D

    move-result-wide v2

    invoke-static {v0, v1, v2, v3}, Lcom/loc/ck;->a(DD)[D
    :try_end_81
    .catch Ljava/lang/Throwable; {:try_start_76 .. :try_end_81} :catch_69

    move-result-object v0

    move-object v1, v0

    goto :goto_37
.end method