Home
last modified time | relevance | path

Searched refs:resid (Results 1 – 17 of 17) sorted by relevance

/cts/tests/tests/content/src/android/content/res/cts/
DPrimitiveTest.java50 private void tryEnum(final int resid, final int expected) { in tryEnum() argument
51 final TypedArray sa = getContext().obtainStyledAttributes(resid, R.styleable.EnumStyle); in tryEnum()
56 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryEnum()
68 private void tryFlag(final int resid, final int expected) { in tryFlag() argument
69 final TypedArray sa = getContext().obtainStyledAttributes(resid, R.styleable.FlagStyle); in tryFlag()
74 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryFlag()
87 private void tryBoolean(final int resid, final boolean expected) { in tryBoolean() argument
89 getContext().getResources().getValue(resid, v, true); in tryBoolean()
92 + " from TypedValue: in resource 0x" + Integer.toHexString(resid), in tryBoolean()
95 + " from getBoolean(): in resource 0x" + Integer.toHexString(resid), in tryBoolean()
[all …]
DArrayTest.java48 private void checkEntry(final int resid, final int index, final Object res, in checkEntry() argument
50 assertEquals("in resource 0x" + Integer.toHexString(resid) in checkEntry()
54 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
55 final String[] res = mResources.getStringArray(resid); in checkStringArray()
58 checkEntry(resid, i, res[i], expected[i]); in checkStringArray()
62 private void checkTextArray(final int resid, final String[] expected) { in checkTextArray() argument
63 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray()
66 checkEntry(resid, i, res[i], expected[i]); in checkTextArray()
70 private void checkIntArray(final int resid, final int[] expected) { in checkIntArray() argument
71 final int[] res = mResources.getIntArray(resid); in checkIntArray()
[all …]
DResourceNameTest.java62 int resid = res.getIdentifier( in testGetResourceIdentifier() local
65 assertEquals(R.string.simple, resid); in testGetResourceIdentifier()
67 resid = res.getIdentifier("string/simple", null, in testGetResourceIdentifier()
69 assertEquals(R.string.simple, resid); in testGetResourceIdentifier()
71 resid = res.getIdentifier("simple", "string", in testGetResourceIdentifier()
73 assertEquals(R.string.simple, resid); in testGetResourceIdentifier()
DResourcesTest.java814 int resid = mResources.getIdentifier(COM_ANDROID_CTS_STUB_IDENTIFIER, null, null); in testGetIdentifier() local
815 assertEquals(R.string.simple, resid); in testGetIdentifier()
817 resid = mResources.getIdentifier(STRING_SIMPLE, null, PACKAGE_NAME); in testGetIdentifier()
818 assertEquals(R.string.simple, resid); in testGetIdentifier()
820 resid = mResources.getIdentifier(SIMPLE, STRING, PACKAGE_NAME); in testGetIdentifier()
821 assertEquals(R.string.simple, resid); in testGetIdentifier()
934 private static void checkString(final int resid, final String actual, final String expected) { in checkString() argument
936 + actual + "\" in resources 0x" + Integer.toHexString(resid), in checkString()
956 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
957 final String[] res = mResources.getStringArray(resid); in checkStringArray()
[all …]
DFractionTest.java91 private void tryFraction(final int resid, final float base, final float pbase, in tryFraction() argument
93 mResources.getValue(resid, mValue, true); in tryFraction()
102 + Integer.toHexString(resid) + " " + mValue, diff > prec); in tryFraction()
/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java46 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument
48 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
/cts/tests/app/app/src/android/app/stubs/
DAppStubActivity.java136 int resid, in onApplyThemeResource() argument
138 super.onApplyThemeResource(theme,resid,first); in onApplyThemeResource()
/cts/tests/tests/view/src/android/view/cts/
DContextThemeWrapperTest.java55 protected void onApplyThemeResource(Theme theme, int resid, boolean first) { in onApplyThemeResource() argument
57 super.onApplyThemeResource(theme, resid, first); in onApplyThemeResource()
/cts/tests/tests/widget/src/android/widget/cts/util/
DTestUtils.java419 public static Drawable getDrawable(Context context, @DrawableRes int resid) {
420 return context.getResources().getDrawable(resid);
423 public static Bitmap getBitmap(Context context, @DrawableRes int resid) {
424 return ((BitmapDrawable) getDrawable(context, resid)).getBitmap();
/cts/tests/tests/widget/src/android/widget/cts/
DImageSwitcherTest.java190 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
191 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DImageViewTest.java125 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
126 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DRemoteViewsTest.java2418 private void createSampleImage(File imagefile, int resid) throws IOException { in createSampleImage() argument
2419 try (InputStream source = mContext.getResources().openRawResource(resid); in createSampleImage()
/cts/tests/tests/media/audio/src/android/media/audio/cts/
DRemoteSubmixTest.java148 @CapturePolicy int capturePolicy, int resid, @AttributeUsage int usage) { in createMediaPlayer() argument
149 MediaPlayer mediaPlayer = MediaPlayer.create(mActivity, resid, in createMediaPlayer()
DAudioPlaybackCaptureTest.java178 private MediaPlayer createMediaPlayer(@CapturePolicy int capturePolicy, int resid, in createMediaPlayer() argument
182 resid, in createMediaPlayer()
DRoutingTest.java607 final int resid = R.raw.testmp3_2; in allocMediaPlayer() local
608 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, resid); in allocMediaPlayer()
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/
DSplitAppTest.java422 final int resid = resources.getIdentifier(resourceName, null, null); in assertResourcesDoNotExist() local
423 if (resid != 0) { in assertResourcesDoNotExist()
424 fail("Found resource '" + resourceName + "' with ID " + Integer.toHexString(resid)); in assertResourcesDoNotExist()
/cts/tests/tests/media/misc/src/android/media/misc/cts/
DMediaScannerTest.java101 private void writeFile(int resid, String path) throws IOException { in writeFile() argument
106 copier.copyToExternalStorage(resid, out); in writeFile()