Home
last modified time | relevance | path

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

12

/frameworks/base/media/java/android/media/
DRemoteControlClient.java26 import android.media.session.PlaybackState;
683 : PlaybackState.PLAYBACK_POSITION_UNKNOWN; in setPlaybackStateInt()
685 PlaybackState.Builder bob = new PlaybackState.Builder(mSessionPlaybackState); in setPlaybackStateInt()
716 PlaybackState.Builder bob = new PlaybackState.Builder(mSessionPlaybackState); in setTransportControlFlags()
912 private PlaybackState mSessionPlaybackState = null;
1037 return PlaybackState.STATE_BUFFERING; in getStateFromRccState()
1039 return PlaybackState.STATE_ERROR; in getStateFromRccState()
1041 return PlaybackState.STATE_FAST_FORWARDING; in getStateFromRccState()
1043 return PlaybackState.STATE_NONE; in getStateFromRccState()
1045 return PlaybackState.STATE_PAUSED; in getStateFromRccState()
[all …]
DRemoteController.java28 import android.media.session.PlaybackState;
213 PlaybackState state = mCurrentSession.getPlaybackState(); in getEstimatedMediaPosition()
464 public void onPlaybackStateChanged(PlaybackState state) { in onPlaybackStateChanged()
519 onNewPlaybackState((PlaybackState) msg.obj); in handleMessage()
617 PlaybackState state = controller.getPlaybackState(); in updateController()
629 private void onNewPlaybackState(PlaybackState state) { in onNewPlaybackState()
637 if (state == null || state.getPosition() == PlaybackState.PLAYBACK_POSITION_UNKNOWN) { in onNewPlaybackState()
/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:
DPlayerController.java23 import android.media.session.PlaybackState;
206 public void onPlaybackStateChanged(PlaybackState state) { in onPlaybackStateChanged()
229 public void onPlaybackStateChange(PlaybackState state); in onPlaybackStateChange()
/frameworks/base/media/java/android/media/session/
DPlaybackState.java38 public final class PlaybackState implements Parcelable { class
289 private List<PlaybackState.CustomAction> mCustomActions;
295 private PlaybackState(int state, long position, long updateTime, float speed, in PlaybackState() method in PlaybackState
297 List<PlaybackState.CustomAction> customActions, long activeItemId, in PlaybackState()
311 private PlaybackState(Parcel in) { in PlaybackState() method in PlaybackState
440 public List<PlaybackState.CustomAction> getCustomActions() { in getCustomActions()
483 public static final @android.annotation.NonNull Parcelable.Creator<PlaybackState> CREATOR =
484 new Parcelable.Creator<PlaybackState>() {
486 public PlaybackState createFromParcel(Parcel in) {
487 return new PlaybackState(in);
[all …]
DMediaSession.java140 private PlaybackState mPlaybackState;
433 public void setPlaybackState(@Nullable PlaybackState state) { in setPlaybackState()
599 case PlaybackState.STATE_FAST_FORWARDING: in isActiveState()
600 case PlaybackState.STATE_REWINDING: in isActiveState()
601 case PlaybackState.STATE_SKIPPING_TO_PREVIOUS: in isActiveState()
602 case PlaybackState.STATE_SKIPPING_TO_NEXT: in isActiveState()
603 case PlaybackState.STATE_BUFFERING: in isActiveState()
604 case PlaybackState.STATE_CONNECTING: in isActiveState()
605 case PlaybackState.STATE_PLAYING: in isActiveState()
887 PlaybackState state = mSession.mPlaybackState; in onMediaButtonEvent()
[all …]
DISessionControllerCallback.aidl21 import android.media.session.PlaybackState;
32 void onPlaybackStateChanged(in PlaybackState state); in onPlaybackStateChanged()
DISession.aidl23 import android.media.session.PlaybackState;
43 void setPlaybackState(in PlaybackState state); in setPlaybackState()
DPlaybackState.aidl18 parcelable PlaybackState;
DISessionController.aidl26 import android.media.session.PlaybackState;
84 PlaybackState getPlaybackState(); in getPlaybackState()
DMediaController.java146 public @Nullable PlaybackState getPlaybackState() { in getPlaybackState()
564 public void onPlaybackStateChanged(@Nullable PlaybackState state) { in onPlaybackStateChanged()
922 public void sendCustomAction(@NonNull PlaybackState.CustomAction customAction, in sendCustomAction()
1107 public void onPlaybackStateChanged(PlaybackState state) { in onPlaybackStateChanged()
1174 mCallback.onPlaybackStateChanged((PlaybackState) msg.obj); in handleMessage()
/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()
DMediaSessions.java34 import android.media.session.PlaybackState;
226 final PlaybackState playbackState = c.getPlaybackState(); in dump()
300 public void onPlaybackStateChanged(PlaybackState state) { in onPlaybackStateChanged()
/frameworks/base/services/core/java/com/android/server/media/
DMediaSessionStack.java21 import android.media.session.PlaybackState;
58 PlaybackState.STATE_FAST_FORWARDING,
59 PlaybackState.STATE_REWINDING,
60 PlaybackState.STATE_SKIPPING_TO_PREVIOUS,
61 PlaybackState.STATE_SKIPPING_TO_NEXT };
67 PlaybackState.STATE_BUFFERING,
68 PlaybackState.STATE_CONNECTING,
69 PlaybackState.STATE_PLAYING };
DMediaSessionRecord.java38 import android.media.session.PlaybackState;
103 private PlaybackState mPlaybackState;
368 public PlaybackState getPlaybackState() { in getPlaybackState()
378 int state = mPlaybackState == null ? PlaybackState.STATE_NONE : mPlaybackState.getState(); in isPlaybackActive()
729 private PlaybackState getStateWithUpdatedPosition() { in getStateWithUpdatedPosition()
730 PlaybackState state; in getStateWithUpdatedPosition()
739 PlaybackState result = null; in getStateWithUpdatedPosition()
741 if (state.getState() == PlaybackState.STATE_PLAYING in getStateWithUpdatedPosition()
742 || state.getState() == PlaybackState.STATE_FAST_FORWARDING in getStateWithUpdatedPosition()
743 || state.getState() == PlaybackState.STATE_REWINDING) { in getStateWithUpdatedPosition()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationMediaManager.java41 import android.media.session.PlaybackState;
101 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_NONE);
102 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_STOPPED);
103 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_PAUSED);
104 PAUSED_MEDIA_STATES.add(PlaybackState.STATE_ERROR);
160 public void onPlaybackStateChanged(PlaybackState state) {
294 if (PlaybackState.STATE_PLAYING == in findAndUpdateMediaNotifications()
320 if (PlaybackState.STATE_PLAYING == in findAndUpdateMediaNotifications()
382 @PlaybackState.State int state = getMediaControllerPlaybackState(mMediaController); in dispatchUpdateMediaMetaData()
410 return state != PlaybackState.STATE_STOPPED && state != PlaybackState.STATE_ERROR in isPlaybackActive()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/
DNotificationMediaTemplateViewWrapper.java28 import android.media.session.PlaybackState;
100 PlaybackState state = mMediaController.getPlaybackState();
101 if (state != null && state.getState() == PlaybackState.STATE_PLAYING
136 public void onPlaybackStateChanged(@Nullable PlaybackState state) {
141 if (state.getState() != PlaybackState.STATE_PLAYING) {
286 private boolean canSeekMedia(@Nullable PlaybackState state) { in canSeekMedia()
292 return ((actions & PlaybackState.ACTION_SEEK_TO) != 0); in canSeekMedia()
320 PlaybackState playbackState = mMediaController.getPlaybackState();
332 private void updatePlaybackUi(PlaybackState state) { in updatePlaybackUi()
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/
DPipMediaController.java35 import android.media.session.PlaybackState;
97 public void onPlaybackStateChanged(PlaybackState state) {
173 mPrevAction.setEnabled((actions & PlaybackState.ACTION_SKIP_TO_PREVIOUS) != 0); in getMediaActions()
177 if (!isPlaying && ((actions & PlaybackState.ACTION_PLAY) != 0)) { in getMediaActions()
179 } else if (isPlaying && ((actions & PlaybackState.ACTION_PAUSE) != 0)) { in getMediaActions()
184 mNextAction.setEnabled((actions & PlaybackState.ACTION_SKIP_TO_NEXT) != 0); in getMediaActions()
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/tv/
DPipManager.java41 import android.media.session.PlaybackState;
596 boolean isPlaying = (state == PlaybackState.STATE_BUFFERING in getPlaybackState()
597 || state == PlaybackState.STATE_CONNECTING in getPlaybackState()
598 || state == PlaybackState.STATE_PLAYING in getPlaybackState()
599 || state == PlaybackState.STATE_FAST_FORWARDING in getPlaybackState()
600 || state == PlaybackState.STATE_REWINDING in getPlaybackState()
601 || state == PlaybackState.STATE_SKIPPING_TO_PREVIOUS in getPlaybackState()
602 || state == PlaybackState.STATE_SKIPPING_TO_NEXT); in getPlaybackState()
604 if (!isPlaying && ((actions & PlaybackState.ACTION_PLAY) != 0)) { in getPlaybackState()
606 } else if (isPlaying && ((actions & PlaybackState.ACTION_PAUSE) != 0)) { in getPlaybackState()
DPipNotification.java31 import android.media.session.PlaybackState;
100 public void onPlaybackStateChanged(PlaybackState state) {
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/
DNotificationMediaTemplateViewWrapperTest.java27 import android.media.session.PlaybackState;
84 PlaybackState playbackState = new PlaybackState.Builder() in makeTestNotification()
85 .setActions(allowSeeking ? PlaybackState.ACTION_SEEK_TO : 0) in makeTestNotification()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DKeyguardSliceProviderTest.java32 import android.media.session.PlaybackState;
125 mProvider.onMetadataOrStateChanged(metadata, PlaybackState.STATE_PLAYING); in onBindSlice_readsMedia_withoutBypass()
138 mProvider.onMetadataOrStateChanged(metadata, PlaybackState.STATE_PLAYING); in onBindSlice_readsMedia_withBypass_notDozing()
204 mProvider.onMetadataOrStateChanged(mock(MediaMetadata.class), PlaybackState.STATE_PLAYING); in onMetadataChanged_updatesSlice()
216 mProvider.onMetadataOrStateChanged(mock(MediaMetadata.class), PlaybackState.STATE_PLAYING); in onDozingChanged_updatesSliceIfMedia()

12