Home
last modified time | relevance | path

Searched refs:asset (Results 1 – 13 of 13) sorted by relevance

/cts/tests/tests/resourcesloader/src/android/content/res/loader/cts/
DResourcesLoaderTestBase.kt119 val asset = context.assets.openFd("$this.apk") in <lambda>() constant
120 ResourcesProvider.loadFromApk(asset.parcelFileDescriptor, asset.startOffset, in <lambda>()
121 asset.length, assetsProvider).also { in <lambda>()
122 asset.close() in <lambda>()
133 val asset = context.assets.openFd("$this.arsc") in <lambda>() constant
134 ResourcesProvider.loadFromTable(asset.parcelFileDescriptor, asset.startOffset, in <lambda>()
135 asset.length, assetsProvider).also { in <lambda>()
136 asset.close() in <lambda>()
140 val asset = context.assets.openFd("$this.apk") in <lambda>() constant
143 val fd = loadAssetIntoMemory(asset, leadingGarbageSize.toInt(), in <lambda>()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DAImageDecoderTest.java132 long asset = nOpenAsset(getAssetManager(), record.name); in testCreateBuffer() local
133 long aimagedecoder = nCreateFromAssetBuffer(asset); in testCreateBuffer()
137 nCloseAsset(asset); in testCreateBuffer()
145 long asset = nOpenAsset(getAssetManager(), record.name); in testCreateFd() local
146 long aimagedecoder = nCreateFromAssetFd(asset); in testCreateFd()
150 nCloseAsset(asset); in testCreateFd()
156 long asset = nOpenAsset(getAssetManager(), record.name); in testCreateAsset() local
157 long aimagedecoder = nCreateFromAsset(asset); in testCreateAsset()
161 nCloseAsset(asset); in testCreateAsset()
226 long asset = nOpenAsset(getAssetManager(), record.name); in testSetFormat() local
[all …]
DBitmapColorSpaceTest.java319 for (Asset asset : assets) { in reconfigure()
324 try (InputStream in = mResources.getAssets().open(asset.name)) { in reconfigure()
332 assertSame(asset.colorSpace, cs); in reconfigure()
337 assertSame(asset.colorSpace, cs); in reconfigure()
342 assertSame(asset.colorSpace, cs); in reconfigure()
826 final String asset = "blue-16bit-prophoto.png"; in inColorSpaceWith16BitWithDecreasedGamut() local
829 try (InputStream in = mResources.getAssets().open(asset)) { in inColorSpaceWith16BitWithDecreasedGamut()
841 try (InputStream in = mResources.getAssets().open(asset)) { in inColorSpaceWith16BitWithDecreasedGamut()
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DAImageDecoderTest.kt159 val asset = nOpenAsset(getAssets(), image) in <lambda>() constant
160 val decoder = nCreateFromAsset(asset) in <lambda>()
197 nCloseAsset(asset) in <lambda>()
295 val asset = nOpenAsset(getAssets(), image) in <lambda>() constant
296 val decoder = nCreateFromAsset(asset) in <lambda>()
311 nCloseAsset(asset) in <lambda>()
318 val asset = nOpenAsset(getAssets(), image) in <lambda>() constant
319 val decoder = nCreateFromAsset(asset) in <lambda>()
333 nCloseAsset(asset) in <lambda>()
343 val asset = nOpenAsset(getAssets(), image) in <lambda>() constant
[all …]
/cts/tests/tests/neuralnetworks/java_test/jni/
Dandroid_neuralnetworks_cts_ModelAssetTest.cpp113 ANeuralNetworksMemory* createMemoryFromAsset(JNIEnv* env, AAsset* asset) { in createMemoryFromAsset() argument
116 android::base::unique_fd assetFd(AAsset_openFileDescriptor(asset, &offset, &length)); in createMemoryFromAsset()
128 ANeuralNetworksMemory* createMemoryFromAshmem(JNIEnv* env, AAsset* asset) { in createMemoryFromAshmem() argument
130 off_t length = AAsset_getLength(asset); in createMemoryFromAshmem()
138 int bytesRead = AAsset_read(asset, ashmemData, length); in createMemoryFromAshmem()
275 AAsset* asset = AAssetManager_open(assetManager, "model_data.bin", AASSET_MODE_BUFFER); in Java_android_neuralnetworks_cts_ModelAssetTest_nativeTestCompileFromAssetFile() local
276 ASSERT_OR_RETURN(asset != nullptr); in Java_android_neuralnetworks_cts_ModelAssetTest_nativeTestCompileFromAssetFile()
277 auto assetGuard = android::base::make_scope_guard([asset]() { AAsset_close(asset); }); in Java_android_neuralnetworks_cts_ModelAssetTest_nativeTestCompileFromAssetFile()
280 auto* memoryFromAsset = createMemoryFromAsset(env, asset); in Java_android_neuralnetworks_cts_ModelAssetTest_nativeTestCompileFromAssetFile()
286 auto* memoryFromAshmem = createMemoryFromAshmem(env, asset); in Java_android_neuralnetworks_cts_ModelAssetTest_nativeTestCompileFromAssetFile()
/cts/hostsidetests/media/app/MediaExtractorTest/jni/
DMediaExtractorDeviceSideTestNative.cpp29 AAsset* asset = AAssetManager_open(nativeAssetManager, scopedPath.c_str(), AASSET_MODE_RANDOM); in Java_android_media_cts_MediaExtractorDeviceSideTest_extractUsingNdkMediaExtractor() local
32 int fd = AAsset_openFileDescriptor(asset, &start, &length); in Java_android_media_cts_MediaExtractorDeviceSideTest_extractUsingNdkMediaExtractor()
51 AAsset_close(asset); in Java_android_media_cts_MediaExtractorDeviceSideTest_extractUsingNdkMediaExtractor()
/cts/tests/tests/uirendering/jni/
Dandroid_uirendering_cts_AImageDecoderTest.cpp80 AAsset* asset = AAssetManager_open(nativeManager, file, AASSET_MODE_UNKNOWN); in openAsset() local
81 if (!asset) { in openAsset()
87 return reinterpret_cast<jlong>(asset); in openAsset()
90 static void closeAsset(JNIEnv*, jobject, jlong asset) { in closeAsset() argument
91 AAsset_close(reinterpret_cast<AAsset*>(asset)); in closeAsset()
94 static jlong createFromAsset(JNIEnv* env, jobject, jlong asset) { in createFromAsset() argument
96 int result = AImageDecoder_createFromAAsset(reinterpret_cast<AAsset*>(asset), &decoder); in createFromAsset()
211 auto asset = openAsset(env, nullptr, jAssets, jFile); in testNullFrameInfo() local
212 auto decoder = createFromAsset(env, nullptr, asset); in testNullFrameInfo()
218 closeAsset(env, nullptr, asset); in testNullFrameInfo()
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_AImageDecoderTest.cpp47 for (AAsset* asset : { nullptr }) { in testEmptyCreate()
48 int result = AImageDecoder_createFromAAsset(asset, outDecoder); in testEmptyCreate()
79 AAsset* asset = AAssetManager_open(nativeManager, file, mode); in openAsset() local
80 if (!asset) { in openAsset()
86 return asset; in openAsset()
90 AAsset* asset = openAsset(env, jAssets, jFile, AASSET_MODE_BUFFER); in testNullDecoder() local
91 ASSERT_NE(asset, nullptr); in testNullDecoder()
92 AssetCloser assetCloser(asset, AAsset_close); in testNullDecoder()
99 int result = AImageDecoder_createFromAAsset(asset, nullptr); in testNullDecoder()
104 const void* buffer = AAsset_getBuffer(asset); in testNullDecoder()
[all …]
/cts/tests/openglperf2/jni/graphics/
DGLUtils.cpp42 AAsset* asset = loadAsset(path); in openTextFile() local
43 if (asset == NULL) { in openTextFile()
47 off_t length = AAsset_getLength(asset); in openTextFile()
49 int num = AAsset_read(asset, buffer, length); in openTextFile()
50 AAsset_close(asset); in openTextFile()
/cts/hostsidetests/incrementalinstall/app/dynamicasset/assets/
Ddynamicasset.txt1 "Text from dynamic asset"
/cts/tests/tests/media/src/android/media/cts/
DImageReaderDecoderTest.java242 for (MediaAsset asset : assets.getAssets()) { in Decoder()
243 if (mCaps.areSizeAndRateSupported(asset.getWidth(), asset.getHeight(), SWIRL_FPS) in Decoder()
245 mAssets.add(asset); in Decoder()
252 for (MediaAsset asset: mAssets) { in videoDecode()
256 videoDecode(asset, imageFormat, colorFormat, mode, checkSwirl); in videoDecode()
263 MediaAsset asset, int imageFormat, int colorFormat, int mode, boolean checkSwirl) { in videoDecode() argument
264 String video = asset.getResource(); in videoDecode()
265 int width = asset.getWidth(); in videoDecode()
266 int height = asset.getHeight(); in videoDecode()
/cts/tests/app/src/android/app/cts/
DDownloadManagerTestBase.java373 protected Uri getAssetUrl(String asset) { in getAssetUrl() argument
374 return Uri.parse(mWebServer.getAssetUrl(asset)); in getAssetUrl()
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebSettingsTest.java1281 private void loadAssetUrl(String asset) throws Exception { in loadAssetUrl() argument
1285 String url = mWebServer.getAssetUrl(asset); in loadAssetUrl()