Home
last modified time | relevance | path

Searched refs:mediaPlayer (Results 1 – 10 of 10) sorted by relevance

/cts/tests/tests/media/src/android/media/cts/
DRoutingTest.java571 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, resid); in allocMediaPlayer() local
572 mediaPlayer.setAudioAttributes( in allocMediaPlayer()
574 mediaPlayer.start(); in allocMediaPlayer()
575 return mediaPlayer; in allocMediaPlayer()
584 MediaPlayer mediaPlayer = allocMediaPlayer(); in test_mediaPlayer_preferredDevice() local
585 assertTrue(mediaPlayer.isPlaying()); in test_mediaPlayer_preferredDevice()
588 assertNull(mediaPlayer.getPreferredDevice()); in test_mediaPlayer_preferredDevice()
591 assertTrue(mediaPlayer.setPreferredDevice(null)); in test_mediaPlayer_preferredDevice()
596 assertTrue(mediaPlayer.setPreferredDevice(deviceList[index])); in test_mediaPlayer_preferredDevice()
597 assertTrue(mediaPlayer.getPreferredDevice() == deviceList[index]); in test_mediaPlayer_preferredDevice()
[all …]
DAudioPlaybackCaptureTest.java171 MediaPlayer mediaPlayer = MediaPlayer.create( in createMediaPlayer() local
180 mediaPlayer.setLooping(true); in createMediaPlayer()
181 return mediaPlayer; in createMediaPlayer()
215 MediaPlayer mediaPlayer = createMediaPlayer(capturePolicy, R.raw.testwav_16bit_44100hz, in testPlaybackCapture() local
219 mediaPlayer.start(); in testPlaybackCapture()
228 mediaPlayer.start(); in testPlaybackCapture()
231 mediaPlayer.stop(); in testPlaybackCapture()
244 mediaPlayer.release(); in testPlaybackCapture()
397 MediaPlayer mediaPlayer = createMediaPlayer(ALLOW_CAPTURE_BY_ALL, in testStopMediaProjectionDuringCapture() local
400 mediaPlayer.start(); in testStopMediaProjectionDuringCapture()
[all …]
DUtils.java156 MediaPlayer mediaPlayer = null; in assertMediaPlaybackStarted() local
163 mediaPlayer = MediaPlayer.create(context, R.raw.sine1khzs40dblong); in assertMediaPlaybackStarted()
164 mediaPlayer.start(); in assertMediaPlaybackStarted()
173 if (mediaPlayer != null) { in assertMediaPlaybackStarted()
174 mediaPlayer.stop(); in assertMediaPlaybackStarted()
175 mediaPlayer.release(); in assertMediaPlaybackStarted()
176 mediaPlayer = null; in assertMediaPlaybackStarted()
DVolumeShaperTest.java200 final MediaPlayer mediaPlayer = MediaPlayer.create(getContext(), in createMediaPlayer() local
208 mediaPlayer.setWakeMode(getContext(), PowerManager.PARTIAL_WAKE_LOCK); in createMediaPlayer()
209 mediaPlayer.setLooping(true); in createMediaPlayer()
210 return mediaPlayer; in createMediaPlayer()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAudioRestrictionTest.java98 MediaPlayer mediaPlayer = new MediaPlayer(); in testDisallowAdjustVolume() local
99 mediaPlayer.setDataSource(mContext, uri); in testDisallowAdjustVolume()
100 mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in testDisallowAdjustVolume()
101 mediaPlayer.prepare(); in testDisallowAdjustVolume()
102 mediaPlayer.setLooping(true); in testDisallowAdjustVolume()
103 mediaPlayer.start(); in testDisallowAdjustVolume()
138 mediaPlayer.stop(); in testDisallowAdjustVolume()
139 mediaPlayer.release(); in testDisallowAdjustVolume()
140 mediaPlayer = null; in testDisallowAdjustVolume()
/cts/tests/tests/permission/src/android/permission/cts/
DNoWakeLockPermissionTest.java70 final MediaPlayer mediaPlayer = new MediaPlayer(); in testMediaPlayerWakeLock() local
71 mediaPlayer.setWakeMode(mContext, PowerManager.FULL_WAKE_LOCK); in testMediaPlayerWakeLock()
73 mediaPlayer.start(); in testMediaPlayerWakeLock()
79 mediaPlayer.stop(); in testMediaPlayerWakeLock()
/cts/tests/tests/netsecpolicy/src/android/security/
DNetworkSecurityPolicyTestBase.java161 MediaPlayer mediaPlayer = new MediaPlayer(); in assertMediaPlayerCleartextRequestSucceeds() local
163 mediaPlayer.setDataSource(getContext(), uri); in assertMediaPlayerCleartextRequestSucceeds()
166 mediaPlayer.prepare(); in assertMediaPlayerCleartextRequestSucceeds()
170 mediaPlayer.stop(); in assertMediaPlayerCleartextRequestSucceeds()
179 MediaPlayer mediaPlayer = new MediaPlayer(); in assertMediaPlayerCleartextRequestBlocked() local
181 mediaPlayer.setDataSource(getContext(), uri); in assertMediaPlayerCleartextRequestBlocked()
184 mediaPlayer.prepare(); in assertMediaPlayerCleartextRequestBlocked()
188 mediaPlayer.stop(); in assertMediaPlayerCleartextRequestBlocked()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodPresentMediaDialog.java182 final MediaPlayer mediaPlayer = new MediaPlayer(); in onCreateDialog() local
188 mediaPlayer.setDataSource(getActivity(), uri); in onCreateDialog()
189 mediaPlayer.prepare(); in onCreateDialog()
198 mediaPlayer.setOnPreparedListener(new OnPreparedListener() { in onCreateDialog()
204 mediaPlayer.start(); in onCreateDialog()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DCtsConnection.java180 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, R.raw.telecom_test_call_audio, in createMediaPlayer() local
182 mediaPlayer.setLooping(true); in createMediaPlayer()
183 return mediaPlayer; in createMediaPlayer()
/cts/hostsidetests/statsd/apps/statsdapp/src/com/android/server/cts/device/statsd/
DAtomTests.java77 MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.good); in testAudioState() local
78 mediaPlayer.start(); in testAudioState()
80 mediaPlayer.stop(); in testAudioState()