apkfuckery/com.discord/smali/androidx/media/MediaSessionManager.smali

180 lines
5.1 KiB
Smali
Raw Normal View History

2019-12-12 08:58:10 +00:00
.class public final Landroidx/media/MediaSessionManager;
.super Ljava/lang/Object;
.source "MediaSessionManager.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/media/MediaSessionManager$RemoteUserInfo;,
Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;,
Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
}
.end annotation
# static fields
.field public static final DEBUG:Z
.field public static final TAG:Ljava/lang/String; = "MediaSessionManager"
.field public static final sLock:Ljava/lang/Object;
.field public static volatile sSessionManager:Landroidx/media/MediaSessionManager;
# instance fields
.field public mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
# direct methods
.method public static constructor <clinit>()V
.locals 2
const-string v0, "MediaSessionManager"
const/4 v1, 0x3
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
sput-boolean v0, Landroidx/media/MediaSessionManager;->DEBUG:Z
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Landroidx/media/MediaSessionManager;->sLock:Ljava/lang/Object;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1c
if-lt v0, v1, :cond_0
new-instance v0, Landroidx/media/MediaSessionManagerImplApi28;
invoke-direct {v0, p1}, Landroidx/media/MediaSessionManagerImplApi28;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
goto :goto_0
:cond_0
new-instance v0, Landroidx/media/MediaSessionManagerImplApi21;
invoke-direct {v0, p1}, Landroidx/media/MediaSessionManagerImplApi21;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
:goto_0
return-void
.end method
.method public static getSessionManager(Landroid/content/Context;)Landroidx/media/MediaSessionManager;
.locals 2
.param p0 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/NonNull;
.end annotation
sget-object v0, Landroidx/media/MediaSessionManager;->sSessionManager:Landroidx/media/MediaSessionManager;
if-nez v0, :cond_1
sget-object v1, Landroidx/media/MediaSessionManager;->sLock:Ljava/lang/Object;
monitor-enter v1
:try_start_0
sget-object v0, Landroidx/media/MediaSessionManager;->sSessionManager:Landroidx/media/MediaSessionManager;
if-nez v0, :cond_0
new-instance v0, Landroidx/media/MediaSessionManager;
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object p0
invoke-direct {v0, p0}, Landroidx/media/MediaSessionManager;-><init>(Landroid/content/Context;)V
sput-object v0, Landroidx/media/MediaSessionManager;->sSessionManager:Landroidx/media/MediaSessionManager;
sget-object p0, Landroidx/media/MediaSessionManager;->sSessionManager:Landroidx/media/MediaSessionManager;
move-object v0, p0
:cond_0
monitor-exit v1
goto :goto_0
:catchall_0
move-exception p0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p0
:cond_1
:goto_0
return-object v0
.end method
# virtual methods
.method public getContext()Landroid/content/Context;
.locals 1
iget-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
invoke-interface {v0}, Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;->getContext()Landroid/content/Context;
move-result-object v0
return-object v0
.end method
.method public isTrustedForMediaControl(Landroidx/media/MediaSessionManager$RemoteUserInfo;)Z
.locals 1
.param p1 # Landroidx/media/MediaSessionManager$RemoteUserInfo;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
if-eqz p1, :cond_0
iget-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
iget-object p1, p1, Landroidx/media/MediaSessionManager$RemoteUserInfo;->mImpl:Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;
invoke-interface {v0, p1}, Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;->isTrustedForMediaControl(Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;)Z
move-result p1
return p1
:cond_0
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "userInfo should not be null"
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method