/packages/apps/Settings/src/com/android/settings/widget/ |
D | MediaAnimationController.java | 34 private MediaPlayer mMediaPlayer; field in MediaAnimationController 43 mMediaPlayer = MediaPlayer.create(context, videoPath); in MediaAnimationController() 46 if (mMediaPlayer != null) { in MediaAnimationController() 47 mMediaPlayer.seekTo(0); in MediaAnimationController() 48 mMediaPlayer.setOnSeekCompleteListener(mp -> mVideoReady = true); in MediaAnimationController() 49 mMediaPlayer.setOnPreparedListener(mediaPlayer -> mediaPlayer.setLooping(true)); in MediaAnimationController() 55 return mMediaPlayer.getVideoWidth(); in getVideoWidth() 60 return mMediaPlayer.getVideoHeight(); in getVideoHeight() 65 mMediaPlayer.pause(); in pause() 70 mMediaPlayer.start(); in start() [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/services/Telecomm/testapps/callaudiotest/src/com/android/server/telecom/callaudiotest/ |
D | CallAudioTestInCallService.java | 42 private MediaPlayer mMediaPlayer; field in CallAudioTestInCallService 81 if (mMediaPlayer != null) { in onCallRemoved() 82 mMediaPlayer.stop(); in onCallRemoved() 83 mMediaPlayer.release(); in onCallRemoved() 92 mMediaPlayer = new MediaPlayer(); in startPlaying() 93 mMediaPlayer.setOnCompletionListener(mediaPlayer -> Log.w(this, "startPlaying: done")); in startPlaying() 94 mMediaPlayer.setOnErrorListener( in startPlaying() 99 mMediaPlayer.setLooping(true); in startPlaying() 100 mMediaPlayer.setVolume(1.0f); in startPlaying() 103 mMediaPlayer.setAudioAttributes(audioAttributes); in startPlaying() [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.kt | 212 private var mMediaPlayer: MediaPlayer? = null in <lambda>() variable in com.android.deskclock.AsyncRingtonePlayer.MediaPlayerPlaybackDelegate 241 mMediaPlayer = MediaPlayer() in <lambda>() 242 mMediaPlayer!!.setOnErrorListener { _, _, _ -> in <lambda>() 252 mMediaPlayer!!.setDataSource(context, alarmNoise!!) in <lambda>() 261 mMediaPlayer!!.reset() in <lambda>() 262 mMediaPlayer!!.setDataSource(context, getFallbackRingtoneUri(context)) in <lambda>() 290 mMediaPlayer!!.setAudioAttributes(AudioAttributes.Builder() in <lambda>() 301 mMediaPlayer!!.setVolume(IN_CALL_VOLUME, IN_CALL_VOLUME) in <lambda>() 303 mMediaPlayer!!.setVolume(0f, 0f) in <lambda>() 310 mMediaPlayer!!.setAudioStreamType(AudioManager.STREAM_ALARM) in <lambda>() [all …]
|
/packages/apps/EmergencyInfo/EmergencyGestureAction/src/com/android/emergency/action/sensoryfeedback/ |
D | EmergencyActionAlarmHelper.java | 35 private MediaPlayer mMediaPlayer; field in EmergencyActionAlarmHelper 59 if (mMediaPlayer == null) { in playWarningSound() 60 mMediaPlayer = MediaPlayer.create( in playWarningSound() 70 mMediaPlayer.setOnCompletionListener(mp -> mp.release()); in playWarningSound() 71 mMediaPlayer.setOnErrorListener( in playWarningSound() 80 mMediaPlayer.start(); in playWarningSound() 84 if (mMediaPlayer != null) { in stopWarningSound() 86 mMediaPlayer.stop(); in stopWarningSound() 87 mMediaPlayer.release(); in stopWarningSound() 91 mMediaPlayer = null; in stopWarningSound()
|
/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/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkStreamHandler.java | 89 private MediaPlayer mMediaPlayer = null; field in A2dpSinkStreamHandler 283 if (mMediaPlayer == null) { in requestMediaKeyFocus() 287 mMediaPlayer = in requestMediaKeyFocus() 293 if (mMediaPlayer == null) { in requestMediaKeyFocus() 298 mMediaPlayer.setLooping(false); in requestMediaKeyFocus() 299 mMediaPlayer.setOnErrorListener( in requestMediaKeyFocus() 307 mMediaPlayer.start(); in requestMediaKeyFocus() 323 if (mMediaPlayer == null) { in releaseMediaKeyFocus() 326 mMediaPlayer.stop(); in releaseMediaKeyFocus() 327 mMediaPlayer.release(); in releaseMediaKeyFocus() [all …]
|
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/ |
D | CellBroadcastAlertAudio.java | 148 private MediaPlayer mMediaPlayer; field in CellBroadcastAlertAudio 518 mMediaPlayer = mMediaPlayerInjected != null ? mMediaPlayerInjected : new MediaPlayer(); in playAlertTone() 519 mMediaPlayer.setOnErrorListener(new OnErrorListener() { in playAlertTone() 530 mMediaPlayer.setOnCompletionListener(new OnCompletionListener() { in playAlertTone() 545 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_earthquake); in playAlertTone() 548 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_tsunami); in playAlertTone() 551 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_other_disaster); in playAlertTone() 554 setDataSourceFromResource(res, mMediaPlayer, R.raw.etws_default); in playAlertTone() 560 setDataSourceFromResource(res, mMediaPlayer, R.raw.watch_info); in playAlertTone() 562 mMediaPlayer.setDataSource(this, in playAlertTone() [all …]
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | InCallTonePlayer.java | 92 private MediaPlayer mMediaPlayer; field in InCallTonePlayer.MediaPlayerAdapterImpl 102 mMediaPlayer = mediaPlayer; in MediaPlayerAdapterImpl() 107 if (mMediaPlayer != null) { in setLooping() 108 mMediaPlayer.setLooping(isLooping); in setLooping() 114 if (mMediaPlayer != null) { in setOnCompletionListener() 115 mMediaPlayer.setOnCompletionListener(listener); in setOnCompletionListener() 121 if (mMediaPlayer != null) { in start() 122 mMediaPlayer.start(); in start() 128 if (mMediaPlayer != null) { in release() 129 mMediaPlayer.release(); in release() [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/Car/LocalMediaPlayer/src/com/android/car/media/localmediaplayer/ |
D | Player.java | 99 private final MediaPlayer mMediaPlayer; field in Player 111 mMediaPlayer = new MediaPlayer(); in Player() 112 mMediaPlayer.reset(); in Player() 113 mMediaPlayer.setOnCompletionListener(mOnCompletionListener); in Player() 202 mMediaPlayer.release(); in destroy() 227 playlist.currentSongPosition = mMediaPlayer.getCurrentPosition(); in saveState() 317 mMediaPlayer.seekTo(playlist.currentSongPosition); in maybeRestoreState() 379 if (!mMediaPlayer.isPlaying()) { in resumePlayback() 380 mMediaPlayer.start(); in resumePlayback() 410 mMediaPlayer.getCurrentPosition(), PLAYBACK_SPEED) in updatePlaybackStatePlaying() [all …]
|
/packages/modules/Bluetooth/android/pandora/server/src/ |
D | MediaPlayerBrowserService.kt | 41 private var mMediaPlayer: MediaPlayer? = null variable in com.android.pandora.MediaPlayerBrowserService 87 if (mMediaPlayer == null) { in startTestPlayback() 91 mMediaPlayer = MediaPlayer.create(this, resourceId) in startTestPlayback() 92 if (mMediaPlayer == null) { in startTestPlayback() 98 mMediaPlayer?.setOnCompletionListener { stopTestPlayback() } in startTestPlayback() 100 mMediaPlayer?.start() in startTestPlayback() 104 mMediaPlayer?.stop() in stopTestPlayback() 105 mMediaPlayer?.setOnCompletionListener(null) in stopTestPlayback() 106 mMediaPlayer?.release() in stopTestPlayback() 107 mMediaPlayer = null in stopTestPlayback()
|
/packages/services/Telecomm/testapps/transactionalVoipApp/src/com/android/server/telecom/transactionalVoipApp/ |
D | InCallActivity.java | 46 private MediaPlayer mMediaPlayer; field in InCallActivity 70 mMediaPlayer = Utils.createMediaPlayer(getApplicationContext()); in onCreate() 87 mMediaPlayer.start(); in onCreate() 100 mMediaPlayer.start(); in onCreate() 114 mMediaPlayer.pause(); in onCreate() 275 mMediaPlayer.stop(); in disconnectAndStopAudio()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audiorecorder/ |
D | AudioRecorderTestFragment.java | 120 private MediaPlayer mMediaPlayer; field in AudioRecorderTestFragment 202 writer.printf("Is playing: %s\n", (mMediaPlayer != null && mMediaPlayer.isPlaying())); in dumpPlaybackState() 277 mMediaPlayer = mediaPlayer; in startPlayback() 284 if (mMediaPlayer == null) { in stopPlayback() 289 mMediaPlayer.stop(); in stopPlayback() 290 mMediaPlayer = null; in stopPlayback()
|
/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()
|
/packages/apps/Car/Notification/tests/robotests/src/com/android/car/notification/ |
D | BeeperTest.java | 72 private MediaPlayer mMediaPlayer; field in BeeperTest 106 this.mMediaPlayer = mediaPlayer; in onCreate() 195 assertThat(mMediaPlayer.isPlaying()).isFalse(); in testHandlesPreparedAfterStopped()
|