media/src/main/java/androidx/media/MediaSessionManager.java
public boolean isTrustedForMediaControl(@NonNull RemoteUserInfo userInfo) {
        if (userInfo == null) {
            throw new IllegalArgumentException("userInfo should not be null");
        }
        return mImpl.isTrustedForMediaControl(userInfo.mImpl);
    }
/**
     * Checks whether the remote user is a trusted app.
     * <p>
     * An app is trusted if the app holds the android.Manifest.permission.MEDIA_CONTENT_CONTROL
     * permission or has an enabled notification listener.
     *
     * @param userInfo The remote user info from either
     *            {@link MediaSessionCompat#getCurrentControllerInfo()} and
     *            {@link MediaBrowserServiceCompat#getCurrentBrowserInfo()}.
     * @return {@code true} if the remote user is trusted and its package name matches with the UID.
     *            {@code false} otherwise.
     */
Checks whether the remote user is a trusted app.

An app is trusted if the app holds the android.Manifest.permission.MEDIA_CONTENT_CONTROL
permission or has an enabled notification listener.


Checks whether the remote user is a trusted app . An app is trusted if the app holds the android . Manifest . permission . MEDIA_CONTENT_CONTROL permission or has an enabled notification listener .
public boolean isTrustedForMediaControl(@NonNull RemoteUserInfo userInfo) {
        if (userInfo == null) {
            throw new IllegalArgumentException("userInfo should not be null");
        }
        return mImpl.isTrustedForMediaControl(userInfo.mImpl);
    }
public boolean isTrustedForMediaControl ( @ NonNull RemoteUserInfo userInfo ) { if ( userInfo == null ) { throw new IllegalArgumentException ( "userInfo should not be null" ) ; } return mImpl . isTrustedForMediaControl ( userInfo . mImpl ) ; }
Checks whether the remote user is a trusted app.
Checks whether the remote user is a trusted app .