/cts/tests/tests/content/src/android/content/res/cts/ |
D | PrimitiveTest.java | 35 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 …]
|
D | ArrayTest.java | 34 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 …]
|
D | ResourceNameTest.java | 47 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()
|
D | ResourcesTest.java | 571 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 …]
|
D | FractionTest.java | 76 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/ |
D | MediaPlayerTestBase.java | 104 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()
|
D | MediaRandomTest.java | 165 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()
|
D | MediaPlayerTest.java | 207 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 …]
|
D | MediaExtractorTest.java | 75 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()
|
D | MediaMetadataRetrieverTest.java | 88 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()
|
D | EncoderTest.java | 302 long startSeed, int resid, int mode) { in testEncoder() argument 316 "bps-" + mode + "-" + resid + "-" + startSeed + "-" + in testEncoder() 328 istream = mContext.getResources().openRawResource(resid); in testEncoder()
|
D | AudioPlaybackCaptureTest.java | 169 private MediaPlayer createMediaPlayer(@CapturePolicy int capturePolicy, int resid, in createMediaPlayer() argument 173 resid, in createMediaPlayer()
|
D | RoutingTest.java | 570 final int resid = R.raw.testmp3_2; in allocMediaPlayer() local 571 MediaPlayer mediaPlayer = MediaPlayer.create(mContext, resid); in allocMediaPlayer()
|
D | MediaScannerTest.java | 82 private void writeFile(int resid, String path) throws IOException { in writeFile() argument 87 copier.copyToExternalStorage(resid, out); in writeFile()
|
D | DecoderTest.java | 656 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/ |
D | MediaMetadataRetrieverTest.java | 47 protected void setDataSourceFd(int resid) { in setDataSourceFd() argument 49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
|
/cts/tests/app/app/src/android/app/stubs/ |
D | AppStubActivity.java | 136 int resid, in onApplyThemeResource() argument 138 super.onApplyThemeResource(theme,resid,first); in onApplyThemeResource()
|
/cts/tests/tests/widget/src/android/widget/cts/util/ |
D | TestUtils.java | 419 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/ |
D | ContextThemeWrapperTest.java | 53 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/ |
D | SplitAppTest.java | 261 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/ |
D | ImageSwitcherTest.java | 182 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument 183 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
|
D | ImageViewTest.java | 116 private void createSampleImage(File imagefile, int resid) { in createSampleImage() argument 117 try (InputStream source = mActivity.getResources().openRawResource(resid); in createSampleImage()
|
D | RemoteViewsTest.java | 922 private void createSampleImage(File imagefile, int resid) throws IOException { in createSampleImage() argument 923 try (InputStream source = mContext.getResources().openRawResource(resid); in createSampleImage()
|