/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 | 236 private PlaybackStateCompat mPlaybackState; field in PlaybackViewModel.MediaControllerCallback 249 mPlaybackState = null; in onMediaControllerChanged() 318 mPlaybackState = playbackState; in onPlaybackStateChanged() 323 if (mMediaController != null && mPlaybackState != null) { in updatePlaybackStatus() 325 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/Settings/tests/robotests/src/com/android/settings/media/ |
D | MediaOutputIndicatorWorkerTest.java | 86 private PlaybackState mPlaybackState; field in MediaOutputIndicatorWorkerTest 110 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_registerCallback() 127 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSlicePinned_packageUpdated_checkPackageName() 173 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in onSliceUnpinned_unRegisterCallback() 208 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaPlaying_returnController() 222 mPlaybackState = new PlaybackState.Builder() in initPlayback() 236 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_remoteMediaPlaying_returnNull() 241 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_remoteMediaPlaying_returnNull() 255 mPlaybackState = new PlaybackState.Builder() in getActiveLocalMediaController_localMediaStopped_returnNull() 260 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in getActiveLocalMediaController_localMediaStopped_returnNull()
|
/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/Settings/tests/robotests/src/com/android/settings/panel/ |
D | MediaOutputPanelTest.java | 76 private PlaybackState mPlaybackState; field in MediaOutputPanelTest 291 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in onPlaybackStateChanged_stateFromPlayingToStopped_verifyCallForceClose() 292 controllerCallbacks.onPlaybackStateChanged(mPlaybackState); in onPlaybackStateChanged_stateFromPlayingToStopped_verifyCallForceClose() 295 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_STOPPED); in onPlaybackStateChanged_stateFromPlayingToStopped_verifyCallForceClose() 296 controllerCallbacks.onPlaybackStateChanged(mPlaybackState); in onPlaybackStateChanged_stateFromPlayingToStopped_verifyCallForceClose() 306 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in onPlaybackStateChanged_stateFromPlayingToPaused_verifyCallForceClose() 307 controllerCallbacks.onPlaybackStateChanged(mPlaybackState); in onPlaybackStateChanged_stateFromPlayingToPaused_verifyCallForceClose() 310 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PAUSED); in onPlaybackStateChanged_stateFromPlayingToPaused_verifyCallForceClose() 311 controllerCallbacks.onPlaybackStateChanged(mPlaybackState); in onPlaybackStateChanged_stateFromPlayingToPaused_verifyCallForceClose()
|
/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); 281 return mPlaybackState; in getPlaybackState()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/ |
D | MediaOutputPreferenceControllerTest.java | 133 private PlaybackState mPlaybackState; field in MediaOutputPreferenceControllerTest 160 mPlaybackState = new PlaybackState.Builder() in setUp() 164 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp() 272 mPlaybackState = new PlaybackState.Builder() in updateState_noActiveLocalPlayback_noTitle() 275 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in updateState_noActiveLocalPlayback_noTitle()
|
/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()
|