Home
last modified time | relevance | path

Searched refs:afd (Results 1 – 25 of 27) sorted by relevance

12

/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local
50 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd()
51 afd.close(); in setDataSourceFd()
DMediaServerCrashTest.java98 AssetFileDescriptor afd = getContext().getResources().openRawResourceFd(res); in testIfMediaServerDied() local
99 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
100 afd.close(); in testIfMediaServerDied()
123 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(res); in checkIfMediaServerDiedForDrm() local
124 FileInputStream dmStream = afd.createInputStream(); in checkIfMediaServerDiedForDrm()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerSurfaceStubActivity.java44 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in onCreate() local
46 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in onCreate()
47 afd.close(); in onCreate()
DMediaPlayerTestBase.java109 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource() local
111 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadResource()
112 afd.getLength()); in loadResource()
122 afd.close(); in loadResource()
133 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource() local
135 mMediaPlayer.addTimedTextSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSubtitleSource()
136 afd.getLength(), MediaPlayer.MEDIA_MIMETYPE_TEXT_SUBRIP); in loadSubtitleSource()
138 afd.close(); in loadSubtitleSource()
DTestProxyFileDescriptorCallback.java45 public static TestProxyFileDescriptorCallback fromAssetFd(AssetFileDescriptor afd) in fromAssetFd() argument
48 InputStream in = afd.createInputStream(); in fromAssetFd()
49 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
59 afd.close(); in fromAssetFd()
DTestMediaDataSource.java45 public static TestMediaDataSource fromAssetFd(AssetFileDescriptor afd) throws IOException { in fromAssetFd() argument
47 InputStream in = afd.createInputStream(); in fromAssetFd()
48 final int size = (int) afd.getDeclaredLength(); in fromAssetFd()
58 afd.close(); in fromAssetFd()
DMediaRandomTest.java166 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSource() local
168 mPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), in loadSource()
169 afd.getLength()); in loadSource()
171 afd.close(); in loadSource()
DMediaPlayerTest.java149 AssetFileDescriptor afd = mResources.openRawResourceFd(res); in testIfMediaServerDied() local
150 mMediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testIfMediaServerDied()
151 afd.close(); in testIfMediaServerDied()
178 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.bug13652927); in testVorbisCrash() local
179 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testVorbisCrash()
180 afd.close(); in testVorbisCrash()
315 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
316 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
317 afd.close();
439 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in runMidiTest()
[all …]
DMediaMetadataRetrieverTest.java112 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd() local
113 … mRetriever.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setDataSourceFd()
114 afd.close(); in setDataSourceFd()
123 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback() local
124 ds = TestMediaDataSource.fromAssetFd(afd); in setDataSourceCallback()
135 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getFaultyDataSource() local
136 ds = TestMediaDataSource.fromAssetFd(afd); in getFaultyDataSource()
1026 AssetFileDescriptor afd = null; in testGetImage() local
1105 afd = resources.openRawResourceFd(resId); in testGetImage()
1107 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in testGetImage()
[all …]
DAudioEffectTest.java159 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_4InsertOnMediaPlayer() local
160 mp.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in test1_4InsertOnMediaPlayer()
161 afd.close(); in test1_4InsertOnMediaPlayer()
185 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3); in test1_5AuxiliaryOnMediaPlayer() local
186 mMediaPlayer.setDataSource(afd.getFileDescriptor(), in test1_5AuxiliaryOnMediaPlayer()
187 afd.getStartOffset(), in test1_5AuxiliaryOnMediaPlayer()
188 afd.getLength()); in test1_5AuxiliaryOnMediaPlayer()
189 afd.close(); in test1_5AuxiliaryOnMediaPlayer()
DSoundPoolTest.java106 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(getSoundCs()); in testLoad() local
108 sampleId2 = mSoundPool.load(afd, PRIORITY); in testLoad()
112 FileDescriptor fd = afd.getFileDescriptor(); in testLoad()
113 long offset = afd.getStartOffset(); in testLoad()
114 long length = afd.getLength(); in testLoad()
DMediaExtractorTest.java85 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor() local
86 return TestMediaDataSource.fromAssetFd(afd); in getDataSourceFor()
140 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in testExtractFromAssetFileDescriptor() local
141 mExtractor.setDataSource(afd); in testExtractFromAssetFileDescriptor()
143 afd.close(); in testExtractFromAssetFileDescriptor()
553 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in testExtractorHasCacheReachedEndOfStream() local
554 mExtractor.setDataSource(afd); in testExtractorHasCacheReachedEndOfStream()
556 afd.close(); in testExtractorHasCacheReachedEndOfStream()
DRingtoneManagerTest.java137 try (AssetFileDescriptor afd = RingtoneManager.openDefaultRingtoneUri( in testAccessMethods() argument
139 assertNotNull(afd); in testAccessMethods()
DMediaCodecBlockModelTest.java945 try (AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(resourceId)) { in getMediaExtractorForMimeType() argument
947 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getMediaExtractorForMimeType()
DMediaScannerTest.java596 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(entry.res); in testEncodingDetection() local
597 woodly.setDataSource(afd.getFileDescriptor(), in testEncodingDetection()
598 afd.getStartOffset(), afd.getDeclaredLength()); in testEncodingDetection()
DDecodeAccuracyTestBase.java365 final AssetFileDescriptor afd = videoFormat.getAssetFileDescriptor(context); in setExtractorDataSource() local
367 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in setExtractorDataSource()
368 afd.close(); in setExtractorDataSource()
DMediaCodecTest.java1860 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(resourceId); in getMediaExtractorForMimeType() local
1863 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getMediaExtractorForMimeType()
1865 afd.close(); in getMediaExtractorForMimeType()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DMediaUtils.java471 AssetFileDescriptor afd = null; in hasCodecsForResourceCombo() local
474 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
476 ex.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in hasCodecsForResourceCombo()
488 if (afd != null) { in hasCodecsForResourceCombo()
489 afd.close(); in hasCodecsForResourceCombo()
709 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in getTrackFormatForResource() local
711 extractor.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in getTrackFormatForResource()
713 afd.close(); in getTrackFormatForResource()
749 AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceId); in createMediaExtractorForMimeType() local
752 afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength()); in createMediaExtractorForMimeType()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DContentResolverTest.java706 AssetFileDescriptor afd = mContentResolver.openAssetFileDescriptor(uri, "r"); in testOpenAssetFileDescriptor() local
707 assertNotNull(afd); in testOpenAssetFileDescriptor()
708 afd.close(); in testOpenAssetFileDescriptor()
726 private String consumeAssetFileDescriptor(AssetFileDescriptor afd) in consumeAssetFileDescriptor() argument
730 stream = afd.createInputStream(); in consumeAssetFileDescriptor()
754 AssetFileDescriptor afd = null; in testCrashingOpenAssetFileDescriptor() local
757 afd = mContentResolver.openAssetFileDescriptor(REMOTE_CRASH_URI, "rw"); in testCrashingOpenAssetFileDescriptor()
759 assertNotNull(afd); in testCrashingOpenAssetFileDescriptor()
760 String str = consumeAssetFileDescriptor(afd); in testCrashingOpenAssetFileDescriptor()
761 afd = null; in testCrashingOpenAssetFileDescriptor()
[all …]
/cts/tests/providerui/src/android/providerui/cts/
DMediaStoreUiTest.java312 try (AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId)) { in stageFile() argument
313 final File source = ParcelFileDescriptor.getFile(afd.getFileDescriptor()); in stageFile()
314 final long skip = afd.getStartOffset(); in stageFile()
315 final long count = afd.getLength(); in stageFile()
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java259 try (AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId)) { in stageFile() argument
260 final File source = ParcelFileDescriptor.getFile(afd.getFileDescriptor()); in stageFile()
261 final long skip = afd.getStartOffset(); in stageFile()
262 final long count = afd.getLength(); in stageFile()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DCodecTest.java545 public static boolean resourcesPlayback(AssetFileDescriptor afd, int expectedDuration) { in resourcesPlayback() argument
549 mp.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(), afd.getLength()); in resourcesPlayback()
/cts/tests/tests/drm/src/android/drm/cts/
DDRMTest.java249 AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(R.raw.testmp3_2); in testForwardLockAccess() local
250 FileInputStream body = afd.createInputStream(); in testForwardLockAccess()
/cts/tests/media/src/android/mediav2/cts/
DExtractorUnitTest.java726 AssetFileDescriptor afd = new AssetFileDescriptor(parcelFD, 0, in testIfWriteOnlyAssetFDIsRejectedBySetDataSource() argument
728 extractor.setDataSource(afd); in testIfWriteOnlyAssetFDIsRejectedBySetDataSource()
DExtractorTest.java481 AssetFileDescriptor afd = new AssetFileDescriptor(parcelFD, 0, in testAssetFD() argument
483 testExtractor.setDataSource(afd); in testAssetFD()

12