public final class

MediaSession.ControllerInfo

extends java.lang.Object

 java.lang.Object

↳androidx.media2.MediaSession.ControllerInfo

Overview

Information of a controller.

Summary

Methods
public booleanequals(java.lang.Object obj)

public java.lang.StringgetPackageName()

public MediaSessionManager.RemoteUserInfogetRemoteUserInfo()

public intgetUid()

public inthashCode()

public booleanisTrusted()

Return if the controller has granted android.permission.MEDIA_CONTENT_CONTROL or has a enabled notification listener so can be trusted to accept connection and incoming command request.

public java.lang.StringtoString()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Methods

public MediaSessionManager.RemoteUserInfo getRemoteUserInfo()

public java.lang.String getPackageName()

Returns:

package name of the controller. Can be MediaSessionManager.RemoteUserInfo.LEGACY_CONTROLLER if the package name cannot be obtained.

public int getUid()

Returns:

uid of the controller. Can be a negative value if the uid cannot be obtained.

public boolean isTrusted()

Return if the controller has granted android.permission.MEDIA_CONTENT_CONTROL or has a enabled notification listener so can be trusted to accept connection and incoming command request.

Returns:

true if the controller is trusted.

public int hashCode()

public boolean equals(java.lang.Object obj)

public java.lang.String toString()