Home
last modified time | relevance | path

Searched refs:PlaybackState (Results 1 – 25 of 63) sorted by relevance

123

/frameworks/base/media/java/android/media/
DRemoteControlClient.java26 import android.media.session.PlaybackState;
684 : PlaybackState.PLAYBACK_POSITION_UNKNOWN; in setPlaybackStateInt()
686 PlaybackState.Builder bob = new PlaybackState.Builder(mSessionPlaybackState); in setPlaybackStateInt()
717 PlaybackState.Builder bob = new PlaybackState.Builder(mSessionPlaybackState); in setTransportControlFlags()
913 private PlaybackState mSessionPlaybackState = null;
1038 return PlaybackState.STATE_BUFFERING; in getStateFromRccState()
1040 return PlaybackState.STATE_ERROR; in getStateFromRccState()
1042 return PlaybackState.STATE_FAST_FORWARDING; in getStateFromRccState()
1044 return PlaybackState.STATE_NONE; in getStateFromRccState()
1046 return PlaybackState.STATE_PAUSED; in getStateFromRccState()
[all …]
DRemoteController.java28 import android.media.session.PlaybackState;
214 PlaybackState state = mCurrentSession.getPlaybackState(); in getEstimatedMediaPosition()
453 public void onPlaybackStateChanged(PlaybackState state) { in onPlaybackStateChanged()
508 onNewPlaybackState((PlaybackState) msg.obj); in handleMessage()
606 PlaybackState state = controller.getPlaybackState(); in updateController()
618 private void onNewPlaybackState(PlaybackState state) { in onNewPlaybackState()
626 if (state == null || state.getPosition() == PlaybackState.PLAYBACK_POSITION_UNKNOWN) { in onNewPlaybackState()
/frameworks/base/media/java/android/media/session/
DPlaybackState.java41 public final class PlaybackState implements Parcelable { class
315 private List<PlaybackState.CustomAction> mCustomActions;
321 private PlaybackState(int state, long position, long updateTime, float speed, in PlaybackState() method in PlaybackState
323 List<PlaybackState.CustomAction> customActions, long activeItemId, in PlaybackState()
337 private PlaybackState(Parcel in) { in PlaybackState() method in PlaybackState
472 public List<PlaybackState.CustomAction> getCustomActions() { in getCustomActions()
533 case PlaybackState.STATE_FAST_FORWARDING: in isActive()
534 case PlaybackState.STATE_REWINDING: in isActive()
535 case PlaybackState.STATE_SKIPPING_TO_PREVIOUS: in isActive()
536 case PlaybackState.STATE_SKIPPING_TO_NEXT: in isActive()
[all …]
DISessionControllerCallback.aidl21 import android.media.session.PlaybackState;
32 void onPlaybackStateChanged(in PlaybackState state); in onPlaybackStateChanged()
DISession.aidl24 import android.media.session.PlaybackState;
45 void setPlaybackState(in PlaybackState state); in setPlaybackState()
DMediaSession.java147 private PlaybackState mPlaybackState;
488 public void setPlaybackState(@Nullable PlaybackState state) { in setPlaybackState()
932 PlaybackState state = mSession.mPlaybackState; in onMediaButtonEvent()
945 if ((validActions & PlaybackState.ACTION_SKIP_TO_NEXT) != 0) { in onMediaButtonEvent()
964 if ((validActions & PlaybackState.ACTION_PLAY) != 0) { in onMediaButtonEvent()
970 if ((validActions & PlaybackState.ACTION_PAUSE) != 0) { in onMediaButtonEvent()
976 if ((validActions & PlaybackState.ACTION_SKIP_TO_NEXT) != 0) { in onMediaButtonEvent()
982 if ((validActions & PlaybackState.ACTION_SKIP_TO_PREVIOUS) != 0) { in onMediaButtonEvent()
988 if ((validActions & PlaybackState.ACTION_STOP) != 0) { in onMediaButtonEvent()
994 if ((validActions & PlaybackState.ACTION_FAST_FORWARD) != 0) { in onMediaButtonEvent()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/domain/pipeline/
DMediaTimeoutListenerTest.kt22 import android.media.session.PlaybackState
77 @Mock private lateinit var stateCallback: (String, PlaybackState) -> Unit
85 private lateinit var playbackBuilder: PlaybackState.Builder
119 PlaybackState.Builder().apply { in setup()
120 setState(PlaybackState.STATE_PAUSED, 6000L, 1f) in setup()
121 setActions(PlaybackState.ACTION_PLAY) in setup()
142 val playingState = mock(android.media.session.PlaybackState::class.java) in testOnMediaDataLoaded_registersPlaybackListener()
143 whenever(playingState.state).thenReturn(PlaybackState.STATE_PLAYING) in testOnMediaDataLoaded_registersPlaybackListener()
197 val playingState = mock(android.media.session.PlaybackState::class.java) in testOnMediaDataLoaded_migratesKeys()
198 whenever(playingState.state).thenReturn(PlaybackState.STATE_PLAYING) in testOnMediaDataLoaded_migratesKeys()
[all …]
/frameworks/base/tests/OneMedia/src/com/android/onemedia/
DPlayerSession.java25 import android.media.session.PlaybackState;
51 protected PlaybackState mPlaybackState;
61 PlaybackState.Builder psBob = new PlaybackState.Builder(); in PlayerSession()
62 psBob.setActions(PlaybackState.ACTION_PAUSE | PlaybackState.ACTION_PLAY); in PlayerSession()
139 float rate = newState == PlaybackState.STATE_PLAYING ? 1 : 0; in updateState()
141 PlaybackState.Builder bob = new PlaybackState.Builder(mPlaybackState); in updateState()
159 public void onPlayStateChanged(PlaybackState state); in onPlayStateChanged()
167 PlaybackState.Builder bob = new PlaybackState.Builder(mPlaybackState); in onError()
168 bob.setState(PlaybackState.STATE_ERROR, -1, 0, 0); in onError()
191 pbState = PlaybackState.STATE_STOPPED; in onStateChanged()
[all …]
DOnePlayerActivity.java28 import android.media.session.PlaybackState;
61 private PlaybackState mPlaybackState;
147 if (state == PlaybackState.STATE_PAUSED
148 || state == PlaybackState.STATE_STOPPED) {
150 } else if (state == PlaybackState.STATE_PLAYING) {
177 public void onPlaybackStateChange(PlaybackState state) {
183 case PlaybackState.STATE_PLAYING:
188 case PlaybackState.STATE_PAUSED:
193 case PlaybackState.STATE_STOPPED:
198 case PlaybackState.STATE_ERROR:
[all …]
DNotificationHelper.java19 import android.media.session.PlaybackState;
41 private PlaybackState mPlaybackState;
130 public void onPlaybackStateChanged(PlaybackState state) {
162 case PlaybackState.STATE_PLAYING: in updateNotification()
165 case PlaybackState.STATE_PAUSED: in updateNotification()
168 case PlaybackState.STATE_STOPPED: in updateNotification()
171 case PlaybackState.STATE_ERROR: in updateNotification()
174 case PlaybackState.STATE_BUFFERING: in updateNotification()
177 case PlaybackState.STATE_NONE: in updateNotification()
197 if (state == PlaybackState.STATE_PLAYING) { in updateNotification()
DPlayerService.java22 import android.media.session.PlaybackState;
109 public void onPlayStateChanged(PlaybackState state) {
111 case PlaybackState.STATE_PLAYING:
114 case PlaybackState.STATE_STOPPED:
115 case PlaybackState.STATE_ERROR:
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/
DMediaControllerRepositoryImplTest.kt22 import android.media.session.PlaybackState
126 val statePlaying: PlaybackState =
127 PlaybackState.Builder().setState(PlaybackState.STATE_PLAYING, 0, 0f).build()
128 val stateError: PlaybackState =
129 PlaybackState.Builder().setState(PlaybackState.STATE_ERROR, 0, 0f).build()
130 val stateStopped: PlaybackState =
131 PlaybackState.Builder().setState(PlaybackState.STATE_STOPPED, 0, 0f).build()
132 val stateNone: PlaybackState =
133 PlaybackState.Builder().setState(PlaybackState.STATE_NONE, 0, 0f).build()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/viewmodel/
DSeekBarViewModelTest.kt22 import android.media.session.PlaybackState
149 PlaybackState.Builder().run { in updateDurationWithPlayback()
150 setState(PlaybackState.STATE_PLAYING, 200L, 1f) in updateDurationWithPlayback()
191 PlaybackState.Builder().run { in updateDurationNegative()
192 setState(PlaybackState.STATE_PLAYING, 200L, 1f) in updateDurationNegative()
214 PlaybackState.Builder().run { in updateDurationZero()
215 setState(PlaybackState.STATE_PLAYING, 200L, 1f) in updateDurationZero()
232 PlaybackState.Builder().run { in updateDurationNoMetadata()
233 setState(PlaybackState.STATE_PLAYING, 200L, 1f) in updateDurationNoMetadata()
248 PlaybackState.Builder().run { in updateElapsedTime()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationMediaManager.java29 import android.media.session.PlaybackState;
72 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_NONE);
73 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_STOPPED);
74 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_PAUSED);
75 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_ERROR);
76 CONNECTING_MEDIA_STATES.add(PlaybackState.STATE_CONNECTING);
77 CONNECTING_MEDIA_STATES.add(PlaybackState.STATE_BUFFERING);
100 public void onPlaybackStateChanged(PlaybackState state) {
335 if (PlaybackState.STATE_PLAYING in findPlayingMediaNotification()
374 if (PlaybackState.STATE_PLAYING in findPlayingMediaNotification()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/volume/
DUtil.java24 import android.media.session.PlaybackState;
105 case PlaybackState.STATE_NONE: in playbackStateStateToString()
107 case PlaybackState.STATE_STOPPED: in playbackStateStateToString()
109 case PlaybackState.STATE_PAUSED: in playbackStateStateToString()
111 case PlaybackState.STATE_PLAYING: in playbackStateStateToString()
137 public static String playbackStateToString(PlaybackState playbackState) { in playbackStateToString()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/ui/viewmodel/
DSeekBarViewModel.kt21 import android.media.session.PlaybackState
48 private fun PlaybackState.isInMotion(): Boolean { in PlaybackState() method
49 return this.state == PlaybackState.STATE_PLAYING || in PlaybackState()
50 this.state == PlaybackState.STATE_FAST_FORWARDING || in PlaybackState()
51 this.state == PlaybackState.STATE_REWINDING in PlaybackState()
61 private fun PlaybackState.computePosition(duration: Long): Long { in computePosition() method
116 private var playbackState: PlaybackState? = null
119 override fun onPlaybackStateChanged(state: PlaybackState?) { in onPlaybackStateChanged()
121 if (playbackState == null || PlaybackState.STATE_NONE.equals(playbackState)) { in onPlaybackStateChanged()
237 val seekAvailable = ((playbackState?.actions ?: 0L) and PlaybackState.ACTION_SEEK_TO) != 0L in updateController()
[all …]
/frameworks/base/tests/FlickerTests/test-apps/flickerapp/src/com/android/server/wm/flicker/testapp/
DPipActivity.java20 import static android.media.session.PlaybackState.ACTION_PAUSE;
21 import static android.media.session.PlaybackState.ACTION_PLAY;
22 import static android.media.session.PlaybackState.ACTION_STOP;
23 import static android.media.session.PlaybackState.STATE_PAUSED;
24 import static android.media.session.PlaybackState.STATE_PLAYING;
25 import static android.media.session.PlaybackState.STATE_STOPPED;
44 import android.media.session.PlaybackState;
94 private final PlaybackState.Builder mPlaybackStateBuilder = new PlaybackState.Builder()
97 private PlaybackState mPlaybackState = mPlaybackStateBuilder.build();
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/domain/pipeline/
DMediaTimeoutListener.kt21 import android.media.session.PlaybackState in <lambda>()
79 lateinit var stateCallback: (String, PlaybackState) -> Unit in <lambda>()
208 var lastState: PlaybackState? = null in <lambda>()
252 override fun onPlaybackStateChanged(state: PlaybackState?) { in <lambda>()
271 state: PlaybackState?, in <lambda>()
341 first: List<PlaybackState.CustomAction>?, in <lambda>()
342 second: List<PlaybackState.CustomAction>? in <lambda>()
364 firstAction: PlaybackState.CustomAction, in <lambda>()
365 secondAction: PlaybackState.CustomAction in <lambda>()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/mediaoutput/domain/interactor/
DMediaOutputInteractorTest.kt22 import android.media.session.PlaybackState
164 localPlaybackStateBuilder.setState(PlaybackState.STATE_PLAYING, 0, 0f) in activeLocalAndRemoteSession_defaultSession_local()
165 remotePlaybackStateBuilder.setState(PlaybackState.STATE_PLAYING, 0, 0f) in activeLocalAndRemoteSession_defaultSession_local()
188 localPlaybackStateBuilder.setState(PlaybackState.STATE_PAUSED, 0, 0f) in activeRemoteSession_defaultSession_remote()
189 remotePlaybackStateBuilder.setState(PlaybackState.STATE_PLAYING, 0, 0f) in activeRemoteSession_defaultSession_remote()
212 localPlaybackStateBuilder.setState(PlaybackState.STATE_PAUSED, 0, 0f) in inactiveLocalAndRemoteSession_defaultSession_local()
213 remotePlaybackStateBuilder.setState(PlaybackState.STATE_PAUSED, 0, 0f) in inactiveLocalAndRemoteSession_defaultSession_local()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/mediaoutput/ui/viewmodel/
DMediaOutputViewModelTest.kt21 import android.media.session.PlaybackState
54 private val playbackStateBuilder = PlaybackState.Builder()
91 playbackStateBuilder.setState(PlaybackState.STATE_PLAYING, 0, 0f) in playingSession_connectedDeviceViewMode_hasTheDevice()
109 playbackStateBuilder.setState(PlaybackState.STATE_STOPPED, 0, 0f) in notPlaying_connectedDeviceViewMode_hasTheDevice()
128 playbackStateBuilder.setState(PlaybackState.STATE_STOPPED, 0, 0f) in notPlaying_inAudioSharing_deviceNameSetToAudioSharing()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/
DPipMediaController.kt31 import android.media.session.PlaybackState in <lambda>()
97 override fun onPlaybackStateChanged(state: PlaybackState?) { in <lambda>()
230 val playbackState: PlaybackState = mMediaController!!.playbackState in <lambda>()
238 actions and PlaybackState.ACTION_SKIP_TO_PREVIOUS != 0L in <lambda>()
242 if (!isPlaying && actions and PlaybackState.ACTION_PLAY != 0L) { in <lambda>()
244 } else if (isPlaying && actions and PlaybackState.ACTION_PAUSE != 0L) { in <lambda>()
250 actions and PlaybackState.ACTION_SKIP_TO_NEXT != 0L in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/panel/component/mediaoutput/domain/model/
DMediaControllerChangeModel.kt22 import android.media.session.PlaybackState
32 data class PlaybackStateChanged(val state: PlaybackState?) : MediaControllerChangeModel
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/volume/
DMediaControllerKosmos.kt25 import android.media.session.PlaybackState
44 var Kosmos.localPlaybackStateBuilder by Kosmos.Fixture { PlaybackState.Builder() } in <lambda>()
74 var Kosmos.remotePlaybackStateBuilder by Kosmos.Fixture { PlaybackState.Builder() } in <lambda>()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/media/controls/ui/viewmodel/
DMediaControlViewModelTest.kt24 import android.media.session.PlaybackState
101 PlaybackState.Builder().apply { in initMediaData()
102 setState(PlaybackState.STATE_PAUSED, 6000L, 1f) in initMediaData()
103 setActions(PlaybackState.ACTION_PLAY) in initMediaData()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/
DMediaOutputDialogTest.java35 import android.media.session.PlaybackState;
90 private PlaybackState mPlaybackState = mock(PlaybackState.class);
129 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_NONE); in setUp()
198 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in getStopButtonVisibility_remoteBLEDevice_returnVisible()
210 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in getStopButtonVisibility_remoteNonBLEDevice_returnGone()
318 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in getBroadcastIconVisibility_isBroadcasting_returnVisible()
330 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in getBroadcastIconVisibility_noBroadcasting_returnGone()
342 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_PLAYING); in getBroadcastIconVisibility_remoteNonLeDevice_returnGone()

123