Home
last modified time | relevance | path

Searched refs:mMediaController (Results 1 – 16 of 16) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/
DVolumeSliceHelperTest.java65 private VolumeSeekBarPreferenceController mMediaController; field in VolumeSliceHelperTest
76 mMediaController = new MediaVolumePreferenceController(mContext); in setUp()
84 .putExtra(AudioManager.EXTRA_VOLUME_STREAM_TYPE, mMediaController.getAudioStream()); in setUp()
96 registerIntentToUri(mMediaController); in registerIntentToUri_volumeController_shouldRegisterReceiver()
100 .containsKey((mMediaController.getSliceUri())); in registerIntentToUri_volumeController_shouldRegisterReceiver()
105 registerIntentToUri(mMediaController); in registerIntentToUri_doubleVolumeControllers_shouldRegisterReceiverOnce()
116 registerIntentToUri(mMediaController); in unregisterUri_notFinalUri_shouldNotUnregisterReceiver()
119 VolumeSliceHelper.unregisterUri(mContext, mMediaController.getSliceUri()); in unregisterUri_notFinalUri_shouldNotUnregisterReceiver()
123 .doesNotContainKey((mMediaController.getSliceUri())); in unregisterUri_notFinalUri_shouldNotUnregisterReceiver()
128 registerIntentToUri(mMediaController); in unregisterUri_finalUri_shouldUnregisterReceiver()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputUtilsTest.java50 private MediaController mMediaController; field in MediaOutputUtilsTest
63 mMediaControllers.add(mMediaController); in setUp()
71 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in getActiveLocalMediaController_localMediaPlaying_returnController()
72 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaPlaying_returnController()
75 mMediaController); in getActiveLocalMediaController_localMediaPlaying_returnController()
82 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in getActiveLocalMediaController_localMediaPause_returnController()
83 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaPause_returnController()
86 mMediaController); in getActiveLocalMediaController_localMediaPause_returnController()
102 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
103 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
[all …]
DMediaOutputIndicatorWorkerTest.java81 private MediaController mMediaController; field in MediaOutputIndicatorWorkerTest
108 mMediaControllers.add(mMediaController); in setUp()
119 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in onSlicePinned_registerCallback()
120 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_registerCallback()
121 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in onSlicePinned_registerCallback()
136 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in onSlicePinned_packageUpdated_checkPackageName()
137 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_packageUpdated_checkPackageName()
138 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in onSlicePinned_packageUpdated_checkPackageName()
146 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME2); in onSlicePinned_packageUpdated_checkPackageName()
183 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in onSliceUnpinned_unRegisterCallback()
[all …]
DMediaOutputIndicatorSliceTest.java94 private MediaController mMediaController; field in MediaOutputIndicatorSliceTest
146 doReturn(mMediaController).when(sMediaOutputIndicatorWorker) in getSlice_withConnectedDevice_verifyMetadata()
221 when(mMediaController.getSessionToken()).thenReturn(mToken); in onNotifyChange_withActiveLocalMedia_verifyIntentExtra()
222 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in onNotifyChange_withActiveLocalMedia_verifyIntentExtra()
223 doReturn(mMediaController).when(sMediaOutputIndicatorWorker) in onNotifyChange_withActiveLocalMedia_verifyIntentExtra()
244 doReturn(mMediaController).when(sMediaOutputIndicatorWorker) in onNotifyChange_withoutActiveLocalMedia_verifyIntentExtra()
297 doReturn(mMediaController).when(sMediaOutputIndicatorWorker) in isVisible_allConditionMatched_returnTrue()
323 doReturn(mMediaController).when(sMediaOutputIndicatorWorker) in isVisible_noActiveSession_returnTrue()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/audio_util/
DGPMWrapperTest.java45 private MediaController mMediaController; field in GPMWrapperTest
50 mMediaController = mock(MediaController.class); in setUp()
55 when(mMediaController.getQueue()).thenReturn(null); in isMetadataSynced_whenQueueIsNull_returnsFalse()
57 GPMWrapper wrapper = new GPMWrapper(mContext, mMediaController, null); in isMetadataSynced_whenQueueIsNull_returnsFalse()
67 when(mMediaController.getPlaybackState()).thenReturn(state); in isMetadataSynced_whenOutOfSync_returnsFalse()
75 when(mMediaController.getQueue()).thenReturn(queue); in isMetadataSynced_whenOutOfSync_returnsFalse()
83 when(mMediaController.getMetadata()).thenReturn(metadata); in isMetadataSynced_whenOutOfSync_returnsFalse()
85 GPMWrapper wrapper = new GPMWrapper(mContext, mMediaController, null); in isMetadataSynced_whenOutOfSync_returnsFalse()
97 when(mMediaController.getPlaybackState()).thenReturn(state); in isMetadataSynced_whenSynced_returnsTrue()
104 when(mMediaController.getQueue()).thenReturn(queue); in isMetadataSynced_whenSynced_returnsTrue()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/audio_util/
DMediaPlayerWrapper.java51 private MediaController mMediaController; field in MediaPlayerWrapper
90 mMediaController = controller; in MediaPlayerWrapper()
107 mMediaController = null; in cleanup()
116 return mMediaController.getSessionToken(); in getSessionToken()
120 return mMediaController.getQueue(); in getQueue()
124 return mMediaController.getMetadata(); in getMetadata()
132 return mMediaController.getPlaybackState(); in getPlaybackState()
136 PlaybackState state = mMediaController.getPlaybackState(); in getActiveQueueID()
182 MediaController.TransportControls controller = mMediaController.getTransportControls(); in playItemFromQueue()
187 MediaController.TransportControls controller = mMediaController.getTransportControls(); in playCurrent()
[all …]
/packages/apps/Settings/src/com/android/settings/sound/
DMediaOutputPreferenceController.java58 @Nullable private MediaController mMediaController; field in MediaOutputPreferenceController
105 mMediaController = MediaOutputUtils.getActiveLocalMediaController(mMediaSessionManager); in MediaOutputPreferenceController()
136 && (enableOutputSwitcherForSystemRouting() ? true : mMediaController != null)); in displayPreference()
147 mMediaController = MediaOutputUtils.getActiveLocalMediaController(mMediaSessionManager); in updateState()
149 if (mMediaController == null) { in updateState()
177 if (mMediaController == null) { in updateState()
182 mMediaController.getPackageName()))); in updateState()
237 if (enableOutputSwitcherForSystemRouting() && mMediaController == null) { in handlePreferenceTreeClick()
241 } else if (mMediaController != null) { in handlePreferenceTreeClick()
246 mMediaController.getPackageName()) in handlePreferenceTreeClick()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/ui/playback/
DDvrPlaybackControlHelper.java67 private final MediaController mMediaController; field in DvrPlaybackControlHelper
80 mMediaController = activity.getMediaController(); in DvrPlaybackControlHelper()
81 mMediaController.registerCallback(mMediaControllerCallback); in DvrPlaybackControlHelper()
82 mTransportControls = mMediaController.getTransportControls(); in DvrPlaybackControlHelper()
177 PlaybackState playbackState = mMediaController.getPlaybackState(); in hasValidMedia()
183 PlaybackState playbackState = mMediaController.getPlaybackState(); in isMediaPlaying()
195 MediaMetadata mediaMetadata = mMediaController.getMetadata(); in getMediaId()
203 MediaMetadata mediaMetadata = mMediaController.getMetadata(); in getMediaTitle()
211 MediaMetadata mediaMetadata = mMediaController.getMetadata(); in getMediaSubtitle()
219 MediaMetadata mediaMetadata = mMediaController.getMetadata(); in getMediaDuration()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/audiostreams/
DMediaControlHelperTest.java61 @Mock private MediaController mMediaController; field in MediaControlHelperTest
71 when(mMediaSessionManager.getActiveSessions(any())).thenReturn(List.of(mMediaController)); in setUp()
72 when(mMediaController.getPackageName()).thenReturn(FAKE_PACKAGE); in setUp()
73 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp()
110 verify(mMediaController, never()).getTransportControls(); in testStart_isStopped_onDeviceListUpdate_shouldNotStopMedia()
124 verify(mMediaController, never()).getTransportControls(); in testStart_isPlaying_onDeviceListUpdate_noDevice_shouldNotStopMedia()
139 verify(mMediaController).getTransportControls(); in testStart_isPlaying_onDeviceListUpdate_deviceMatch_shouldStopMedia()
/packages/apps/Car/VoiceControl/src/com/android/car/voicecontrol/actuators/
DRadioActuator.java55 private MediaControllerCompat mMediaController; field in RadioActuator
104 if (mMediaController == null) { in tuneRadioFrequencyAndBand()
108 MediaControllerCompat.TransportControls controls = mMediaController.getTransportControls(); in tuneRadioFrequencyAndBand()
122 if (mMediaController == null) { in stopTuning()
126 PlaybackStateCompat state = mMediaController.getPlaybackState(); in stopTuning()
137 mMediaController.getTransportControls().stop(); in stopTuning()
165 mMediaController = new MediaControllerCompat(mContext, browser.getSessionToken()); in onBrowserConnectionChanged()
167 mMediaController = null; in onBrowserConnectionChanged()
DMediaActuator.java69 private MediaControllerCompat mMediaController; field in MediaActuator
226 return executePlaybackAction(mMediaController, mCurrentSource, in playSongOnDefault()
234 if (mMediaController == null) { in informCurrentSong()
239 PlaybackStateCompat playbackState = mMediaController.getPlaybackState(); in informCurrentSong()
244 MediaMetadataCompat metadata = mMediaController.getMetadata(); in informCurrentSong()
257 return executePlaybackAction(mMediaController, mCurrentSource, in stopCurrentSource()
265 return executePlaybackAction(mMediaController, mCurrentSource, in pauseCurrentSource()
273 return executePlaybackAction(mMediaController, mCurrentSource, in playCurrentSource()
335 mMediaController = new MediaControllerCompat(mContext, browser.getSessionToken()); in onBrowserConnectionChanged()
337 mMediaController = null; in onBrowserConnectionChanged()
/packages/apps/TV/src/com/android/tv/
DMediaSessionWrapper.java85 private MediaController mMediaController; field in MediaSessionWrapper
257 mMediaController = new MediaController(mContext, mMediaSession.getSessionToken()); in initMediaController()
258 ((Activity) mContext).setMediaController(mMediaController); in initMediaController()
259 mMediaController.registerCallback(mMediaControllerCallback); in initMediaController()
264 mMediaController.unregisterCallback(mMediaControllerCallback); in unregisterMediaControllerCallback()
/packages/apps/Gallery/src/com/android/camera/
DMovieViewControl.java65 private MediaController mMediaController; field in MovieViewControl
99 mMediaController = new MediaController(context); in MovieViewControl()
100 mVideoView.setMediaController(mMediaController); in MovieViewControl()
225 mMediaController.show(0); in onResume()
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/
DMediaOutputPreferenceControllerTest.java135 private MediaController mMediaController; field in MediaOutputPreferenceControllerTest
181 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in setUp()
192 when(mMediaController.getPlaybackInfo()).thenReturn(mPlaybackInfo); in setUp()
193 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp()
194 mMediaControllers.add(mMediaController); in setUp()
354 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in updateState_noActiveLocalPlayback_noTitle()
368 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in updateState_noActiveLocalPlayback_checkTitle()
435 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in handlePreferenceTreeClick_WithNoLocalPlaybackFlagEnabled_verifyIntentExtra()
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DMediaVolumePreferenceControllerTest.java76 @Mock private MediaController mMediaController; field in MediaVolumePreferenceControllerTest
209 doReturn(mMediaController) in getSliceEndItem_deviceIsBroadcasting_getsBroadcastIntent()
232 doReturn(mMediaController) in getSliceEndItem_deviceIsNotBroadcasting_getsActivityIntent()
/packages/services/Car/service/src/com/android/car/
DCarMediaService.java1177 private final MediaController mMediaController; field in CarMediaService.MediaControllerCallback
1182 mMediaController = mediaController; in MediaControllerCallback()
1188 mMediaController.registerCallback(this); in register()
1192 mMediaController.unregisterCallback(this); in unregister()
1203 ComponentName mediaSource = getMediaSource(mMediaController.getPackageName(), in onPlaybackStateChanged()
1204 getClassName(mMediaController), mUserId); in onPlaybackStateChanged()