.class public final Lz5/t1;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Landroid/media/AudioManager;

.field public final b:Lz5/r1;

.field public c:Lz5/s1;

.field public d:I

.field public e:F


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/os/Handler;Lz5/s1;)V
    .registers 5

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

    const/high16 v0, 0x3f800000    # 1.0f

    iput v0, p0, Lz5/t1;->e:F

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

    move-result-object p1

    const-string v0, "audio"

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

    move-result-object p1

    check-cast p1, Landroid/media/AudioManager;

    invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    iput-object p1, p0, Lz5/t1;->a:Landroid/media/AudioManager;

    iput-object p3, p0, Lz5/t1;->c:Lz5/s1;

    new-instance p1, Lz5/r1;

    invoke-direct {p1, p0, p2}, Lz5/r1;-><init>(Lz5/t1;Landroid/os/Handler;)V

    iput-object p1, p0, Lz5/t1;->b:Lz5/r1;

    const/4 p1, 0x0

    iput p1, p0, Lz5/t1;->d:I

    return-void
.end method


# virtual methods
.method public final a(Z)I
    .registers 2

    invoke-virtual {p0}, Lz5/t1;->b()V

    if-eqz p1, :cond_7

    const/4 p1, 0x1

    return p1

    :cond_7
    const/4 p1, -0x1

    return p1
.end method

.method public final b()V
    .registers 3

    iget v0, p0, Lz5/t1;->d:I

    if-nez v0, :cond_5

    return-void

    :cond_5
    sget v0, Lz5/r7;->a:I

    const/16 v1, 0x1a

    if-ge v0, v1, :cond_12

    iget-object v0, p0, Lz5/t1;->a:Landroid/media/AudioManager;

    iget-object v1, p0, Lz5/t1;->b:Lz5/r1;

    invoke-virtual {v0, v1}, Landroid/media/AudioManager;->abandonAudioFocus(Landroid/media/AudioManager$OnAudioFocusChangeListener;)I

    :cond_12
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lz5/t1;->c(I)V

    return-void
.end method

.method public final c(I)V
    .registers 5

    iget v0, p0, Lz5/t1;->d:I

    if-ne v0, p1, :cond_5

    return-void

    :cond_5
    iput p1, p0, Lz5/t1;->d:I

    const/4 v0, 0x3

    if-ne p1, v0, :cond_e

    const p1, 0x3e4ccccd    # 0.2f

    goto :goto_10

    :cond_e
    const/high16 p1, 0x3f800000    # 1.0f

    :goto_10
    iget v0, p0, Lz5/t1;->e:F

    cmpl-float v0, v0, p1

    if-nez v0, :cond_17

    return-void

    :cond_17
    iput p1, p0, Lz5/t1;->e:F

    iget-object p1, p0, Lz5/t1;->c:Lz5/s1;

    if-eqz p1, :cond_31

    check-cast p1, Lz5/j4;

    iget-object p1, p1, Lz5/j4;->r:Lz5/l4;

    .line 1
    iget v0, p1, Lz5/l4;->J:F

    iget-object v1, p1, Lz5/l4;->z:Lz5/t1;

    .line 2
    iget v1, v1, Lz5/t1;->e:F

    mul-float/2addr v0, v1

    .line 3
    invoke-static {v0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x2

    invoke-virtual {p1, v1, v2, v0}, Lz5/l4;->U(IILjava/lang/Object;)V

    :cond_31
    return-void
.end method

.method public final d(I)V
    .registers 5

    iget-object v0, p0, Lz5/t1;->c:Lz5/s1;

    if-eqz v0, :cond_15

    check-cast v0, Lz5/j4;

    iget-object v1, v0, Lz5/j4;->r:Lz5/l4;

    invoke-virtual {v1}, Lz5/l4;->O()Z

    move-result v1

    iget-object v0, v0, Lz5/j4;->r:Lz5/l4;

    .line 1
    invoke-static {v1, p1}, Lz5/l4;->W(ZI)I

    move-result v2

    .line 2
    invoke-virtual {v0, v1, p1, v2}, Lz5/l4;->S(ZII)V

    :cond_15
    return-void
.end method
