/packages/apps/TV/src/com/android/tv/dvr/ui/playback/ |
D | DvrPlayer.java | 62 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 …]
|
D | DvrPlaybackControlHelper.java | 59 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/ |
D | ProgressLiveData.java | 55 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()
|
D | PlaybackViewModel.java | 226 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/ |
D | ProgressLiveDataTest.java | 58 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()
|
D | PlaybackViewModelTest.java | 76 public PlaybackStateCompat mPlaybackState; field in PlaybackViewModelTest 116 mCapturedCallback.getValue().onPlaybackStateChanged(mPlaybackState); in testGetPlaybackState() 119 assertThat(observer.getObservedValue().getStateCompat()).isEqualTo(mPlaybackState); in testGetPlaybackState() 191 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in testChangeMediaSource_consistentController() 192 deliverValuesToCallbacks(mCapturedCallback, mMediaMetadata, mPlaybackState); in testChangeMediaSource_consistentController() 222 if (state.getStateCompat() == mPlaybackState) { in testChangeMediaSource_consistentController()
|
/packages/apps/Car/Radio/src/com/android/car/radio/widget/ |
D | PlayPauseButton.java | 44 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/ |
D | RadioAppServiceWrapper.java | 92 private final MutableLiveData<Integer> mPlaybackState = new MutableLiveData<>(); field in RadioAppServiceWrapper 98 mPlaybackState.postValue(PlaybackState.STATE_NONE); 175 mPlaybackState.postValue(state); 279 return mPlaybackState; in getPlaybackState()
|
/packages/apps/TV/tests/robotests/src/com/android/tv/ |
D | MediaSessionWrapperTest.java | 88 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/ |
D | ShadowMediaSession.java | 34 public PlaybackState mPlaybackState; field in ShadowMediaSession 62 mPlaybackState = state; in setPlaybackState()
|