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

96 lines
2.4 KiB
Smali
Raw Normal View History

2019-12-12 08:58:10 +00:00
.class public Landroidx/media/MediaSessionManagerImplApi21;
.super Landroidx/media/MediaSessionManagerImplBase;
.source "MediaSessionManagerImplApi21.java"
# annotations
.annotation build Landroidx/annotation/RequiresApi;
value = 0x15
.end annotation
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 0
invoke-direct {p0, p1}, Landroidx/media/MediaSessionManagerImplBase;-><init>(Landroid/content/Context;)V
iput-object p1, p0, Landroidx/media/MediaSessionManagerImplBase;->mContext:Landroid/content/Context;
return-void
.end method
.method private hasMediaControlPermission(Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;)Z
.locals 3
.param p1 # Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-virtual {p0}, Landroidx/media/MediaSessionManagerImplBase;->getContext()Landroid/content/Context;
move-result-object v0
invoke-interface {p1}, Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;->getPid()I
move-result v1
invoke-interface {p1}, Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;->getUid()I
move-result p1
const-string v2, "android.permission.MEDIA_CONTENT_CONTROL"
invoke-virtual {v0, v2, v1, p1}, Landroid/content/Context;->checkPermission(Ljava/lang/String;II)I
move-result p1
if-nez p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
# virtual methods
.method public isTrustedForMediaControl(Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;)Z
.locals 1
.param p1 # Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
invoke-direct {p0, p1}, Landroidx/media/MediaSessionManagerImplApi21;->hasMediaControlPermission(Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;)Z
move-result v0
if-nez v0, :cond_1
invoke-super {p0, p1}, Landroidx/media/MediaSessionManagerImplBase;->isTrustedForMediaControl(Landroidx/media/MediaSessionManager$RemoteUserInfoImpl;)Z
move-result p1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
const/4 p1, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p1, 0x1
:goto_1
return p1
.end method