Home
last modified time | relevance | path

Searched refs:mPlaybackState (Results 1 – 13 of 13) sorted by relevance

/packages/apps/TV/src/com/android/tv/dvr/ui/playback/
DDvrPlayer.java62 private int mPlaybackState = PlaybackState.STATE_NONE; field in DvrPlayer
136 } else if (mPlaybackState != PlaybackState.STATE_NONE) { in prepare()
140 mPlaybackState = PlaybackState.STATE_CONNECTING; in prepare()
142 mCallback.onPlaybackStateChanged(mPlaybackState, 1); in prepare()
151 switch (mPlaybackState) { in play()
159 mPlaybackState = PlaybackState.STATE_PLAYING; in play()
160 mCallback.onPlaybackStateChanged(mPlaybackState, 1); in play()
169 switch (mPlaybackState) { in pause()
176 mPlaybackState = PlaybackState.STATE_PAUSED; in pause()
181 mCallback.onPlaybackStateChanged(mPlaybackState, 1); in pause()
[all …]
DDvrPlaybackControlHelper.java59 private int mPlaybackState = PlaybackState.STATE_NONE; field in DvrPlaybackControlHelper
333 if (state == mPlaybackState && mPlaybackSpeedLevel == speedLevel) { in onStateChanged()
339 mPlaybackState = state; in onStateChanged()
/packages/apps/Car/libs/car-media-common/src/com/android/car/media/common/playback/
DProgressLiveData.java55 private final PlaybackStateCompat mPlaybackState; field in ProgressLiveData
68 mPlaybackState = playbackState; in ProgressLiveData()
75 if (mPlaybackState.getState() != PlaybackStateCompat.STATE_PAUSED in updateProgress()
76 && mPlaybackState.getState() != PlaybackStateCompat.STATE_STOPPED in updateProgress()
77 && mPlaybackState.getPlaybackSpeed() != 0) { in updateProgress()
83 if (mPlaybackState.getPosition() == PlaybackStateCompat.PLAYBACK_POSITION_UNKNOWN) { in getProgress()
86 long timeDiff = mElapsedRealtime.get() - mPlaybackState.getLastPositionUpdateTime(); in getProgress()
87 float speed = mPlaybackState.getPlaybackSpeed(); in getProgress()
88 if (NO_PROGRESS_STATES.contains(mPlaybackState.getState())) { in getProgress()
92 return Math.min(posDiff + mPlaybackState.getPosition(), mMaxProgress); in getProgress()
DPlaybackViewModel.java244 private PlaybackStateCompat mPlaybackState; field in PlaybackViewModel.MediaControllerCallback
277 mPlaybackState = null; in setMediaController()
348 mPlaybackState = playbackState; in onPlaybackStateChanged()
353 if (mMediaController != null && mPlaybackState != null) { in updatePlaybackStatus()
355 new PlaybackStateWrapper(mMediaController, mMediaMetadata, mPlaybackState)); in updatePlaybackStatus()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/playback/
DProgressLiveDataTest.java58 private PlaybackStateCompat mPlaybackState; field in ProgressLiveDataTest
69 when(mPlaybackState.getLastPositionUpdateTime()).thenAnswer( in setUp()
71 when(mPlaybackState.getPosition()).thenReturn(START_PROGRESS); in setUp()
72 when(mPlaybackState.getPlaybackSpeed()).thenReturn(1F); in setUp()
73 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_PLAYING); in setUp()
74 mProgressLiveData = new ProgressLiveData(mPlaybackState, MAX_PROGRESS, in setUp()
99 when(mPlaybackState.getPosition()) in testUnknownProgress()
126 when(mPlaybackState.getPlaybackSpeed()).thenReturn(speed); in testMovesForwardAtCustomSpeed()
140 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_PAUSED); in testDoesntMoveForwardWhenPaused()
154 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_STOPPED); in testDoesntMoveForwardWhenStopped()
DPlaybackViewModelTest.java85 public PlaybackStateCompat mPlaybackState; field in PlaybackViewModelTest
129 mCapturedCallback.getValue().onPlaybackStateChanged(mPlaybackState); in testGetPlaybackState()
132 assertThat(observer.getObservedValue().getStateCompat()).isEqualTo(mPlaybackState); in testGetPlaybackState()
202 deliverValuesToCallbacks(mCapturedCallback, mMediaMetadata, mPlaybackState); in testChangeMediaSource_consistentController()
234 if (state.getStateCompat() == mPlaybackState) { in testChangeMediaSource_consistentController()
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputUtilsTest.java54 private PlaybackState mPlaybackState; field in MediaOutputUtilsTest
72 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaPlaying_returnController()
87 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
92 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
106 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_localMediaStopped_returnNull()
111 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaStopped_returnNull()
136 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_bothHaveRemoteMediaAndLocalMedia_returnNull()
161 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_bothHaveLocalMediaAndRemoteMedia_returnNull()
176 mPlaybackState = new PlaybackState.Builder() in initPlayback()
DMediaOutputIndicatorWorkerTest.java85 private PlaybackState mPlaybackState; field in MediaOutputIndicatorWorkerTest
109 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_registerCallback()
126 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_packageUpdated_checkPackageName()
173 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSliceUnpinned_unRegisterCallback()
206 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaPlaying_returnController()
220 mPlaybackState = new PlaybackState.Builder() in initPlayback()
234 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
239 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_remoteMediaPlaying_returnNull()
253 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_localMediaStopped_returnNull()
258 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaStopped_returnNull()
[all …]
/packages/apps/Car/Radio/src/com/android/car/radio/widget/
DPlayPauseButton.java44 private int mPlaybackState = PlaybackState.STATE_NONE; field in PlayPauseButton
74 mPlaybackState = playState; in setPlayState()
82 switch(mPlaybackState) { in onClick()
96 Log.e(TAG, "Unsupported PlaybackState: " + mPlaybackState); in onClick()
109 switch(mPlaybackState) { in onCreateDrawableState()
125 Log.e(TAG, "Unsupported PlaybackState: " + mPlaybackState); in onCreateDrawableState()
/packages/apps/Car/Radio/src/com/android/car/radio/service/
DRadioAppServiceWrapper.java92 private final MutableLiveData<Integer> mPlaybackState = new MutableLiveData<>(); field in RadioAppServiceWrapper
98 mPlaybackState.postValue(PlaybackState.STATE_NONE);
175 mPlaybackState.postValue(state);
281 return mPlaybackState; in getPlaybackState()
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/
DMediaOutputPreferenceControllerTest.java134 private PlaybackState mPlaybackState; field in MediaOutputPreferenceControllerTest
161 mPlaybackState = new PlaybackState.Builder() in setUp()
165 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp()
273 mPlaybackState = new PlaybackState.Builder() in updateState_noActiveLocalPlayback_noTitle()
276 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in updateState_noActiveLocalPlayback_noTitle()
/packages/apps/TV/tests/robotests/src/com/android/tv/
DMediaSessionWrapperTest.java88 assertThat(mediaSession.mPlaybackState.getState()).isEqualTo(PlaybackState.STATE_PLAYING); in setPlaybackState_true()
95 assertThat(mediaSession.mPlaybackState).isNull(); in setPlaybackState_false()
103 assertThat(mediaSession.mPlaybackState.getState()).isEqualTo(PlaybackState.STATE_STOPPED); in setPlaybackState_trueThenFalse()
/packages/apps/TV/tests/common/src/com/android/tv/testing/shadows/
DShadowMediaSession.java34 public PlaybackState mPlaybackState; field in ShadowMediaSession
62 mPlaybackState = state; in setPlaybackState()