/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | ImageDecoderTest.java | 80 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/ |
D | FontTest.java | 837 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/ |
D | KeyFactoryTest.java | 336 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/ |
D | MediaMetadataRetrieverTest.java | 248 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 …]
|
D | DecoderConformanceTest.java | 87 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()
|
D | FaceView.java | 46 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/ |
D | FileCopyHelper.java | 62 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()
|
D | WidgetTestUtils.java | 136 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/ |
D | BitmapFactorySecurityTests.java | 35 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()
|
D | CertBlacklistTest.java | 85 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()
|
D | SkiaICORecursiveDecodingTest.java | 50 public void doSkiaIcoRecursiveDecodingTest(int resId) { in doSkiaIcoRecursiveDecodingTest() argument 51 InputStream exploitImage = mContext.getResources().openRawResource(resId); in doSkiaIcoRecursiveDecodingTest()
|
D | Movie33897722.java | 61 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/ |
D | FileCopyHelper.java | 62 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()
|
D | WidgetTestUtils.java | 136 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/ |
D | DirectoryProvider.java | 229 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/ |
D | IGnssTestStateContainer.java | 37 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/ |
D | ISensorTestStateContainer.java | 42 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/ |
D | SoundPlayerObject.java | 278 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/ |
D | ProviderTestUtils.java | 218 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/ |
D | ByodProvisioningTestActivity.java | 111 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/ |
D | DrawableTestUtils.java | 113 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()
|
D | VectorDrawableSizeTest.java | 53 public VectorDrawableSizeTest(String name, int resId, int dp) throws Throwable { in VectorDrawableSizeTest() argument 54 mResId = resId; in VectorDrawableSizeTest()
|
D | AnimatedImageDrawableTest.java | 80 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/ |
D | AppWidgetTestCase.java | 148 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/ |
D | ChangeDefaultUris.java | 80 private void copyToExternalStorage(int resId, File path) in copyToExternalStorage() argument 86 copier.copyToExternalStorage(resId, path); in copyToExternalStorage()
|