Home
last modified time | relevance | path

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

/cts/tests/tests/content/src/android/content/res/cts/
DArrayTest.java34 private void checkEntry(final int resid, final int index, final Object res, in checkEntry() argument
36 assertEquals("in resource 0x" + Integer.toHexString(resid) in checkEntry()
40 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
41 final String[] res = mResources.getStringArray(resid); in checkStringArray()
44 checkEntry(resid, i, res[i], expected[i]); in checkStringArray()
48 private void checkTextArray(final int resid, final String[] expected) { in checkTextArray() argument
49 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray()
52 checkEntry(resid, i, res[i], expected[i]); in checkTextArray()
56 private void checkIntArray(final int resid, final int[] expected) { in checkIntArray() argument
57 final int[] res = mResources.getIntArray(resid); in checkIntArray()
[all …]
DPrimitiveTest.java35 private void tryEnum(final int resid, final int expected) { in tryEnum() argument
36 final TypedArray sa = mContext.obtainStyledAttributes(resid, R.styleable.EnumStyle); in tryEnum()
41 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryEnum()
52 private void tryFlag(final int resid, final int expected) { in tryFlag() argument
53 final TypedArray sa = mContext.obtainStyledAttributes(resid, R.styleable.FlagStyle); in tryFlag()
58 + ": in resource 0x" + Integer.toHexString(resid), expected, value); in tryFlag()
70 private void tryBoolean(final int resid, final boolean expected) { in tryBoolean() argument
72 mContext.getResources().getValue(resid, v, true); in tryBoolean()
75 + " from TypedValue: in resource 0x" + Integer.toHexString(resid), in tryBoolean()
78 + " from getBoolean(): in resource 0x" + Integer.toHexString(resid), in tryBoolean()
[all …]
DResourceNameTest.java47 int resid = res.getIdentifier( in testGetResourceIdentifier() local
50 assertEquals(R.configVarying.simple, resid); in testGetResourceIdentifier()
52 resid = res.getIdentifier("configVarying/simple", null, in testGetResourceIdentifier()
54 assertEquals(R.configVarying.simple, resid); in testGetResourceIdentifier()
56 resid = res.getIdentifier("simple", "configVarying", in testGetResourceIdentifier()
58 assertEquals(R.configVarying.simple, resid); in testGetResourceIdentifier()
DResourcesTest.java475 int resid = mResources.getIdentifier(COM_ANDROID_CTS_STUB_IDENTIFIER, null, null); in testGetIdentifier() local
476 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
478 resid = mResources.getIdentifier(CONFIG_VARYING_SIMPLE, null, PACKAGE_NAME); in testGetIdentifier()
479 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
481 resid = mResources.getIdentifier(SIMPLE, CONFIG_VARYING, PACKAGE_NAME); in testGetIdentifier()
482 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
580 private static void checkString(final int resid, final String actual, final String expected) { in checkString() argument
582 + actual + "\" in resources 0x" + Integer.toHexString(resid), in checkString()
601 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
602 final String[] res = mResources.getStringArray(resid); in checkStringArray()
[all …]
DFractionTest.java76 private void tryFraction(final int resid, final float base, final float pbase, in tryFraction() argument
78 mResources.getValue(resid, mValue, true); in tryFraction()
87 + Integer.toHexString(resid) + " " + mValue, diff > prec); in tryFraction()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerTestBase.java148 protected boolean loadResource(int resid) throws Exception { in loadResource() argument
149 if (!MediaUtils.hasCodecsForResource(mContext, resid)) { in loadResource()
153 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource()
172 protected boolean checkLoadResource(int resid) throws Exception { in checkLoadResource() argument
173 return MediaUtils.check(loadResource(resid), "no decoder found"); in checkLoadResource()
176 protected void loadSubtitleSource(int resid) throws Exception { in loadSubtitleSource() argument
177 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource()
211 protected void playVideoTest(int resid, int width, int height) throws Exception { in playVideoTest() argument
212 if (!checkLoadResource(resid)) { in playVideoTest()
DMediaExtractorTest.java47 protected TestMediaDataSource getDataSourceFor(int resid) throws Exception { in getDataSourceFor() argument
48 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor()
52 protected TestMediaDataSource setDataSource(int resid) throws Exception { in setDataSource() argument
53 TestMediaDataSource ds = getDataSourceFor(resid); in setDataSource()
DMediaMetadataRetrieverTest.java47 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument
49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
57 protected TestMediaDataSource setDataSourceCallback(int resid) { in setDataSourceCallback() argument
60 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback()
DMediaRandomTest.java164 private void loadSource(int resid) throws Exception { in loadSource() argument
165 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSource()
179 private void testPlayerRandomAction(int resid) throws Exception { in testPlayerRandomAction() argument
193 loadSource(resid); in testPlayerRandomAction()
DMediaPlayerTest.java193 final int resid = R.raw.testmp3_3; in testPlayAudioFromDataURI() local
195 InputStream is = mContext.getResources().openRawResource(resid); in testPlayAudioFromDataURI()
251 final int resid = R.raw.testmp3_2;
256 MediaPlayer mp = MediaPlayer.create(mContext, resid);
287 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
305 final int resid = R.raw.testmp3;
307 MediaPlayer mp = MediaPlayer.create(mContext, resid);
342 final int resid = R.raw.midi8sec;
347 MediaPlayer mp = MediaPlayer.create(mContext, resid);
369 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
[all …]
DEncoderTest.java271 long startSeed, int resid, int mode) { in testEncoder() argument
285 "bps-" + mode + "-" + resid + "-" + startSeed + "-" + in testEncoder()
297 istream = mContext.getResources().openRawResource(resid); in testEncoder()
DMediaScannerTest.java71 private void writeFile(int resid, String path) throws IOException { in writeFile() argument
76 copier.copyToExternalStorage(resid, out); in writeFile()
DDecoderTest.java428 private void testTrackSelection(int resid) throws Exception { in testTrackSelection() argument
431 fd1 = mResources.openRawResourceFd(resid); in testTrackSelection()
1798 private void testCodecEarlyEOS(int resid, int eosFrame) throws Exception {
1799 if (!MediaUtils.checkCodecForResource(mContext, resid, 0 /* track */)) {
1803 int frames1 = countFrames(resid, RESET_MODE_NONE, eosFrame, s);
/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java45 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument
47 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.java39 protected void onApplyThemeResource(Theme theme, int resid, boolean first) { in onApplyThemeResource() argument
41 super.onApplyThemeResource(theme, resid, first); in onApplyThemeResource()
/cts/tests/tests/widget/src/android/widget/cts/
DImageSwitcherTest.java151 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
156 source = getContext().getResources().openRawResource(resid); in createSampleImage()
DImageViewTest.java85 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
90 source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DRemoteViewsTest.java616 private void createSampleImage(File imagefile, int resid) throws IOException { in createSampleImage() argument
621 source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DTextViewTest.java5230 private Bitmap getBitmap(int resid) { in getBitmap() argument
5231 return ((BitmapDrawable) getDrawable(resid)).getBitmap(); in getBitmap()
5234 private Drawable getDrawable(int resid) { in getDrawable() argument
5235 return mActivity.getResources().getDrawable(resid); in getDrawable()
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_FilesTest.java490 private void writeFile(int resid, String path) throws IOException { in writeFile() argument
495 copier.copyToExternalStorage(resid, out); in writeFile()