Home
last modified time | relevance | path

Searched refs:mMediaSession (Results 1 – 11 of 11) sorted by relevance

/frameworks/support/samples/SupportLeanbackDemos/src/main/java/com/example/android/leanback/
DMediaSessionService.java131 private MediaSessionCompat mMediaSession; field in MediaSessionService
177 mMediaSession.setPlaybackState(createPlaybackStateBuilder(
202 return mMediaSession; in getMediaSession()
217 if (mMediaSession == null) { in onCreate()
218 mMediaSession = new MediaSessionCompat(this, MUSIC_PLAYER_SESSION_TOKEN); in onCreate()
219 mMediaSession.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS in onCreate()
221 mMediaSession.setCallback(new MediaSessionCallback()); in onCreate()
246 if (mMediaSession != null) { in onDestroy()
247 mMediaSession.release(); in onDestroy()
248 mMediaSession = null; in onDestroy()
[all …]
DMusicPlayerFragment.java175 private MediaSessionCompat mMediaSession; field in MusicPlayerFragment
204 mMediaSession = mPlaybackService.getMediaSession();
207 mMediaSession);
/frameworks/support/samples/Support7Demos/src/main/java/com/example/android/supportv7/media/
DPlayer.java54 protected MediaSessionCompat mMediaSession; field in Player
105 if (mMediaSession == null) { in initMediaSession()
108 mMediaSession.setMetadata(null); in initMediaSession()
109 mMediaSession.setPlaybackState(INIT_PLAYBACK_STATE); in initMediaSession()
113 if (mMediaSession == null) { in updateMetadata()
120 mMediaSession.setMetadata(null); in updateMetadata()
129 mMediaSession.setMetadata(bob.build()); in updateMetadata()
133 if (mMediaSession == null) { in publishState()
156 mMediaSession.setPlaybackState(pbState); in publishState()
158 mMediaSession.setActive(true); in publishState()
[all …]
DSampleMediaRouterActivity.java137 mPlayer = Player.create(SampleMediaRouterActivity.this, route, mMediaSession);
150 mMediaSession.setActive(false);
198 private MediaSessionCompat mMediaSession; field in SampleMediaRouterActivity
392 mMediaRouter.setMediaSessionCompat(mMediaSession); in onCreate()
396 mMediaRouter.getSelectedRoute(), mMediaSession); in onCreate()
415 mMediaSession = new MediaSessionCompat(this, "SampleMediaRouter", mEventReceiver, in createMediaSession()
417 mMediaSession.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS in createMediaSession()
419 mMediaSession.setCallback(new MediaSessionCompat.Callback() { in createMediaSession()
527 mMediaSession.release(); in onDestroy()
/frameworks/base/media/java/android/media/session/
DMediaSession.java1054 private WeakReference<MediaSession> mMediaSession; field in MediaSession.CallbackStub
1057 mMediaSession = new WeakReference<>(session); in CallbackStub()
1069 MediaSession session = mMediaSession.get(); in onCommand()
1079 MediaSession session = mMediaSession.get(); in onMediaButton()
1095 MediaSession session = mMediaSession.get(); in onMediaButtonFromController()
1105 MediaSession session = mMediaSession.get(); in onPrepare()
1115 MediaSession session = mMediaSession.get(); in onPrepareFromMediaId()
1126 MediaSession session = mMediaSession.get(); in onPrepareFromSearch()
1136 MediaSession session = mMediaSession.get(); in onPrepareFromUri()
1146 MediaSession session = mMediaSession.get(); in onPlay()
[all …]
/frameworks/support/media-widget/src/main/java/androidx/media/widget/impl_with_mp1/
DVideoView2ImplBaseWithMp1.java120 protected MediaSessionCompat mMediaSession; field in VideoView2ImplBaseWithMp1
209 mMediaSession.setPlaybackState(pbState);
214 mMediaSession.setMetadata(mmBuilder.build());
371 if (mMediaSession == null) { in getMediaController()
630 mMediaSession = new MediaSessionCompat(mInstance.getContext(), "VideoView2MediaSession"); in onAttachedToWindowImpl()
631 mMediaSession.setCallback(new MediaSessionCallback()); in onAttachedToWindowImpl()
632 mMediaSession.setActive(true); in onAttachedToWindowImpl()
633 mMediaController = mMediaSession.getController(); in onAttachedToWindowImpl()
640 mMediaSession.sendSessionEvent( in onAttachedToWindowImpl()
648 mMediaRouter.setMediaSessionCompat(mMediaSession); in onAttachedToWindowImpl()
[all …]
DVideoView2ImplApi28WithMp1.java177 mMediaSession.sendSessionEvent(MediaControlView2.EVENT_UPDATE_TRACK_STATUS, data); in extractTracks()
/frameworks/support/media-widget/src/main/java/androidx/media/widget/impl/
DVideoView2ImplBase.java124 private MediaSessionCompat mMediaSession; field in VideoView2ImplBase
220 mMediaSession.setPlaybackState(pbState);
225 mMediaSession.setMetadata(mmBuilder.build());
392 if (mMediaSession == null) { in getMediaController()
655 mMediaSession = new MediaSessionCompat(mInstance.getContext(), "VideoView2MediaSession"); in onAttachedToWindowImpl()
656 mMediaSession.setCallback(new MediaSessionCallback()); in onAttachedToWindowImpl()
657 mMediaSession.setActive(true); in onAttachedToWindowImpl()
658 mMediaController = mMediaSession.getController(); in onAttachedToWindowImpl()
665 mMediaSession.sendSessionEvent( in onAttachedToWindowImpl()
673 mMediaRouter.setMediaSessionCompat(mMediaSession); in onAttachedToWindowImpl()
[all …]
/frameworks/av/packages/MediaComponents/src/com/android/widget/
DVideoView2Impl.java126 private MediaSession mMediaSession; field in VideoView2Impl
223 mMediaSession.setPlaybackState(pbState);
228 mMediaSession.setMetadata(mmBuilder.build());
345 if (mMediaSession == null) { in getMediaController_impl()
379 if (mMediaSession != null) { in setMediaMetadata_impl()
380 mMediaSession.sendSessionEvent( in setMediaMetadata_impl()
516 mMediaSession = new MediaSession(mInstance.getContext(), "VideoView2MediaSession"); in onAttachedToWindow_impl()
517 mMediaSession.setCallback(new MediaSessionCallback()); in onAttachedToWindow_impl()
518 mMediaSession.setActive(true); in onAttachedToWindow_impl()
519 mMediaController = mMediaSession.getController(); in onAttachedToWindow_impl()
[all …]
/frameworks/support/mediarouter/src/main/java/androidx/mediarouter/media/
DMediaRouter.java1961 private MediaSessionRecord mMediaSession; field in MediaRouter.GlobalMediaRouter
2697 if (mMediaSession != null) { in setMediaSessionRecord()
2698 mMediaSession.clearVolumeHandling(); in setMediaSessionRecord()
2700 mMediaSession = mediaSessionRecord; in setMediaSessionRecord()
2707 if (mMediaSession != null) { in getMediaSessionToken()
2708 return mMediaSession.getToken(); in getMediaSessionToken()
2739 if (mMediaSession != null) { in updatePlaybackInfoFromSelectedRoute()
2743 mMediaSession.clearVolumeHandling(); in updatePlaybackInfoFromSelectedRoute()
2751 mMediaSession.configureVolume(controlType, mPlaybackInfo.volumeMax, in updatePlaybackInfoFromSelectedRoute()
2756 if (mMediaSession != null) { in updatePlaybackInfoFromSelectedRoute()
[all …]
/frameworks/av/packages/MediaComponents/src/com/android/support/mediarouter/media/
DMediaRouter.java1955 private MediaSessionRecord mMediaSession; field in MediaRouter.GlobalMediaRouter
2684 if (mMediaSession != null) { in setMediaSessionRecord()
2685 mMediaSession.clearVolumeHandling(); in setMediaSessionRecord()
2687 mMediaSession = mediaSessionRecord; in setMediaSessionRecord()
2694 if (mMediaSession != null) { in getMediaSessionToken()
2695 return mMediaSession.getToken(); in getMediaSessionToken()
2726 if (mMediaSession != null) { in updatePlaybackInfoFromSelectedRoute()
2730 mMediaSession.clearVolumeHandling(); in updatePlaybackInfoFromSelectedRoute()
2738 mMediaSession.configureVolume(controlType, mPlaybackInfo.volumeMax, in updatePlaybackInfoFromSelectedRoute()
2743 if (mMediaSession != null) { in updatePlaybackInfoFromSelectedRoute()
[all …]