/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/widget/ |
D | VideoPreference.java | 48 MediaPlayer mMediaPlayer; field in VideoPreference 94 if (mMediaPlayer != null && mMediaPlayer.getDuration() > 0) { in initialize() 133 if (mMediaPlayer != null) { in onBindViewHolder() 135 mMediaPlayer.setSurface(mSurface); in onBindViewHolder() 159 if (!mVideoPaused && mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in onBindViewHolder() 160 mMediaPlayer.start(); in onBindViewHolder() 164 if (mMediaPlayer != null && !mMediaPlayer.isPlaying() && in onBindViewHolder() 174 if (mMediaPlayer != null) { in updateViewStates() 175 if (mMediaPlayer.isPlaying()) { in updateViewStates() 176 mMediaPlayer.pause(); in updateViewStates() [all …]
|
/packages/apps/Settings/src/com/android/settings/widget/ |
D | VideoPreference.java | 50 MediaPlayer mMediaPlayer; field in VideoPreference 99 if (mMediaPlayer != null && mMediaPlayer.getDuration() > 0) { in initialize() 142 if (mMediaPlayer != null) { in onBindViewHolder() 144 mMediaPlayer.setSurface(mSurface); in onBindViewHolder() 168 if (!mVideoPaused && mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in onBindViewHolder() 169 mMediaPlayer.start(); in onBindViewHolder() 173 if (mMediaPlayer != null && !mMediaPlayer.isPlaying() && in onBindViewHolder() 183 if (mMediaPlayer != null) { in updateViewStates() 184 if (mMediaPlayer.isPlaying()) { in updateViewStates() 185 mMediaPlayer.pause(); in updateViewStates() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/biometrics/fingerprint/ |
D | FingerprintLocationAnimationVideoView.java | 42 protected MediaPlayer mMediaPlayer; field in FingerprintLocationAnimationVideoView 71 if (mMediaPlayer != null) { in onFinishInflate() 72 mMediaPlayer.release(); in onFinishInflate() 78 mMediaPlayer = createMediaPlayer(mContext, videoUri); in onFinishInflate() 79 if (mMediaPlayer == null) { in onFinishInflate() 83 mMediaPlayer.setSurface(new Surface(surfaceTexture)); in onFinishInflate() 84 mMediaPlayer.setOnPreparedListener(new OnPreparedListener() { in onFinishInflate() 90 mMediaPlayer.setOnInfoListener(new OnInfoListener() { in onFinishInflate() 100 mAspect = (float) mMediaPlayer.getVideoHeight() / mMediaPlayer.getVideoWidth(); in onFinishInflate() 137 if (mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in startAnimation() [all …]
|
/packages/apps/Settings/src/com/android/settings/biometrics/fingerprint/ |
D | FingerprintLocationAnimationVideoView.java | 42 protected MediaPlayer mMediaPlayer; field in FingerprintLocationAnimationVideoView 71 if (mMediaPlayer != null) { in onFinishInflate() 72 mMediaPlayer.release(); in onFinishInflate() 78 mMediaPlayer = createMediaPlayer(mContext, videoUri); in onFinishInflate() 79 if (mMediaPlayer == null) { in onFinishInflate() 83 mMediaPlayer.setSurface(new Surface(surfaceTexture)); in onFinishInflate() 84 mMediaPlayer.setOnPreparedListener(new OnPreparedListener() { in onFinishInflate() 90 mMediaPlayer.setOnInfoListener(new OnInfoListener() { in onFinishInflate() 100 mAspect = (float) mMediaPlayer.getVideoHeight() / mMediaPlayer.getVideoWidth(); in onFinishInflate() 137 if (mMediaPlayer != null && !mMediaPlayer.isPlaying()) { in startAnimation() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/ui/ |
D | AudioAttachmentView.java | 68 private MediaPlayer mMediaPlayer; field in AudioAttachmentView 117 if (mMediaPlayer != null && mPrepared) { in onFinishInflate() 118 if (mMediaPlayer.isPlaying()) { in onFinishInflate() 119 mMediaPlayer.pause(); in onFinishInflate() 194 Assert.notNull(mMediaPlayer); in playAudio() 196 mMediaPlayer.seekTo(0); in playAudio() 204 mMediaPlayer.start(); in playAudio() 223 if (mMediaPlayer == null) { in setupMediaPlayer() 225 mMediaPlayer = new MediaPlayer(); in setupMediaPlayer() 228 mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in setupMediaPlayer() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | AsyncRingtonePlayer.java | 267 private MediaPlayer mMediaPlayer; 297 mMediaPlayer = new MediaPlayer(); 298 mMediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() { 311 mMediaPlayer.setDataSource(context, alarmNoise); 320 mMediaPlayer.reset(); 321 mMediaPlayer.setDataSource(context, getFallbackRingtoneUri(context)); 349 mMediaPlayer.setAudioAttributes(new AudioAttributes.Builder() 360 mMediaPlayer.setVolume(IN_CALL_VOLUME, IN_CALL_VOLUME); 362 mMediaPlayer.setVolume(0, 0); 369 mMediaPlayer.setAudioStreamType(STREAM_ALARM); [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | VideoPreferenceTest.java | 56 private MediaPlayer mMediaPlayer; field in VideoPreferenceTest 71 mVideoPreference.mMediaPlayer = mMediaPlayer; in setUp() 72 when(mMediaPlayer.getVideoWidth()).thenReturn(VIDEO_WIDTH); in setUp() 73 when(mMediaPlayer.getVideoHeight()).thenReturn(VIDEO_HEIGHT); in setUp() 99 when(mMediaPlayer.isPlaying()).thenReturn(false); in onSurfaceTextureUpdated_viewInvisible_shouldNotStartPlayingVideo() 104 verify(mMediaPlayer, never()).start(); in onSurfaceTextureUpdated_viewInvisible_shouldNotStartPlayingVideo() 113 verify(mMediaPlayer).release(); in onViewInvisible_shouldReleaseMediaplayer() 118 when(mMediaPlayer.isPlaying()).thenReturn(true); in updateViewStates_paused_updatesViews() 122 verify(mMediaPlayer).pause(); in updateViewStates_paused_updatesViews() 127 when(mMediaPlayer.isPlaying()).thenReturn(false); in updateViewStates_playing_updatesViews() [all …]
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastAlertAudio.java | 130 private MediaPlayer mMediaPlayer; field in CellBroadcastAlertAudio 451 mMediaPlayer = new MediaPlayer(); in playAlertTone() 452 mMediaPlayer.setOnErrorListener(new OnErrorListener() { in playAlertTone() 466 mMediaPlayer.setOnCompletionListener(new OnCompletionListener() { in playAlertTone() 481 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_earthquake); in playAlertTone() 484 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_tsunami); in playAlertTone() 487 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_other_disaster); in playAlertTone() 490 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_default); in playAlertTone() 493 setDataSourceFromResource(res, mMediaPlayer, R.raw.info); in playAlertTone() 498 setDataSourceFromResource(res, mMediaPlayer, R.raw.default_tone); in playAlertTone() [all …]
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/activity/ |
D | VideoPlayerActivity.java | 48 private MediaPlayer mMediaPlayer; field in VideoPlayerActivity 72 mMediaPlayer = new MediaPlayer(VideoPlayerActivity.this); in onCreate() 77 mMediaPlayer.setAudioAttributes(audioAttributes); in onCreate() 78 mVideoView.setPlayer(mMediaPlayer); in onCreate() 85 outState.putLong(SAVED_POSITION_KEY, mMediaPlayer.getCurrentPosition()); in onSaveInstanceState() 106 mMediaPlayer.setMediaItem(mediaItem) in handleIntent() 111 mMediaPlayer.seekTo(mSavedPosition); in handleIntent() 114 mMediaPlayer.play(); in handleIntent() 123 if (mMediaPlayer != null) { in onDestroy() 124 mMediaPlayer.close(); in onDestroy()
|
D | AudioPlayerActivity.java | 49 private MediaPlayer mMediaPlayer; field in AudioPlayerActivity 124 mMediaPlayer = new MediaPlayer(AudioPlayerActivity.this); in onCreate() 129 mMediaPlayer.setAudioAttributes(audioAttributes); in onCreate() 130 mVideoView.setPlayer(mMediaPlayer); in onCreate() 152 mMediaPlayer.setMediaItem(mediaItem); in handleIntent() 159 if (mMediaPlayer != null) { in onDestroy() 160 mMediaPlayer.close(); in onDestroy()
|
/packages/apps/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/ |
D | Player.java | 96 private final MediaPlayer mMediaPlayer; field in Player 108 mMediaPlayer = new MediaPlayer(); in Player() 109 mMediaPlayer.reset(); in Player() 110 mMediaPlayer.setOnCompletionListener(mOnCompletionListener); in Player() 196 mMediaPlayer.release(); in destroy() 221 playlist.currentSongPosition = mMediaPlayer.getCurrentPosition(); in saveState() 287 mMediaPlayer.seekTo(playlist.currentSongPosition); in maybeRestoreState() 349 if (!mMediaPlayer.isPlaying()) { in resumePlayback() 350 mMediaPlayer.start(); in resumePlayback() 378 mMediaPlayer.getCurrentPosition(), PLAYBACK_SPEED) in updatePlaybackStatePlaying() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | InCallTonePlayer.java | 91 private MediaPlayer mMediaPlayer; field in InCallTonePlayer.MediaPlayerAdapterImpl 101 mMediaPlayer = mediaPlayer; in MediaPlayerAdapterImpl() 106 if (mMediaPlayer != null) { in setLooping() 107 mMediaPlayer.setLooping(isLooping); in setLooping() 113 if (mMediaPlayer != null) { in setOnCompletionListener() 114 mMediaPlayer.setOnCompletionListener(listener); in setOnCompletionListener() 120 if (mMediaPlayer != null) { in start() 121 mMediaPlayer.start(); in start() 127 if (mMediaPlayer != null) { in release() 128 mMediaPlayer.release(); in release() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkStreamHandler.java | 100 private MediaPlayer mMediaPlayer = null; field in A2dpSinkStreamHandler 298 if (mMediaPlayer == null) { in requestMediaKeyFocus() 303 mMediaPlayer = MediaPlayer.create(mContext, R.raw.silent, attrs, in requestMediaKeyFocus() 305 if (mMediaPlayer == null) { in requestMediaKeyFocus() 310 mMediaPlayer.setLooping(false); in requestMediaKeyFocus() 311 mMediaPlayer.setOnErrorListener((mp, what, extra) -> { in requestMediaKeyFocus() 318 mMediaPlayer.start(); in requestMediaKeyFocus() 335 if (mMediaPlayer == null) { in releaseMediaKeyFocus() 339 mMediaPlayer.stop(); in releaseMediaKeyFocus() 340 mMediaPlayer.release(); in releaseMediaKeyFocus() [all …]
|
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/ |
D | SelfManagedConnection.java | 59 private final MediaPlayer mMediaPlayer; field in SelfManagedConnection 68 mMediaPlayer = createMediaPlayer(context); in SelfManagedConnection() 149 if (mMediaPlayer != null) { in onHold() 150 mMediaPlayer.pause(); in onHold() 157 if (mMediaPlayer != null) { in onUnhold() 158 mMediaPlayer.start(); in onUnhold() 193 mMediaPlayer.start(); in setConnectionActive() 201 mMediaPlayer.pause(); in setConnectionHeld() 212 mMediaPlayer.stop(); in setConnectionDisconnected()
|
D | TestConnectionService.java | 341 private MediaPlayer mMediaPlayer; 351 mMediaPlayer = null; 536 if (mMediaPlayer == null) { 537 mMediaPlayer = createMediaPlayer(); 539 if (!mMediaPlayer.isPlaying()) { 540 mMediaPlayer.start(); 552 if (mCalls.isEmpty() && mMediaPlayer != null && mMediaPlayer.isPlaying()) { 553 mMediaPlayer.stop(); 554 mMediaPlayer.release(); 555 mMediaPlayer = createMediaPlayer();
|
/packages/apps/Messaging/tests/src/com/android/messaging/util/ |
D | FakeMediaUtil.java | 22 private final MediaPlayer mMediaPlayer; field in FakeMediaUtil 24 mMediaPlayer = mediaPlayer; in FakeMediaUtil()
|