Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.media:media:1.0.0-rc01

MediaSessionManager.RemoteUserInfo

public static final class MediaSessionManager.RemoteUserInfo
extends Object

java.lang.Object
   ↳ androidx.media.MediaSessionManager.RemoteUserInfo


Information of a remote user of MediaSessionCompat or MediaBrowserServiceCompat. This can be used to decide whether the remote user is trusted app.

Summary

Constants

String LEGACY_CONTROLLER

Used by getPackageName() when the session is connected to the legacy controller whose exact package name cannot be obtained.

Public constructors

MediaSessionManager.RemoteUserInfo(String packageName, int pid, int uid)

Public methods

boolean equals(Object obj)
String getPackageName()
int getPid()
int getUid()
int hashCode()

Inherited methods

Constants

LEGACY_CONTROLLER

added in version 1.0.0
public static final String LEGACY_CONTROLLER

Used by getPackageName() when the session is connected to the legacy controller whose exact package name cannot be obtained.

Constant Value: "android.media.session.MediaController"

Public constructors

MediaSessionManager.RemoteUserInfo

added in version 1.0.0
public MediaSessionManager.RemoteUserInfo (String packageName, 
                int pid, 
                int uid)

Parameters
packageName String

pid int

uid int

Public methods

equals

public boolean equals (Object obj)

Parameters
obj Object

Returns
boolean

getPackageName

added in version 1.0.0
public String getPackageName ()

Returns
String package name of the controller. Can be LEGACY_CONTROLLER if the package name cannot be obtained.

getPid

added in version 1.0.0
public int getPid ()

Returns
int pid of the controller

getUid

added in version 1.0.0
public int getUid ()

Returns
int uid of the controller

hashCode

public int hashCode ()

Returns
int