m.smali

.class public final Lb/a/a/a/a/m;
.super Ljava/lang/Object;


# static fields
.field private static a:Lb/a/a/a/a/m;


# instance fields
.field private b:I

.field private c:I

.field private d:I


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

    const/4 v0, 0x0

    sput-object v0, Lb/a/a/a/a/m;->a:Lb/a/a/a/a/m;

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    const/4 v0, -0x1

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

    iput v0, p0, Lb/a/a/a/a/m;->b:I

    iput v0, p0, Lb/a/a/a/a/m;->c:I

    const/4 v0, 0x1

    iput v0, p0, Lb/a/a/a/a/m;->d:I

    return-void
.end method

.method public static a(Landroid/content/Context;)I
    .registers 11
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "NewApi"
        }
    .end annotation

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-nez p0, :cond_6

    const/4 v0, -0x1

    :goto_5
    return v0

    :cond_6
    invoke-static {p0}, Lb/a/a/a/a/m;->b(Landroid/content/Context;)Z

    move-result v9

    :try_start_a
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string/jumbo v3, "wifi"

    invoke-virtual {v0, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/net/wifi/WifiManager;

    if-eqz v0, :cond_70

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z
    :try_end_1c
    .catch Ljava/lang/Throwable; {:try_start_a .. :try_end_1c} :catch_76

    move-result v3

    if-eqz v3, :cond_a6

    move v3, v1

    :goto_20
    :try_start_20
    sget v4, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v5, 0x12

    if-lt v4, v5, :cond_a4

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isScanAlwaysAvailable()Z
    :try_end_29
    .catch Ljava/lang/Throwable; {:try_start_20 .. :try_end_29} :catch_a9

    move-result v0

    if-eqz v0, :cond_a4

    move v6, v3

    move v7, v1

    move v8, v1

    :goto_2f
    :try_start_2f
    const-string v0, "location"

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

    move-result-object v0

    check-cast v0, Landroid/location/LocationManager;
    :try_end_37
    .catch Ljava/lang/Exception; {:try_start_2f .. :try_end_37} :catch_8d

    if-eqz v0, :cond_89

    :try_start_39
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v3

    const-string v4, "location_mode"

    invoke-static {v3, v4}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_42
    .catch Ljava/lang/Throwable; {:try_start_39 .. :try_end_42} :catch_7c
    .catch Ljava/lang/Exception; {:try_start_39 .. :try_end_42} :catch_8d

    move-result v3

    :goto_43
    :try_start_43
    const-string v4, "gps"

    invoke-virtual {v0, v4}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v4

    invoke-virtual {v0}, Landroid/location/LocationManager;->getAllProviders()Ljava/util/List;

    move-result-object v0

    if-nez v0, :cond_7f

    move v5, v3

    move v3, v4

    move v4, v2

    :goto_52
    if-nez v9, :cond_a2

    move v0, v1

    :goto_55
    if-nez v6, :cond_59

    add-int/lit8 v0, v0, 0x2

    :cond_59
    if-nez v3, :cond_5d

    add-int/lit8 v0, v0, 0x4

    :cond_5d
    if-nez v8, :cond_61

    add-int/lit8 v0, v0, 0x8

    :cond_61
    if-nez v4, :cond_65

    add-int/lit8 v0, v0, 0x10

    :cond_65
    if-nez v7, :cond_69

    add-int/lit8 v0, v0, 0x20

    :cond_69
    packed-switch v5, :pswitch_data_ac

    goto :goto_5

    :pswitch_6d
    add-int/lit8 v0, v0, 0x40

    goto :goto_5

    :cond_70
    move v0, v2

    move v3, v2

    :goto_72
    move v6, v3

    move v7, v2

    move v8, v0

    goto :goto_2f

    :catch_76
    move-exception v0

    move v3, v2

    :goto_78
    move v6, v3

    move v7, v2

    move v8, v2

    goto :goto_2f

    :catch_7c
    move-exception v3

    move v3, v2

    goto :goto_43

    :cond_7f
    const-string v5, "gps"

    invoke-interface {v0, v5}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
    :try_end_84
    .catch Ljava/lang/Exception; {:try_start_43 .. :try_end_84} :catch_9f

    move-result v0

    move v5, v3

    move v3, v4

    move v4, v0

    goto :goto_52

    :cond_89
    move v3, v2

    move v4, v2

    move v5, v2

    goto :goto_52

    :catch_8d
    move-exception v0

    move v0, v2

    :goto_8f
    move v3, v2

    move v4, v2

    move v5, v0

    goto :goto_52

    :pswitch_93
    add-int/lit16 v0, v0, 0x80

    goto/16 :goto_5

    :pswitch_97
    add-int/lit16 v0, v0, 0x100

    goto/16 :goto_5

    :pswitch_9b
    add-int/lit16 v0, v0, 0x200

    goto/16 :goto_5

    :catch_9f
    move-exception v0

    move v0, v3

    goto :goto_8f

    :cond_a2
    move v0, v2

    goto :goto_55

    :cond_a4
    move v0, v1

    goto :goto_72

    :cond_a6
    move v3, v2

    goto/16 :goto_20

    :catch_a9
    move-exception v0

    goto :goto_78

    nop

    :pswitch_data_ac
    .packed-switch 0x0
        :pswitch_6d
        :pswitch_93
        :pswitch_97
        :pswitch_9b
    .end packed-switch
.end method

.method public static a()Lb/a/a/a/a/m;
    .registers 1

    sget-object v0, Lb/a/a/a/a/m;->a:Lb/a/a/a/a/m;

    if-nez v0, :cond_b

    new-instance v0, Lb/a/a/a/a/m;

    invoke-direct {v0}, Lb/a/a/a/a/m;-><init>()V

    sput-object v0, Lb/a/a/a/a/m;->a:Lb/a/a/a/a/m;

    :cond_b
    sget-object v0, Lb/a/a/a/a/m;->a:Lb/a/a/a/a/m;

    return-object v0
.end method

.method private static b(Landroid/content/Context;)Z
    .registers 4

    const/4 v1, 0x0

    :try_start_1
    const-string v0, "phone"

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

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    if-nez v0, :cond_d

    move v0, v1

    :goto_c
    return v0

    :cond_d
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimState()I
    :try_end_10
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_10} :catch_18

    move-result v0

    const/4 v2, 0x5

    if-ne v0, v2, :cond_16

    const/4 v0, 0x1

    goto :goto_c

    :cond_16
    move v0, v1

    goto :goto_c

    :catch_18
    move-exception v0

    move v0, v1

    goto :goto_c
.end method