o$e.smali

.class public final Lcom/bumptech/glide/manager/o$e;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lcom/bumptech/glide/manager/o$c;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/bumptech/glide/manager/o;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "e"
.end annotation


# instance fields
.field public final a:Landroid/content/Context;

.field public final b:Lcom/bumptech/glide/manager/b$a;

.field public final c:Lcom/bumptech/glide/util/h;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/bumptech/glide/util/h<",
            "Landroid/net/ConnectivityManager;",
            ">;"
        }
    .end annotation
.end field

.field public d:Z

.field public final e:Lcom/bumptech/glide/manager/o$e$a;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/bumptech/glide/util/h;Lcom/bumptech/glide/manager/b$a;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Lcom/bumptech/glide/util/h<",
            "Landroid/net/ConnectivityManager;",
            ">;",
            "Lcom/bumptech/glide/manager/b$a;",
            ")V"
        }
    .end annotation

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

    .line 2
    new-instance v0, Lcom/bumptech/glide/manager/o$e$a;

    invoke-direct {v0, p0}, Lcom/bumptech/glide/manager/o$e$a;-><init>(Lcom/bumptech/glide/manager/o$e;)V

    iput-object v0, p0, Lcom/bumptech/glide/manager/o$e;->e:Lcom/bumptech/glide/manager/o$e$a;

    .line 3
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    iput-object p1, p0, Lcom/bumptech/glide/manager/o$e;->a:Landroid/content/Context;

    .line 4
    iput-object p2, p0, Lcom/bumptech/glide/manager/o$e;->c:Lcom/bumptech/glide/util/h;

    .line 5
    iput-object p3, p0, Lcom/bumptech/glide/manager/o$e;->b:Lcom/bumptech/glide/manager/b$a;

    return-void
.end method


# virtual methods
.method public final a()Z
    .registers 3
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "MissingPermission"
        }
    .end annotation

    const/4 v0, 0x1

    .line 1
    :try_start_1
    iget-object v1, p0, Lcom/bumptech/glide/manager/o$e;->c:Lcom/bumptech/glide/util/h;

    invoke-interface {v1}, Lcom/bumptech/glide/util/h;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/net/ConnectivityManager;

    invoke-virtual {v1}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;

    move-result-object v1
    :try_end_d
    .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_d} :catch_17

    if-eqz v1, :cond_16

    .line 2
    invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnected()Z

    move-result v1

    if-eqz v1, :cond_16

    goto :goto_17

    :cond_16
    const/4 v0, 0x0

    :catch_17
    :goto_17
    return v0
.end method

.method public final register()Z
    .registers 5

    .line 1
    invoke-virtual {p0}, Lcom/bumptech/glide/manager/o$e;->a()Z

    move-result v0

    iput-boolean v0, p0, Lcom/bumptech/glide/manager/o$e;->d:Z

    .line 2
    :try_start_6
    iget-object v0, p0, Lcom/bumptech/glide/manager/o$e;->a:Landroid/content/Context;

    iget-object v1, p0, Lcom/bumptech/glide/manager/o$e;->e:Lcom/bumptech/glide/manager/o$e$a;

    new-instance v2, Landroid/content/IntentFilter;

    const-string v3, "android.net.conn.CONNECTIVITY_CHANGE"

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

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
    :try_end_14
    .catch Ljava/lang/SecurityException; {:try_start_6 .. :try_end_14} :catch_16

    const/4 v0, 0x1

    return v0

    :catch_16
    const/4 v0, 0x0

    return v0
.end method

.method public final unregister()V
    .registers 3

    iget-object v0, p0, Lcom/bumptech/glide/manager/o$e;->a:Landroid/content/Context;

    iget-object v1, p0, Lcom/bumptech/glide/manager/o$e;->e:Lcom/bumptech/glide/manager/o$e$a;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    return-void
.end method