Home
last modified time | relevance | path

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

/cts/tests/tests/content/src/android/content/res/cts/
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 …]
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 …]
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.java571 int resid = mResources.getIdentifier(COM_ANDROID_CTS_STUB_IDENTIFIER, null, null); in testGetIdentifier() local
572 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
574 resid = mResources.getIdentifier(CONFIG_VARYING_SIMPLE, null, PACKAGE_NAME); in testGetIdentifier()
575 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
577 resid = mResources.getIdentifier(SIMPLE, CONFIG_VARYING, PACKAGE_NAME); in testGetIdentifier()
578 assertEquals(R.configVarying.simple, resid); in testGetIdentifier()
685 private static void checkString(final int resid, final String actual, final String expected) { in checkString() argument
687 + actual + "\" in resources 0x" + Integer.toHexString(resid), in checkString()
706 private void checkStringArray(final int resid, final String[] expected) { in checkStringArray() argument
707 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.java104 protected boolean loadResource(int resid) throws Exception { in loadResource() argument
105 if (!MediaUtils.hasCodecsForResource(mContext, resid)) { in loadResource()
109 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadResource()
128 protected boolean checkLoadResource(int resid) throws Exception { in checkLoadResource() argument
129 return MediaUtils.check(loadResource(resid), "no decoder found"); in checkLoadResource()
132 protected void loadSubtitleSource(int resid) throws Exception { in loadSubtitleSource() argument
133 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSubtitleSource()
172 protected void playVideoTest(int resid, int width, int height) throws Exception { in playVideoTest() argument
173 if (!checkLoadResource(resid)) { in playVideoTest()
DMediaRandomTest.java165 private void loadSource(int resid) throws Exception { in loadSource() argument
166 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in loadSource()
186 private void testPlayerRandomAction(int resid) throws Exception { in testPlayerRandomAction() argument
200 loadSource(resid); in testPlayerRandomAction()
DMediaPlayerTest.java207 final int resid = R.raw.testmp3_3; in testPlayAudioFromDataURI() local
209 InputStream is = mContext.getResources().openRawResource(resid); in testPlayAudioFromDataURI()
279 public void testPlayAudio(int resid,
282 MediaPlayer mp = MediaPlayer.create(mContext, resid);
313 AssetFileDescriptor afd = mResources.openRawResourceFd(resid);
331 final int resid = R.raw.test1m1s; // MP3 longer than 1m are usualy offloaded
334 List<MediaPlayer> mps = Stream.generate(() -> MediaPlayer.create(mContext, resid))
367 final int resid = R.raw.testmp3; in testPlayAudioLooping() local
369 MediaPlayer mp = MediaPlayer.create(mContext, resid); in testPlayAudioLooping()
404 final int resid = R.raw.midi8sec; in testPlayMidi() local
[all …]
DMediaExtractorTest.java75 protected TestMediaDataSource getDataSourceFor(int resid) throws Exception { in getDataSourceFor() argument
76 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor()
80 protected TestMediaDataSource setDataSource(int resid) throws Exception { in setDataSource() argument
81 TestMediaDataSource ds = getDataSourceFor(resid); in setDataSource()
352 final int resid = R.raw.MultiLangPerso_1PID_PC0_Select_AC4_H265_DVB_50fps_Audio_Only; in testGetAudioPresentations() local
353 TestMediaDataSource dataSource = setDataSource(resid); in testGetAudioPresentations()
DMediaMetadataRetrieverTest.java88 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument
90 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
98 protected TestMediaDataSource setDataSourceCallback(int resid) { in setDataSourceCallback() argument
101 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback()
110 protected TestMediaDataSource getFaultyDataSource(int resid, boolean throwing) { in getFaultyDataSource() argument
113 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getFaultyDataSource()
DEncoderTest.java302 long startSeed, int resid, int mode) { in testEncoder() argument
316 "bps-" + mode + "-" + resid + "-" + startSeed + "-" + in testEncoder()
328 istream = mContext.getResources().openRawResource(resid); in testEncoder()
DAudioPlaybackCaptureTest.java169 private MediaPlayer createMediaPlayer(@CapturePolicy int capturePolicy, int resid, in createMediaPlayer() argument
173 resid, in createMediaPlayer()
DRoutingTest.java570 final int resid = R.raw.testmp3_2; in allocMediaPlayer() local
571 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, resid); in allocMediaPlayer()
DMediaScannerTest.java82 private void writeFile(int resid, String path) throws IOException { in writeFile() argument
87 copier.copyToExternalStorage(resid, out); in writeFile()
DDecoderTest.java656 private void testTrackSelection(int resid) throws Exception { in testTrackSelection() argument
660 fd1 = mResources.openRawResourceFd(resid); in testTrackSelection()
2308 private void testCodecEarlyEOS(int resid, int eosFrame) throws Exception {
2309 if (!MediaUtils.checkCodecForResource(mContext, resid, 0 /* track */)) {
2313 int frames1 = countFrames(resid, RESET_MODE_NONE, eosFrame, s);
/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java47 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument
49 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/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/view/src/android/view/cts/
DContextThemeWrapperTest.java53 protected void onApplyThemeResource(Theme theme, int resid, boolean first) { in onApplyThemeResource() argument
55 super.onApplyThemeResource(theme, resid, first); in onApplyThemeResource()
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/
DSplitAppTest.java261 final int resid = resources.getIdentifier(resourceName, null, null); in assertResourcesDoNotExist() local
262 if (resid != 0) { in assertResourcesDoNotExist()
263 fail("Found resource '" + resourceName + "' with ID " + Integer.toHexString(resid)); in assertResourcesDoNotExist()
/cts/tests/tests/widget/src/android/widget/cts/
DImageSwitcherTest.java182 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
183 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DImageViewTest.java116 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument
117 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
DRemoteViewsTest.java922 private void createSampleImage(File imagefile, int resid) throws IOException { in createSampleImage() argument
923 try (InputStream source = mContext.getResources().openRawResource(resid); in createSampleImage()