Home
last modified time | relevance | path

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

12

/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()
/cts/libs/deviceutil/src/android/cts/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.java118 public static Bitmap getUnscaledBitmap(Resources resources, int resId) { in getUnscaledBitmap() argument
121 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledBitmap()
131 int resId, Bitmap.Config config) { in getUnscaledAndDitheredBitmap() argument
136 return BitmapFactory.decodeResource(resources, resId, options); in getUnscaledAndDitheredBitmap()
/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/hostsidetests/devicepolicy/app/ContactDirectoryProvider/src/com/android/cts/contactdirectoryprovider/
DDirectoryProvider.java217 final int resId; in openAssetFile() local
220 resId = isManagedProfile() ? 0 : R.raw.primary_thumbnail; in openAssetFile()
223 resId = isManagedProfile() ? 0 : R.raw.primary_photo; in openAssetFile()
226 resId = isManagedProfile() ? R.raw.managed_thumbnail : 0; in openAssetFile()
229 resId = isManagedProfile() ? R.raw.managed_photo : 0; in openAssetFile()
232 resId = 0; in openAssetFile()
236 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/tests/tests/security/src/android/security/cts/
DSkiaICORecursiveDecodingTest.java40 public void doSkiaIcoRecursiveDecodingTest(int resId) { in doSkiaIcoRecursiveDecodingTest() argument
41 InputStream exploitImage = mContext.getResources().openRawResource(resId); in doSkiaIcoRecursiveDecodingTest()
DPackageSignatureTest.java130 private Signature getSignature(int resId) throws NotFoundException, IOException { in getSignature() argument
131 InputStream input = mContext.getResources().openRawResource(resId); in getSignature()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityActivityTestCase.java78 public String getString(int resId) { in getString() argument
79 return getInstrumentation().getContext().getString(resId); in getString()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java112 public void setSoundWithResId(Context context, int resId) { in setSoundWithResId() argument
116 mResId = resId; in setSoundWithResId()
123 Uri.parse("android.resource://com.android.cts.verifier/" + resId)); in setSoundWithResId()
/cts/tests/tests/media/src/android/media/cts/
DMediaMetadataRetrieverTest.java156 private void testThumbnail(int resId) { in testThumbnail() argument
157 if (!MediaUtils.hasCodecForResourceAndDomain(getContext(), resId, "video/")) { in testThumbnail()
164 AssetFileDescriptor afd = resources.openRawResourceFd(resId); in testThumbnail()
DFaceView.java46 public FaceView(Context context, int resId) { in FaceView() argument
63 mSourceImage = BitmapFactory.decodeResource(getResources(), resId, bfo); in FaceView()
DDecoderConformanceTest.java89 int resId = mResources.getIdentifier(fileName, "raw", mContext.getPackageName()); in readResourceLines() local
90 InputStream is = mContext.getResources().openRawResource(resId); in readResourceLines()
137 int resId = mResources.getIdentifier(vectorName, "raw", mContext.getPackageName()); in decodeTestVector() local
138 AssetFileDescriptor testFd = mResources.openRawResourceFd(resId); in decodeTestVector()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedVectorDrawableTest.java80 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int resId) throws IOException { in saveVectorDrawableIntoPNG() argument
89 String originalFilePath = mResources.getString(resId); in saveVectorDrawableIntoPNG()
143 int resId = R.drawable.avd_single_frame; in testSingleFrameAnimation() local
145 (AnimatedVectorDrawable) mResources.getDrawable(resId); in testSingleFrameAnimation()
166 saveVectorDrawableIntoPNG(mBitmap, resId); in testSingleFrameAnimation()
DDrawableTestUtils.java97 public static XmlResourceParser getResourceParser(Resources res, int resId) in getResourceParser() argument
99 final XmlResourceParser parser = res.getXml(resId); in getResourceParser()
DLevelListDrawableTest.java185 private XmlResourceParser getResourceParser(int resId) throws XmlPullParserException, in getResourceParser() argument
188 resId); in getResourceParser()
DAnimatedStateListDrawableTest.java213 private XmlResourceParser getResourceParser(int resId) throws XmlPullParserException, in getResourceParser() argument
216 resId); in getResourceParser()
/cts/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/src/android/security/net/config/cts/
DResourceSourceTest.java71 private Set<X509Certificate> loadCertificates(int resId) throws Exception { in loadCertificates() argument
76 is = getContext().getResources().openRawResource(resId); in loadCertificates()
/cts/tests/tests/view/src/android/view/cts/
DActionModeTest.java156 public void setTitle(int resId) {} in setTitle() argument
162 public void setSubtitle(int resId) {} in setSubtitle() argument
/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java137 private static void checkGetText1(final Resources res, final int resId, in checkGetText1() argument
139 final String actual = res.getText(resId).toString(); in checkGetText1()
141 + "got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText1()
144 + ", got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText1()
148 private static void checkGetText2(final Resources res, final int resId, in checkGetText2() argument
150 final String actual = res.getText(resId, null).toString(); in checkGetText2()
152 + "got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText2()
155 + ", got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText2()
/cts/tests/tests/widget/src/android/widget/cts/
DRadioGroup_LayoutParamsTest.java156 private AttributeSet getAttributeSet(int resId) { in getAttributeSet() argument
157 XmlPullParser parser = mContext.getResources().getLayout(resId); in getAttributeSet()
/cts/tests/tests/graphics/src/android/graphics/cts/
DBitmapRegionDecoderTest.java430 private InputStream obtainInputStream(int resId) { in obtainInputStream() argument
431 return mRes.openRawResource(resId); in obtainInputStream()
434 private byte[] obtainByteArray(int resId) throws IOException { in obtainByteArray() argument
435 InputStream is = obtainInputStream(resId); in obtainByteArray()
/cts/tests/netlegacy22.api/src/android/net/cts/legacy/api22/
DConnectivityManagerLegacyTest.java70 …int resId = getContext().getResources().getIdentifier("config_protectedNetworks", "array", "androi… in setUp() local
71 int[] protectedNetworks = getContext().getResources().getIntArray(resId); in setUp()
/cts/tests/app/src/android/app/cts/
DInstrumentationTest.java199 final int resId = R.id.goto_menu_id; in testInvokeMenuActionSync() local
201 mInstrumentation.invokeMenuActionSync(mActivity, resId, 0); in testInvokeMenuActionSync()
204 assertEquals(resId, mActivity.getMenuID()); in testInvokeMenuActionSync()
612 public void setFeatureDrawableResource(int featureId, int resId) { in setFeatureDrawableResource() argument

12