.class public final Lcom/google/android/gms/internal/ads/g0;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Landroid/content/SharedPreferences$OnSharedPreferenceChangeListener;


# annotations
.annotation runtime Ljavax/annotation/ParametersAreNonnullByDefault;
.end annotation


# instance fields
.field public final a:Ljava/lang/Object;

.field public final b:Landroid/os/ConditionVariable;

.field public volatile c:Z

.field public volatile d:Z

.field public e:Landroid/content/SharedPreferences;

.field public f:Landroid/os/Bundle;

.field public g:Landroid/content/Context;

.field public h:Lorg/json/JSONObject;


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

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

    new-instance v0, Ljava/lang/Object;

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

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->a:Ljava/lang/Object;

    new-instance v0, Landroid/os/ConditionVariable;

    invoke-direct {v0}, Landroid/os/ConditionVariable;-><init>()V

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->b:Landroid/os/ConditionVariable;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/google/android/gms/internal/ads/g0;->c:Z

    iput-boolean v0, p0, Lcom/google/android/gms/internal/ads/g0;->d:Z

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->e:Landroid/content/SharedPreferences;

    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->f:Landroid/os/Bundle;

    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    iput-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->h:Lorg/json/JSONObject;

    return-void
.end method


# virtual methods
.method public final a(Lz5/no;)Ljava/lang/Object;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Lz5/no<",
            "TT;>;)TT;"
        }
    .end annotation

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->b:Landroid/os/ConditionVariable;

    const-wide/16 v1, 0x1388

    invoke-virtual {v0, v1, v2}, Landroid/os/ConditionVariable;->block(J)Z

    move-result v0

    if-nez v0, :cond_1e

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->a:Ljava/lang/Object;

    monitor-enter v0

    :try_start_d
    iget-boolean v1, p0, Lcom/google/android/gms/internal/ads/g0;->d:Z

    if-eqz v1, :cond_13

    monitor-exit v0

    goto :goto_1e

    :cond_13
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string v1, "Flags.initialize() was not called!"

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

    throw p1

    :catchall_1b
    move-exception p1

    monitor-exit v0
    :try_end_1d
    .catchall {:try_start_d .. :try_end_1d} :catchall_1b

    throw p1

    :cond_1e
    :goto_1e
    iget-boolean v0, p0, Lcom/google/android/gms/internal/ads/g0;->c:Z

    if-eqz v0, :cond_26

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->e:Landroid/content/SharedPreferences;

    if-nez v0, :cond_33

    :cond_26
    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->a:Ljava/lang/Object;

    monitor-enter v0

    :try_start_29
    iget-boolean v1, p0, Lcom/google/android/gms/internal/ads/g0;->c:Z

    if-eqz v1, :cond_62

    iget-object v1, p0, Lcom/google/android/gms/internal/ads/g0;->e:Landroid/content/SharedPreferences;

    if-nez v1, :cond_32

    goto :goto_62

    :cond_32
    monitor-exit v0
    :try_end_33
    .catchall {:try_start_29 .. :try_end_33} :catchall_66

    .line 1
    :cond_33
    iget v0, p1, Lz5/no;->a:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_44

    .line 2
    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->f:Landroid/os/Bundle;

    if-nez v0, :cond_3f

    .line 3
    iget-object p1, p1, Lz5/no;->c:Ljava/lang/Object;

    return-object p1

    .line 4
    :cond_3f
    invoke-virtual {p1, v0}, Lz5/no;->a(Landroid/os/Bundle;)Ljava/lang/Object;

    move-result-object p1

    return-object p1

    :cond_44
    const/4 v1, 0x1

    if-ne v0, v1, :cond_58

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->h:Lorg/json/JSONObject;

    .line 5
    iget-object v1, p1, Lz5/no;->b:Ljava/lang/String;

    .line 6
    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_58

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->h:Lorg/json/JSONObject;

    invoke-virtual {p1, v0}, Lz5/no;->c(Lorg/json/JSONObject;)Ljava/lang/Object;

    move-result-object p1

    return-object p1

    :cond_58
    new-instance v0, Landroidx/appcompat/widget/n;

    invoke-direct {v0, p0, p1}, Landroidx/appcompat/widget/n;-><init>(Lcom/google/android/gms/internal/ads/g0;Lz5/no;)V

    invoke-static {v0}, Lz5/to;->a(Lz5/u91;)Ljava/lang/Object;

    move-result-object p1

    return-object p1

    .line 7
    :cond_62
    :goto_62
    :try_start_62
    iget-object p1, p1, Lz5/no;->c:Ljava/lang/Object;

    .line 8
    monitor-exit v0

    return-object p1

    :catchall_66
    move-exception p1

    monitor-exit v0
    :try_end_68
    .catchall {:try_start_62 .. :try_end_68} :catchall_66

    throw p1
.end method

.method public final b()V
    .registers 3

    iget-object v0, p0, Lcom/google/android/gms/internal/ads/g0;->e:Landroid/content/SharedPreferences;

    if-nez v0, :cond_5

    return-void

    :cond_5
    :try_start_5
    new-instance v0, Lz5/bd0;

    invoke-direct {v0, p0}, Lz5/bd0;-><init>(Lcom/google/android/gms/internal/ads/g0;)V

    invoke-static {v0}, Lz5/to;->a(Lz5/u91;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    new-instance v1, Lorg/json/JSONObject;

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

    iput-object v1, p0, Lcom/google/android/gms/internal/ads/g0;->h:Lorg/json/JSONObject;
    :try_end_17
    .catch Lorg/json/JSONException; {:try_start_5 .. :try_end_17} :catch_17

    :catch_17
    return-void
.end method

.method public final onSharedPreferenceChanged(Landroid/content/SharedPreferences;Ljava/lang/String;)V
    .registers 3

    const-string p1, "flag_configuration"

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

    move-result p1

    if-eqz p1, :cond_b

    invoke-virtual {p0}, Lcom/google/android/gms/internal/ads/g0;->b()V

    :cond_b
    return-void
.end method
