public class MediaSessionLegacyHelper extends Object
Modifier and Type | Method and Description |
---|---|
void |
addMediaButtonListener(PendingIntent pi,
ComponentName mbrComponent,
Context context) |
void |
addRccListener(PendingIntent pi,
MediaSession.Callback listener) |
static MediaSessionLegacyHelper |
getHelper(Context context) |
static Bundle |
getOldMetadata(MediaMetadata metadata,
int artworkWidth,
int artworkHeight) |
MediaSession |
getSession(PendingIntent pi) |
boolean |
isGlobalPriorityActive() |
void |
removeMediaButtonListener(PendingIntent pi) |
void |
removeRccListener(PendingIntent pi) |
void |
sendAdjustVolumeBy(int suggestedStream,
int delta,
int flags) |
void |
sendMediaButtonEvent(KeyEvent keyEvent,
boolean needWakeLock) |
void |
sendVolumeKeyEvent(KeyEvent keyEvent,
boolean musicOnly) |
public static MediaSessionLegacyHelper getHelper(Context context)
public static Bundle getOldMetadata(MediaMetadata metadata, int artworkWidth, int artworkHeight)
public MediaSession getSession(PendingIntent pi)
public void sendMediaButtonEvent(KeyEvent keyEvent, boolean needWakeLock)
public void sendVolumeKeyEvent(KeyEvent keyEvent, boolean musicOnly)
public void sendAdjustVolumeBy(int suggestedStream, int delta, int flags)
public boolean isGlobalPriorityActive()
public void addRccListener(PendingIntent pi, MediaSession.Callback listener)
public void removeRccListener(PendingIntent pi)
public void addMediaButtonListener(PendingIntent pi, ComponentName mbrComponent, Context context)
public void removeMediaButtonListener(PendingIntent pi)