Home
last modified time | relevance | path

Searched refs:mPlaybackState (Results 1 – 9 of 9) 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/Bluetooth/src/com/android/bluetooth/avrcpcontroller/
DAvrcpPlayer.java54 private PlaybackState mPlaybackState; field in AvrcpPlayer
64 mPlaybackState = playbackStateBuilder.build(); in AvrcpPlayer()
76 mPlaybackState = playbackStateBuilder.build(); in AvrcpPlayer()
90 mPlaybackState = new PlaybackState.Builder(mPlaybackState).setState(mPlayStatus, mPlayTime, in setPlayTime()
100 - mPlaybackState.getLastPositionUpdateTime()); in setPlayStatus()
120 mPlaybackState = new PlaybackState.Builder(mPlaybackState).setState(mPlayStatus, mPlayTime, in setPlayStatus()
138 return mPlaybackState; in getPlaybackState()
144 mPlaybackState = new PlaybackState.Builder(mPlaybackState).setActiveQueueItemId( in updateCurrentTrack()
/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.java226 private PlaybackStateCompat mPlaybackState; field in PlaybackViewModel.MediaControllerCallback
239 mPlaybackState = null; in onMediaControllerChanged()
307 mPlaybackState = playbackState; in onPlaybackStateChanged()
312 if (mMediaController != null && mPlaybackState != null) { in updatePlaybackStatus()
314 new PlaybackStateWrapper(mMediaController, mMediaMetadata, mPlaybackState)); in updatePlaybackStatus()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/playback/
DProgressLiveDataTest.java61 private PlaybackStateCompat mPlaybackState; field in ProgressLiveDataTest
72 when(mPlaybackState.getLastPositionUpdateTime()).thenAnswer( in setUp()
74 when(mPlaybackState.getPosition()).thenReturn(START_PROGRESS); in setUp()
75 when(mPlaybackState.getPlaybackSpeed()).thenReturn(1F); in setUp()
76 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_PLAYING); in setUp()
77 mProgressLiveData = new ProgressLiveData(mPlaybackState, MAX_PROGRESS, in setUp()
102 when(mPlaybackState.getPosition()) in testUnknownProgress()
129 when(mPlaybackState.getPlaybackSpeed()).thenReturn(speed); in testMovesForwardAtCustomSpeed()
143 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_PAUSED); in testDoesntMoveForwardWhenPaused()
157 when(mPlaybackState.getState()).thenReturn(PlaybackStateCompat.STATE_STOPPED); in testDoesntMoveForwardWhenStopped()
DPlaybackViewModelTest.java79 public PlaybackStateCompat mPlaybackState; field in PlaybackViewModelTest
119 mCapturedCallback.getValue().onPlaybackStateChanged(mPlaybackState); in testGetPlaybackState()
122 assertThat(observer.getObservedValue().getStateCompat()).isEqualTo(mPlaybackState); in testGetPlaybackState()
194 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in testChangeMediaSource_consistentController()
195 deliverValuesToCallbacks(mCapturedCallback, mMediaMetadata, mPlaybackState); in testChangeMediaSource_consistentController()
225 if (state.getStateCompat() == mPlaybackState) { in testChangeMediaSource_consistentController()
/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.java91 private final MutableLiveData<Integer> mPlaybackState = new MutableLiveData<>(); field in RadioAppServiceWrapper
97 mPlaybackState.postValue(PlaybackState.STATE_NONE);
174 mPlaybackState.postValue(state);
278 return mPlaybackState; in getPlaybackState()