Home
last modified time | relevance | path

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

/cts/tests/tests/media/audio/src/android/media/audio/cts/
DRoutingTest.java608 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, resid); in allocMediaPlayer() local
609 mediaPlayer.setAudioAttributes( in allocMediaPlayer()
612 mediaPlayer.setPreferredDevice(device); in allocMediaPlayer()
615 mediaPlayer.start(); in allocMediaPlayer()
617 return mediaPlayer; in allocMediaPlayer()
626 MediaPlayer mediaPlayer = allocMediaPlayer(); in test_mediaPlayer_preferredDevice() local
627 assertTrue(mediaPlayer.isPlaying()); in test_mediaPlayer_preferredDevice()
630 assertNull(mediaPlayer.getPreferredDevice()); in test_mediaPlayer_preferredDevice()
633 mediaPlayer.pause(); in test_mediaPlayer_preferredDevice()
636 assertTrue(mediaPlayer.setPreferredDevice(null)); in test_mediaPlayer_preferredDevice()
[all …]
DAudioPlaybackCaptureTest.java180 MediaPlayer mediaPlayer = MediaPlayer.create( in createMediaPlayer() local
189 mediaPlayer.setLooping(true); in createMediaPlayer()
190 return mediaPlayer; in createMediaPlayer()
224 MediaPlayer mediaPlayer = createMediaPlayer(capturePolicy, R.raw.testwav_16bit_44100hz, in testPlaybackCapture() local
228 mediaPlayer.start(); in testPlaybackCapture()
237 mediaPlayer.start(); in testPlaybackCapture()
240 mediaPlayer.stop(); in testPlaybackCapture()
253 mediaPlayer.release(); in testPlaybackCapture()
419 MediaPlayer mediaPlayer = createMediaPlayer(ALLOW_CAPTURE_BY_ALL, in testStopMediaProjectionDuringCapture() local
422 mediaPlayer.start(); in testStopMediaProjectionDuringCapture()
[all …]
DRemoteSubmixTest.java149 MediaPlayer mediaPlayer = MediaPlayer.create(mActivity, resid, in createMediaPlayer() local
156 return mediaPlayer; in createMediaPlayer()
222 MediaPlayer mediaPlayer = createMediaPlayer( in testPlaybackCapture() local
229 mediaPlayer.start(); in testPlaybackCapture()
232 assertTrue(mediaPlayer.isPlaying()); in testPlaybackCapture()
242 mediaPlayer.stop(); in testPlaybackCapture()
245 assertFalse(mediaPlayer.isPlaying()); in testPlaybackCapture()
258 mediaPlayer.release(); in testPlaybackCapture()
DVolumeShaperTest.java233 final MediaPlayer mediaPlayer = MediaPlayer.create(getContext(), in createMediaPlayer() local
241 mediaPlayer.setWakeMode(getContext(), PowerManager.PARTIAL_WAKE_LOCK); in createMediaPlayer()
242 mediaPlayer.setLooping(true); in createMediaPlayer()
243 return mediaPlayer; in createMediaPlayer()
/cts/hostsidetests/media/app/MediaSessionTest/src/android/media/session/cts/
DUtils.java50 MediaPlayer mediaPlayer = null; in assertMediaPlaybackStarted() local
57 mediaPlayer = MediaPlayer.create(context, R.raw.sine1khzm40db); in assertMediaPlaybackStarted()
58 mediaPlayer.start(); in assertMediaPlaybackStarted()
67 if (mediaPlayer != null) { in assertMediaPlaybackStarted()
68 mediaPlayer.stop(); in assertMediaPlaybackStarted()
69 mediaPlayer.release(); in assertMediaPlaybackStarted()
70 mediaPlayer = null; in assertMediaPlaybackStarted()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAudioRestrictionTest.java100 MediaPlayer mediaPlayer = new MediaPlayer(); in testDisallowAdjustVolume() local
101 mediaPlayer.setDataSource(mContext, uri); in testDisallowAdjustVolume()
102 mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); in testDisallowAdjustVolume()
103 mediaPlayer.prepare(); in testDisallowAdjustVolume()
104 mediaPlayer.setLooping(true); in testDisallowAdjustVolume()
105 mediaPlayer.start(); in testDisallowAdjustVolume()
140 mediaPlayer.stop(); in testDisallowAdjustVolume()
141 mediaPlayer.release(); in testDisallowAdjustVolume()
142 mediaPlayer = null; in testDisallowAdjustVolume()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-40111/src/android/security/cts/CVE_2023_40111/
DPocActivity.java136 MediaPlayer mediaPlayer = null; in runMediaPlayback() local
141 mediaPlayer = MediaPlayer.create(this, R.raw.sine1khzs40dblong); in runMediaPlayback()
142 mediaPlayer.start(); in runMediaPlayback()
145 if (mediaPlayer != null) { in runMediaPlayback()
146 mediaPlayer.stop(); in runMediaPlayback()
147 mediaPlayer.release(); in runMediaPlayback()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2021-0484/
Dpoc.cpp37 sp<MediaPlayer> mediaPlayer = new MediaPlayer(); in main() local
38 FAIL_CHECK(mediaPlayer != nullptr); in main()
40 sp<IMediaPlayer> iMediaPlayer = iMediaPlayerService->create(mediaPlayer); in main()
/cts/tests/tests/media/common/src/android/media/cts/
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()
/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.java197 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, R.raw.telecom_test_call_audio, in createMediaPlayer() local
199 mediaPlayer.setLooping(true); in createMediaPlayer()
200 return mediaPlayer; in createMediaPlayer()
/cts/tests/tests/media/player/src/android/media/player/cts/
DMediaPlayerTest.java300 MediaPlayer mediaPlayer = new MediaPlayer(); in testPlayContentUri() local
304 mediaPlayer.setDataSource(mContext, contentUri); in testPlayContentUri()
305 mediaPlayer.prepare(); in testPlayContentUri()
307 assertFalse(mediaPlayer.isPlaying()); in testPlayContentUri()
308 mediaPlayer.start(); in testPlayContentUri()
309 assertTrue(mediaPlayer.isPlaying()); in testPlayContentUri()
312 while (mediaPlayer.isPlaying()) { in testPlayContentUri()
316 mediaPlayer.release(); in testPlayContentUri()
/cts/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/
DAtomTests.java145 MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.good); in testAudioState() local
146 mediaPlayer.start(); in testAudioState()
148 mediaPlayer.stop(); in testAudioState()