Home
last modified time | relevance | path

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

12

/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/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/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/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/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()
/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java136 private static void checkGetText1(final Resources res, final int resId, in checkGetText1() argument
138 final String actual = res.getText(resId).toString(); in checkGetText1()
140 + "got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText1()
143 + ", got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText1()
147 private static void checkGetText2(final Resources res, final int resId, in checkGetText2() argument
149 final String actual = res.getText(resId, null).toString(); in checkGetText2()
151 + "got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText2()
154 + ", got '" + actual + "' from resource 0x" + Integer.toHexString(resId), in checkGetText2()
/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
DMenuInflaterTest.java225 public void assertIconUsingDrawableRes(BitmapDrawable b, int resId) { in assertIconUsingDrawableRes() argument
226 Bitmap expected = BitmapFactory.decodeResource(mActivity.getResources(), resId); in assertIconUsingDrawableRes()
/cts/tests/tests/security/src/android/security/cts/
DPackageSignatureTest.java118 private Signature getSignature(int resId) throws NotFoundException, IOException { in getSignature() argument
119 InputStream input = mContext.getResources().openRawResource(resId); in getSignature()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DNinePatchDrawableTest.java362 private NinePatchDrawable getNinePatchDrawable(int resId) { in getNinePatchDrawable() argument
365 Bitmap bitmap = getBitmapUnscaled(resId); in getNinePatchDrawable()
370 private Bitmap getBitmapUnscaled(int resId) { in getBitmapUnscaled() argument
373 Bitmap bitmap = BitmapFactory.decodeResource(mResources, resId, opts); in getBitmapUnscaled()
DLevelListDrawableTest.java185 private XmlResourceParser getResourceParser(int resId) throws XmlPullParserException, in getResourceParser() argument
188 resId); in getResourceParser()
DAnimatedVectorDrawableTest.java71 private void saveVectorDrawableIntoPNG(Bitmap bitmap, int resId) throws IOException { in saveVectorDrawableIntoPNG() argument
80 String originalFilePath = mResources.getString(resId); in saveVectorDrawableIntoPNG()
DStateListDrawableTest.java246 private XmlResourceParser getResourceParser(int resId) throws XmlPullParserException, in getResourceParser() argument
249 resId); in getResourceParser()
DAnimationDrawableTest.java350 private XmlResourceParser getResourceParser(int resId) throws XmlPullParserException, in getResourceParser() argument
352 XmlResourceParser parser = mResources.getXml(resId); in getResourceParser()
/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()
DSimpleCursorAdapterTest.java433 public static String createTestImage(Context context, String fileName, int resId) { in createTestImage() argument
438 source = context.getResources().openRawResource(resId); in createTestImage()
/cts/tests/tests/graphics/src/android/graphics/cts/
DBitmapRegionDecoderTest.java353 private InputStream obtainInputStream(int resId) { in obtainInputStream() argument
354 return mRes.openRawResource(resId); in obtainInputStream()
357 private byte[] obtainByteArray(int resId) throws IOException { in obtainByteArray() argument
358 InputStream is = obtainInputStream(resId); in obtainByteArray()
DBitmapFactoryTest.java381 private void decodeResourceWithReuse(Bitmap reuse, int resId, boolean hasAlpha) { in decodeResourceWithReuse() argument
387 Bitmap output = BitmapFactory.decodeResource(mRes, resId, options); in decodeResourceWithReuse()
589 private InputStream obtainInputStream(int resId) { in obtainInputStream() argument
590 return mRes.openRawResource(resId); in obtainInputStream()
611 private String obtainPath(int resId, long offset) throws IOException { in obtainPath() argument
621 InputStream is = obtainInputStream(resId); in obtainPath()
/cts/tests/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/tests/app/src/android/app/cts/
DInstrumentationTest.java198 final int resId = R.id.goto_menu_id; in testInvokeMenuActionSync() local
200 mInstrumentation.invokeMenuActionSync(mActivity, resId, 0); in testInvokeMenuActionSync()
203 assertEquals(resId, mActivity.getMenuID()); in testInvokeMenuActionSync()
611 public void setFeatureDrawableResource(int featureId, int resId) { in setFeatureDrawableResource() argument
/cts/tests/tests/net/src/android/net/cts/
DConnectivityManagerTest.java79 … int resId = getContext().getResources().getIdentifier("networkAttributes", "array", "android"); in setUp() local
80 String[] naStrings = getContext().getResources().getStringArray(resId); in setUp()

12