Home
last modified time | relevance | path

Searched refs:resId (Results 1 – 25 of 66) sorted by relevance

123

/cts/tests/tests/graphics/src/android/graphics/cts/
DImageDecoderTest.java80 public final int resId; field in ImageDecoderTest.Record
86 Record(int resId, int width, int height, String mimeType, ColorSpace colorSpace) { in Record() argument
87 this.resId = resId; in Record()
111 private byte[] getAsByteArray(int resId, int offset, int extra) { in getAsByteArray() argument
113 writeToStream(output, resId, offset, extra); in getAsByteArray()
117 private void writeToStream(OutputStream output, int resId, int offset, int extra) { in writeToStream() argument
118 InputStream input = mRes.openRawResource(resId); in writeToStream()
140 private byte[] getAsByteArray(int resId) { in getAsByteArray() argument
141 return getAsByteArray(resId, 0, 0); in getAsByteArray()
144 private ByteBuffer getAsByteBufferWrap(int resId) { in getAsByteBufferWrap() argument
[all …]
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontTest.java837 int resId = FontTestUtil.getFontResourceIdFromStyle(weight, italic); in testBuilder_resource() local
840 Font font = new Font.Builder(res, resId).build(); in testBuilder_resource()
841 assertEquals("ResId=#" + resId, weight, font.getStyle().getWeight()); in testBuilder_resource()
842 assertEquals("ResId=#" + resId, slant, font.getStyle().getSlant()); in testBuilder_resource()
843 assertEquals("ResId=#" + resId, 0, font.getTtcIndex()); in testBuilder_resource()
844 assertNull("ResId=#" + resId, font.getAxes()); in testBuilder_resource()
845 assertNotNull("ResId=#" + resId, font.getBuffer()); in testBuilder_resource()
846 assertNull("ResId=#" + resId, font.getFile()); in testBuilder_resource()
856 int resId = FontTestUtil.getTtcFontFileResourceId(); in testBuilder_resource_ttc() local
860 Font font = new Font.Builder(res, resId).setTtcIndex(ttcIndex).build(); in testBuilder_resource_ttc()
[all …]
/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyFactoryTest.java336 int resId; in testGeneratePrivateRejectsPKCS8EncodedKeySpec() local
338 resId = R.raw.ec_key1_pkcs8; in testGeneratePrivateRejectsPKCS8EncodedKeySpec()
340 resId = R.raw.rsa_key2_pkcs8; in testGeneratePrivateRejectsPKCS8EncodedKeySpec()
346 try (InputStream in = getContext().getResources().openRawResource(resId)) { in testGeneratePrivateRejectsPKCS8EncodedKeySpec()
364 int resId; in testGeneratePublicRejectsX509EncodedKeySpec() local
366 resId = R.raw.ec_key2_cert; in testGeneratePublicRejectsX509EncodedKeySpec()
368 resId = R.raw.rsa_key1_cert; in testGeneratePublicRejectsX509EncodedKeySpec()
374 try (InputStream in = getContext().getResources().openRawResource(resId)) { in testGeneratePublicRejectsX509EncodedKeySpec()
392 int resId; in testGeneratePrivateRejectsTransparentKeySpec() local
395 resId = R.raw.ec_key2_pkcs8; in testGeneratePrivateRejectsTransparentKeySpec()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DMediaMetadataRetrieverTest.java248 private void testThumbnail(int resId) { in testThumbnail() argument
249 if (!MediaUtils.hasCodecForResourceAndDomain(getContext(), resId, "video/")) { in testThumbnail()
256 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testThumbnail()
425 int resId = R.raw.binary_counter_320x240_30fps_600frames; in testGetFrameAt() local
426 if (!MediaUtils.hasCodecForResourceAndDomain(getContext(), resId, "video/") in testGetFrameAt()
434 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testGetFrameAt()
453 int resId = R.raw.binary_counter_320x240_30fps_600frames_editlist; in testGetFrameAtEditList() local
454 if (!MediaUtils.hasCodecForResourceAndDomain(getContext(), resId, "video/") in testGetFrameAtEditList()
462 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testGetFrameAtEditList()
495 int resId = R.raw.binary_counter_320x240_30fps_600frames; in testGetScaledFrameAtTime() local
[all …]
DDecoderConformanceTest.java87 int resId = mResources.getIdentifier(fileName, "raw", mContext.getPackageName()); in readResourceLines() local
88 InputStream is = mContext.getResources().openRawResource(resId); in readResourceLines()
135 int resId = mResources.getIdentifier(vectorName, "raw", mContext.getPackageName()); in decodeTestVector() local
136 AssetFileDescriptor testFd = mResources.openRawResourceFd(resId); in decodeTestVector()
DFaceView.java46 public FaceView(Context context, int resId) { in FaceView() argument
63 mSourceImage = BitmapFactory.decodeResource(getResources(), resId, bfo); in FaceView()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DFileCopyHelper.java62 public String copy(int resId, String fileName) throws IOException { in copy() argument
63 InputStream source = mContext.getResources().openRawResource(resId); in copy()
70 public void copyToExternalStorage(int resId, File path) throws IOException { in copyToExternalStorage() argument
71 InputStream source = mContext.getResources().openRawResource(resId); in copyToExternalStorage()
DWidgetTestUtils.java136 public static Bitmap getUnscaledBitmap(Resources resources, int resId) { in getUnscaledBitmap() argument
139 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledBitmap()
149 int resId, Bitmap.Config config) { in getUnscaledAndDitheredBitmap() argument
154 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledAndDitheredBitmap()
/cts/tests/tests/security/src/android/security/cts/
DBitmapFactorySecurityTests.java35 private FileDescriptor getResource(int resId) { in getResource() argument
37 InputStream is = mContext.getResources().openRawResource(resId); in getResource()
39 File file = File.createTempFile("BitmapFactorySecurityFile" + resId, "img"); in getResource()
53 fail("Could not get resource " + resId + "! " + e); in getResource()
DCertBlacklistTest.java85 private X509Certificate loadCertificate(int resId) throws Exception { in loadCertificate() argument
86 return loadCertificates(resId)[0]; in loadCertificate()
89 private X509Certificate[] loadCertificates(int resId) throws Exception { in loadCertificates() argument
91 try (InputStream is = getContext().getResources().openRawResource(resId)) { in loadCertificates()
DSkiaICORecursiveDecodingTest.java50 public void doSkiaIcoRecursiveDecodingTest(int resId) { in doSkiaIcoRecursiveDecodingTest() argument
51 InputStream exploitImage = mContext.getResources().openRawResource(resId); in doSkiaIcoRecursiveDecodingTest()
DMovie33897722.java61 private void test_movie(int resId, int screenWidth, int screenHeight, in test_movie() argument
65 InputStream exploitImage = mContext.getResources().openRawResource(resId); in test_movie()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DFileCopyHelper.java62 public String copy(int resId, String fileName) throws IOException { in copy() argument
63 InputStream source = mContext.getResources().openRawResource(resId); in copy()
70 public void copyToExternalStorage(int resId, File path) throws IOException { in copyToExternalStorage() argument
71 InputStream source = mContext.getResources().openRawResource(resId); in copyToExternalStorage()
DWidgetTestUtils.java136 public static Bitmap getUnscaledBitmap(Resources resources, int resId) { in getUnscaledBitmap() argument
139 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledBitmap()
149 int resId, Bitmap.Config config) { in getUnscaledAndDitheredBitmap() argument
154 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledAndDitheredBitmap()
/cts/hostsidetests/devicepolicy/app/ContactDirectoryProvider/src/com/android/cts/contactdirectoryprovider/
DDirectoryProvider.java229 final int resId; in openAssetFile() local
232 resId = isManagedProfile() ? 0 : R.raw.primary_thumbnail; in openAssetFile()
235 resId = isManagedProfile() ? 0 : R.raw.primary_photo; in openAssetFile()
238 resId = isManagedProfile() ? R.raw.managed_thumbnail : 0; in openAssetFile()
241 resId = isManagedProfile() ? R.raw.managed_photo : 0; in openAssetFile()
244 resId = 0; in openAssetFile()
248 return resId == 0 ? null : getContext().getResources().openRawResourceFd(resId); in openAssetFile()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/base/
DIGnssTestStateContainer.java37 String getString(int resId); in getString() argument
44 String getString(int resId, Object... params); in getString() argument
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/base/
DISensorTestStateContainer.java42 String getString(int resId); in getString() argument
49 String getString(int resId, Object ... params); in getString() argument
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java278 public void setSoundWithResId(Context context, int resId) { in setSoundWithResId() argument
280 setSoundWithResId(context, resId, true); in setSoundWithResId()
283 public void setSoundWithResId(Context context, int resId, boolean looping) { in setSoundWithResId() argument
284 log("setSoundWithResId " + resId + ", looping: " + looping); in setSoundWithResId()
300 log("loading uri: " + resId); in setSoundWithResId()
301 mResId = resId; in setSoundWithResId()
302 Uri uri = Uri.parse("android.resource://com.android.cts.verifier/" + resId); in setSoundWithResId()
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java218 static File stageFile(int resId, File file) throws IOException { in stageFile() argument
226 try (AssetFileDescriptor afd = context.getResources().openRawResourceFd(resId)) { in stageFile()
243 try (InputStream source = context.getResources().openRawResource(resId); in stageFile()
251 static Uri stageMedia(int resId, Uri collectionUri) throws IOException { in stageMedia() argument
252 return stageMedia(resId, collectionUri, "image/png"); in stageMedia()
255 static Uri stageMedia(int resId, Uri collectionUri, String mimeType) throws IOException { in stageMedia() argument
261 try (InputStream source = context.getResources().openRawResource(resId); in stageMedia()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodProvisioningTestActivity.java111 private Uri getResourceUri(int resId) { in getResourceUri() argument
114 .appendPath(getResources().getResourceTypeName(resId)) in getResourceUri()
115 .appendPath(getResources().getResourceEntryName(resId)) in getResourceUri()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawableTestUtils.java113 public static XmlResourceParser getResourceParser(Resources res, int resId) in getResourceParser() argument
115 final XmlResourceParser parser = res.getXml(resId); in getResourceParser()
230 @IntegerRes int resId, @Nullable String extras) in saveAutoNamedVectorDrawableIntoPNG() argument
232 String originalFilePath = context.getResources().getString(resId); in saveAutoNamedVectorDrawableIntoPNG()
DVectorDrawableSizeTest.java53 public VectorDrawableSizeTest(String name, int resId, int dp) throws Throwable { in VectorDrawableSizeTest() argument
54 mResId = resId; in VectorDrawableSizeTest()
DAnimatedImageDrawableTest.java80 private Uri getAsResourceUri(int resId) { in getAsResourceUri() argument
83 .authority(mRes.getResourcePackageName(resId)) in getAsResourceUri()
84 .appendPath(mRes.getResourceTypeName(resId)) in getAsResourceUri()
85 .appendPath(mRes.getResourceEntryName(resId)) in getAsResourceUri()
119 private AnimatedImageDrawable createFromImageDecoder(int resId) { in createFromImageDecoder() argument
122 uri = getAsResourceUri(resId); in createFromImageDecoder()
579 private AnimatedImageDrawable parseXml(int resId) throws XmlPullParserException, IOException { in parseXml() argument
580 XmlPullParser parser = mRes.getXml(resId); in parseXml()
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DAppWidgetTestCase.java148 private int getNormalizedDimensionResource(int resId) { in getNormalizedDimensionResource() argument
150 .getDimensionPixelSize(resId); in getNormalizedDimensionResource()
153 private int getIntResource(int resId) { in getIntResource() argument
154 return getInstrumentation().getTargetContext().getResources().getInteger(resId); in getIntResource()
/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/src/com/android/cts/writeexternalstorageapp/
DChangeDefaultUris.java80 private void copyToExternalStorage(int resId, File path) in copyToExternalStorage() argument
86 copier.copyToExternalStorage(resId, path); in copyToExternalStorage()

123