.class public Lcom/in2wow/sdk/m/e;
.super Ljava/lang/Object;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/in2wow/sdk/m/e$a;,
        Lcom/in2wow/sdk/m/e$b;
    }
.end annotation


# direct methods
.method public static a(Landroid/content/Context;)[D
    .locals 4

    const/4 v0, 0x0

    if-nez p0, :cond_0

    return-object v0

    :cond_0
    :try_start_0
    const-string v1, "location"

    .line 34
    invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/location/LocationManager;

    const-string v1, "passive"

    .line 35
    invoke-virtual {p0, v1}, Landroid/location/LocationManager;->getLastKnownLocation(Ljava/lang/String;)Landroid/location/Location;

    move-result-object p0

    if-eqz p0, :cond_1

    const/4 v1, 0x2

    .line 37
    new-array v1, v1, [D
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    const/4 v0, 0x0

    .line 38
    :try_start_1
    invoke-virtual {p0}, Landroid/location/Location;->getLatitude()D

    move-result-wide v2

    aput-wide v2, v1, v0

    const/4 v0, 0x1

    .line 39
    invoke-virtual {p0}, Landroid/location/Location;->getLongitude()D

    move-result-wide v2

    aput-wide v2, v1, v0
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    :catch_0
    move-object v0, v1

    :catch_1
    :cond_1
    return-object v0
.end method

.method public static b(Landroid/content/Context;)Lcom/in2wow/sdk/m/e$b;
    .locals 4

    .line 57
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.intent.action.BATTERY_CHANGED"

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

    const/4 v1, 0x0

    invoke-virtual {p0, v1, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    move-result-object p0

    const-string v0, "status"

    const/4 v1, 0x1

    .line 58
    invoke-virtual {p0, v0, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    .line 59
    sget-object v1, Lcom/in2wow/sdk/m/e$a;->a:Lcom/in2wow/sdk/m/e$a;

    const/4 v1, 0x2

    if-eq v0, v1, :cond_0

    const/4 v1, 0x5

    if-eq v0, v1, :cond_0

    .line 68
    sget-object v0, Lcom/in2wow/sdk/m/e$a;->c:Lcom/in2wow/sdk/m/e$a;

    goto :goto_0

    .line 64
    :cond_0
    sget-object v0, Lcom/in2wow/sdk/m/e$a;->b:Lcom/in2wow/sdk/m/e$a;

    :goto_0
    const-string v1, "level"

    const/4 v2, 0x0

    .line 72
    invoke-virtual {p0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    const-string v3, "scale"

    .line 73
    invoke-virtual {p0, v3, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result p0

    if-eqz p0, :cond_1

    const/high16 v2, 0x42c80000    # 100.0f

    int-to-float v1, v1

    mul-float v1, v1, v2

    int-to-float p0, p0

    div-float/2addr v1, p0

    float-to-double v1, v1

    .line 77
    invoke-static {v1, v2}, Ljava/lang/Math;->floor(D)D

    move-result-wide v1

    double-to-int p0, v1

    const/16 v1, 0x64

    invoke-static {p0, v1}, Ljava/lang/Math;->min(II)I

    move-result v2

    .line 80
    :cond_1
    new-instance p0, Lcom/in2wow/sdk/m/e$b;

    invoke-direct {p0, v0, v2}, Lcom/in2wow/sdk/m/e$b;-><init>(Lcom/in2wow/sdk/m/e$a;I)V

    return-object p0
.end method

.method public static c(Landroid/content/Context;)Ljava/lang/String;
    .locals 1

    .line 133
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object p0

    const-string v0, "android_id"

    invoke-static {p0, v0}, Landroid/provider/Settings$Secure;->getString(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method
