apkfuckery/com.discord/smali/androidx/media/AudioAttributesCompat$Builder.smali

393 lines
9.5 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public Landroidx/media/AudioAttributesCompat$Builder;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/media/AudioAttributesCompat;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
# instance fields
.field private mContentType:I
.field private mFlags:I
.field private mLegacyStream:I
.field private mUsage:I
# direct methods
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
const/4 v0, -0x1
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
return-void
.end method
.method public constructor <init>(Landroidx/media/AudioAttributesCompat;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
const/4 v0, -0x1
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
invoke-virtual {p1}, Landroidx/media/AudioAttributesCompat;->getUsage()I
move-result v0
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
invoke-virtual {p1}, Landroidx/media/AudioAttributesCompat;->getContentType()I
move-result v0
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
invoke-virtual {p1}, Landroidx/media/AudioAttributesCompat;->getFlags()I
move-result v0
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
invoke-virtual {p1}, Landroidx/media/AudioAttributesCompat;->getRawLegacyStreamType()I
move-result p1
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
return-void
.end method
# virtual methods
.method public build()Landroidx/media/AudioAttributesCompat;
.locals 5
sget-boolean v0, Landroidx/media/AudioAttributesCompat;->sForceLegacyBehavior:Z
if-nez v0, :cond_1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_1
new-instance v0, Landroid/media/AudioAttributes$Builder;
invoke-direct {v0}, Landroid/media/AudioAttributes$Builder;-><init>()V
iget v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
invoke-virtual {v0, v1}, Landroid/media/AudioAttributes$Builder;->setContentType(I)Landroid/media/AudioAttributes$Builder;
move-result-object v0
iget v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
invoke-virtual {v0, v1}, Landroid/media/AudioAttributes$Builder;->setFlags(I)Landroid/media/AudioAttributes$Builder;
move-result-object v0
iget v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
invoke-virtual {v0, v1}, Landroid/media/AudioAttributes$Builder;->setUsage(I)Landroid/media/AudioAttributes$Builder;
move-result-object v0
iget v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
const/4 v2, -0x1
if-eq v1, v2, :cond_0
iget v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
invoke-virtual {v0, v1}, Landroid/media/AudioAttributes$Builder;->setLegacyStreamType(I)Landroid/media/AudioAttributes$Builder;
:cond_0
new-instance v1, Landroidx/media/AudioAttributesImplApi21;
invoke-virtual {v0}, Landroid/media/AudioAttributes$Builder;->build()Landroid/media/AudioAttributes;
move-result-object v0
iget v2, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
invoke-direct {v1, v0, v2}, Landroidx/media/AudioAttributesImplApi21;-><init>(Landroid/media/AudioAttributes;I)V
goto :goto_0
:cond_1
new-instance v1, Landroidx/media/AudioAttributesImplBase;
iget v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
iget v2, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
iget v3, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
iget v4, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
invoke-direct {v1, v0, v2, v3, v4}, Landroidx/media/AudioAttributesImplBase;-><init>(IIII)V
:goto_0
new-instance v0, Landroidx/media/AudioAttributesCompat;
invoke-direct {v0, v1}, Landroidx/media/AudioAttributesCompat;-><init>(Landroidx/media/AudioAttributesImpl;)V
return-object v0
.end method
.method public setContentType(I)Landroidx/media/AudioAttributesCompat$Builder;
.locals 0
packed-switch p1, :pswitch_data_0
const/4 p1, 0x0
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
goto :goto_0
:pswitch_0
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
:goto_0
return-object p0
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
.end packed-switch
.end method
.method public setFlags(I)Landroidx/media/AudioAttributesCompat$Builder;
.locals 1
and-int/lit16 p1, p1, 0x3ff
iget v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
or-int/2addr p1, v0
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
return-object p0
.end method
.method setInternalLegacyStreamType(I)Landroidx/media/AudioAttributesCompat$Builder;
.locals 3
const/4 v0, 0x1
const/4 v1, 0x4
packed-switch p1, :pswitch_data_0
const-string v0, "AudioAttributesCompat"
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Invalid stream type "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, " for AudioAttributesCompat"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_2
:pswitch_0
iget v2, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
or-int/2addr v0, v2
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
goto :goto_0
:pswitch_1
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
iget v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
or-int/2addr v0, v1
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mFlags:I
goto :goto_2
:pswitch_2
const/4 v0, 0x2
goto :goto_1
:goto_0
:pswitch_3
iput v1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
goto :goto_2
:goto_1
:pswitch_4
iput v0, p0, Landroidx/media/AudioAttributesCompat$Builder;->mContentType:I
:goto_2
invoke-static {p1}, Landroidx/media/AudioAttributesCompat;->usageForStreamType(I)I
move-result p1
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
return-object p0
:pswitch_data_0
.packed-switch 0x0
:pswitch_4
:pswitch_3
:pswitch_3
:pswitch_2
:pswitch_3
:pswitch_3
:pswitch_1
:pswitch_0
:pswitch_3
:pswitch_3
:pswitch_4
.end packed-switch
.end method
.method public setLegacyStreamType(I)Landroidx/media/AudioAttributesCompat$Builder;
.locals 2
const/16 v0, 0xa
if-eq p1, v0, :cond_1
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mLegacyStream:I
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x15
if-lt v0, v1, :cond_0
invoke-virtual {p0, p1}, Landroidx/media/AudioAttributesCompat$Builder;->setInternalLegacyStreamType(I)Landroidx/media/AudioAttributesCompat$Builder;
move-result-object p1
return-object p1
:cond_0
return-object p0
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "STREAM_ACCESSIBILITY is not a legacy stream type that was used for audio playback"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public setUsage(I)Landroidx/media/AudioAttributesCompat$Builder;
.locals 2
packed-switch p1, :pswitch_data_0
const/4 p1, 0x0
:goto_0
:pswitch_0
iput p1, p0, Landroidx/media/AudioAttributesCompat$Builder;->mUsage:I
goto :goto_1
:pswitch_1
sget-boolean v0, Landroidx/media/AudioAttributesCompat;->sForceLegacyBehavior:Z
if-nez v0, :cond_0
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x19
if-le v0, v1, :cond_0
goto :goto_0
:cond_0
const/16 p1, 0xc
goto :goto_0
:goto_1
return-object p0
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_1
.end packed-switch
.end method