2019-02-04 20:08:30 +00:00
|
|
|
.class public final Landroidx/media/MediaSessionManager;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "MediaSessionManager.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/media/MediaSessionManager$RemoteUserInfo;,
|
|
|
|
Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;,
|
|
|
|
Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field static final DEBUG:Z
|
|
|
|
|
|
|
|
.field static final TAG:Ljava/lang/String; = "MediaSessionManager"
|
|
|
|
|
|
|
|
.field private static final sLock:Ljava/lang/Object;
|
|
|
|
|
|
|
|
.field private static volatile sSessionManager:Landroidx/media/MediaSessionManager;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method 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 private 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;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x15
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_1
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/media/MediaSessionManagerImplApi21;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Landroidx/media/MediaSessionManagerImplApi21;-><init>(Landroid/content/Context;)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
iput-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance v0, Landroidx/media/MediaSessionManagerImplBase;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Landroidx/media/MediaSessionManagerImplBase;-><init>(Landroid/content/Context;)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
iput-object v0, p0, Landroidx/media/MediaSessionManager;->mImpl:Landroidx/media/MediaSessionManager$MediaSessionManagerImpl;
|
|
|
|
|
|
|
|
return-void
|
2019-02-04 20:08:30 +00:00
|
|
|
.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;
|
|
|
|
|
|
|
|
: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 final 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 final 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
|