431 lines
11 KiB
Smali
431 lines
11 KiB
Smali
.class public Landroidx/media/AudioAttributesImplApi21;
|
|
.super Ljava/lang/Object;
|
|
.source "AudioAttributesImplApi21.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/media/AudioAttributesImpl;
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x15
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final TAG:Ljava/lang/String; = "AudioAttributesCompat21"
|
|
|
|
.field public static sAudioAttributesToLegacyStreamType:Ljava/lang/reflect/Method;
|
|
|
|
|
|
# instance fields
|
|
.field public mAudioAttributes:Landroid/media/AudioAttributes;
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public mLegacyStreamType:I
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, -0x1
|
|
|
|
iput v0, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/media/AudioAttributes;)V
|
|
.locals 1
|
|
|
|
const/4 v0, -0x1
|
|
|
|
invoke-direct {p0, p1, v0}, Landroidx/media/AudioAttributesImplApi21;-><init>(Landroid/media/AudioAttributes;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/media/AudioAttributes;I)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, -0x1
|
|
|
|
iput v0, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
iput-object p1, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
iput p2, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static fromBundle(Landroid/os/Bundle;)Landroidx/media/AudioAttributesImpl;
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const-string v1, "androidx.media.audio_attrs.FRAMEWORKS"
|
|
|
|
invoke-virtual {p0, v1}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/media/AudioAttributes;
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
const/4 v0, -0x1
|
|
|
|
const-string v2, "androidx.media.audio_attrs.LEGACY_STREAM_TYPE"
|
|
|
|
invoke-virtual {p0, v2, v0}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p0
|
|
|
|
new-instance v0, Landroidx/media/AudioAttributesImplApi21;
|
|
|
|
invoke-direct {v0, v1, p0}, Landroidx/media/AudioAttributesImplApi21;-><init>(Landroid/media/AudioAttributes;I)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getAudioAttributesToLegacyStreamTypeMethod()Ljava/lang/reflect/Method;
|
|
.locals 5
|
|
|
|
:try_start_0
|
|
sget-object v0, Landroidx/media/AudioAttributesImplApi21;->sAudioAttributesToLegacyStreamType:Ljava/lang/reflect/Method;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-class v0, Landroid/media/AudioAttributes;
|
|
|
|
const-string v1, "toLegacyStreamType"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Class;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-class v4, Landroid/media/AudioAttributes;
|
|
|
|
aput-object v4, v2, v3
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/media/AudioAttributesImplApi21;->sAudioAttributesToLegacyStreamType:Ljava/lang/reflect/Method;
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_0
|
|
sget-object v0, Landroidx/media/AudioAttributesImplApi21;->sAudioAttributesToLegacyStreamType:Ljava/lang/reflect/Method;
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
instance-of v0, p1, Landroidx/media/AudioAttributesImplApi21;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
check-cast p1, Landroidx/media/AudioAttributesImplApi21;
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
iget-object p1, p1, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/media/AudioAttributes;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getAudioAttributes()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getContentType()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0}, Landroid/media/AudioAttributes;->getContentType()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getFlags()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0}, Landroid/media/AudioAttributes;->getFlags()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getLegacyStreamType()I
|
|
.locals 7
|
|
|
|
iget v0, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
invoke-static {}, Landroidx/media/AudioAttributesImplApi21;->getAudioAttributesToLegacyStreamTypeMethod()Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "AudioAttributesCompat21"
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "No AudioAttributes#toLegacyStreamType() on API: "
|
|
|
|
invoke-static {v0}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
sget v3, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
:try_start_0
|
|
new-array v4, v4, [Ljava/lang/Object;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
iget-object v6, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
aput-object v6, v4, v5
|
|
|
|
invoke-virtual {v0, v3, v4}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
:goto_0
|
|
const-string v3, "getLegacyStreamType() failed on API: "
|
|
|
|
invoke-static {v3}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v3
|
|
|
|
sget v4, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
return v1
|
|
.end method
|
|
|
|
.method public getRawLegacyStreamType()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getUsage()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0}, Landroid/media/AudioAttributes;->getUsage()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getVolumeControlStream()I
|
|
.locals 3
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1a
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0}, Landroid/media/AudioAttributes;->getVolumeControlStream()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p0}, Landroidx/media/AudioAttributesImplApi21;->getFlags()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p0}, Landroidx/media/AudioAttributesImplApi21;->getUsage()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v0, v1, v2}, Landroidx/media/AudioAttributesCompat;->toVolumeStreamType(ZII)I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0}, Landroid/media/AudioAttributes;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toBundle()Landroid/os/Bundle;
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
|
|
|
|
iget-object v1, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
const-string v2, "androidx.media.audio_attrs.FRAMEWORKS"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
iget v1, p0, Landroidx/media/AudioAttributesImplApi21;->mLegacyStreamType:I
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
const-string v2, "androidx.media.audio_attrs.LEGACY_STREAM_TYPE"
|
|
|
|
invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "AudioAttributesCompat: audioattributes="
|
|
|
|
invoke-static {v0}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Landroidx/media/AudioAttributesImplApi21;->mAudioAttributes:Landroid/media/AudioAttributes;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|