/cts/tests/tests/content/src/android/content/res/cts/ |
D | ResourcesTest.java | 65 private Resources mResources; field in ResourcesTest 71 mResources = getContext().getResources(); in setUp() 92 mResources.getString(-1, "%s"); in testGetString() 98 final String strGo = mResources.getString(R.string.go, "%1$s%%", 12); in testGetString() 103 final XmlPullParser parser = mResources.getXml(R.xml.test_color); in testObtainAttributes() 106 final TypedArray testTypedArray = mResources.obtainAttributes(set, R.styleable.Style1); in testObtainAttributes() 111 assertEquals(mResources, testTypedArray.getResources()); in testObtainAttributes() 117 mResources.obtainTypedArray(-1); in testObtainTypedArray() 123 final TypedArray ta = mResources.obtainTypedArray(R.array.string); in testObtainTypedArray() 128 assertEquals(mResources, ta.getResources()); in testObtainTypedArray() [all …]
|
D | PrimitiveTest.java | 27 private Resources mResources; field in PrimitiveTest 32 mResources = mContext.getResources(); in setUp() 117 mResources.getString(R.string.formattedStringNone), in testFormattedString() 120 mResources.getString(R.string.formattedStringOne), in testFormattedString() 123 mResources.getString(R.string.formattedStringTwo), in testFormattedString() 127 mResources.getString(R.string.formattedStringNone), in testFormattedString() 130 mResources.getString(R.string.formattedStringOne, 42), in testFormattedString() 133 mResources.getString(R.string.formattedStringTwo, "unused", "hi", 43), in testFormattedString()
|
D | ArrayTest.java | 26 private Resources mResources; field in ArrayTest 31 mResources = mContext.getResources(); in setUp() 41 final String[] res = mResources.getStringArray(resid); in checkStringArray() 49 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray() 57 final int[] res = mResources.getIntArray(resid); in checkIntArray()
|
D | PluralResourcesTest.java | 34 private Resources mResources; field in PluralResourcesTest 39 mResources = mContext.getResources(); in setUp() 44 config.updateFrom(mResources.getConfiguration()); in resourcesForLanguage() 46 return new Resources(mResources.getAssets(), mResources.getDisplayMetrics(), config); in resourcesForLanguage()
|
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
D | ContactsContract_CommonDataKinds_ImTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_ImTest 30 mResources = mContext.getResources(); in setUp() 59 String label = mResources.getString(res); in assertGetProtocolLabel() 60 assertEquals(label, Im.getProtocolLabel(mResources, type, "")); in assertGetProtocolLabel() 66 assertEquals(label, Im.getProtocolLabel(mResources, Im.PROTOCOL_CUSTOM, label)); in assertCustomProtocolLabel() 73 String label = mResources.getString(res); in assertGetTypeLabel() 74 assertEquals(label, Im.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 80 assertEquals(label, Im.getTypeLabel(mResources, Im.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_StructuredPostalTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_StructuredPostalTest 30 mResources = mContext.getResources(); in setUp() 45 String label = mResources.getString(res); in assertGetTypeLabel() 46 assertEquals(label, StructuredPostal.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 52 assertEquals(label, StructuredPostal.getTypeLabel(mResources, in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_SipAddressTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_SipAddressTest 30 mResources = mContext.getResources(); in setUp() 45 String label = mResources.getString(res); in assertGetTypeLabel() 46 assertEquals(label, SipAddress.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 52 assertEquals(label, SipAddress.getTypeLabel(mResources, SipAddress.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_EmailTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_EmailTest 30 mResources = mContext.getResources(); in setUp() 46 String label = mResources.getString(res); in assertGetTypeLabel() 47 assertEquals(label, Email.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 53 assertEquals(label, Email.getTypeLabel(mResources, Email.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_OrganizationTest.java | 29 private Resources mResources; field in ContactsContract_CommonDataKinds_OrganizationTest 34 mResources = mContext.getResources(); in setUp() 48 String label = mResources.getString(res); in assertGetTypeLabel() 49 assertEquals(label, Organization.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 55 assertEquals(label, Organization.getTypeLabel(mResources, Im.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_RelationTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_RelationTest 30 mResources = mContext.getResources(); in setUp() 56 String label = mResources.getString(res); in assertGetTypeLabel() 57 assertEquals(label, Relation.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 63 assertEquals(label, Relation.getTypeLabel(mResources, Relation.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
D | ContactsContract_CommonDataKinds_PhoneTest.java | 25 private Resources mResources; field in ContactsContract_CommonDataKinds_PhoneTest 30 mResources = mContext.getResources(); in setUp() 62 String label = mResources.getString(res); in assertGetTypeLabel() 63 assertEquals(label, Phone.getTypeLabel(mResources, type, "")); in assertGetTypeLabel() 69 assertEquals(label, Phone.getTypeLabel(mResources, Phone.TYPE_CUSTOM, label)); in assertCustomTypeLabel()
|
/cts/tests/tests/preference/src/android/preference/cts/ |
D | SwitchPreferenceTest.java | 28 private Resources mResources; field in SwitchPreferenceTest 40 mResources = mActivity.getResources(); in setUp() 45 String titleExp = mResources.getString(R.string.title_switch_preference); in testGetTitle() 51 String summaryExp = mResources.getString(R.string.summary_switch_preference); in testGetSummary() 57 String summaryOnExp = mResources.getString( in testGetSummaryOn() 64 String summaryOffExp = mResources.getString( in testSummaryOff() 81 final CharSequence switchOffExp = mResources.getString( in testSetSwitchTextOff_Two() 99 final CharSequence switchOnExp = mResources.getString( in testSetSwitchTextOn_Two()
|
/cts/tests/tests/opengl/src/android/opengl/cts/ |
D | CompressedTextureCtsActivity.java | 29 private Resources mResources; field in CompressedTextureCtsActivity 42 mResources = getResources(); in onCreate() 49 Bitmap bitmap = BitmapFactory.decodeResource(mResources, R.raw.basetex, optionsRGB); in onCreate() 54 compressed = CompressedTextureLoader.loadTextureDXT(mResources, R.raw.ddstex); in onCreate() 56 compressed = CompressedTextureLoader.loadTextureATC(mResources, 0); //cts for now in onCreate() 58 compressed = CompressedTextureLoader.loadTexturePVRTC(mResources, R.raw.pvrtex); in onCreate()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | VectorDrawableTest.java | 190 private Resources mResources; field in VectorDrawableTest 203 mResources = mContext.getResources(); in setup() 241 XmlPullParser parser = mResources.getXml(resIds[i]); in verifyVectorDrawables() 254 Theme theme = mResources.newTheme(); in verifyVectorDrawables() 256 vectorDrawable.inflate(mResources, parser, attrs, theme); in verifyVectorDrawables() 271 Bitmap golden = BitmapFactory.decodeResource(mResources, goldenImages[i]); in verifyVectorDrawables() 272 DrawableTestUtils.compareImages(mResources.getString(resIds[i]), mBitmap, golden, in verifyVectorDrawables() 298 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet() 350 VectorDrawable d1 = (VectorDrawable) mResources.getDrawable(R.drawable.vector_icon_create); in testMutate() 351 VectorDrawable d2 = (VectorDrawable) mResources.getDrawable(R.drawable.vector_icon_create); in testMutate() [all …]
|
D | LevelListDrawableTest.java | 52 private Resources mResources; field in LevelListDrawableTest 58 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup() 139 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 152 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate() 165 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingContent() 180 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParser() 187 mLevelListDrawable.inflate(mResources, parser, null); in testInflateWithNullAttrSet() 193 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate() 195 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate() 197 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate() [all …]
|
D | AnimatedVectorDrawableTest.java | 67 private Resources mResources; field in AnimatedVectorDrawableTest 76 mResources = mActivity.getResources(); in setup() 83 XmlPullParser parser = mResources.getXml(mResId); in testInflate() 98 drawable.inflate(mResources, parser, attrs); in testInflate() 115 XmlPullParser parser = mResources.getXml(mResId); in testGetOpticalInsets() 118 drawable.inflate(mResources, parser, attrs); in testGetOpticalInsets() 163 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 164 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 165 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 191 mResources.getDrawable(mResId).setAlpha(restoreAlpha); in testMutate() [all …]
|
D | PaintDrawableTest.java | 49 private Resources mResources; field in PaintDrawableTest 53 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup() 140 assertTrue(paintDrawable.inflateTag("padding", mResources, parser, attr)); in testInflateTag() 147 assertFalse(new MyPaintDrawable().inflateTag("", mResources, parser, attr)); in testInflateTag() 152 new MyPaintDrawable().inflateTag(null, mResources, parser, attr); in testInflateTag() 173 assertTrue(paintDrawable.inflateTag("padding", mResources, null, attr)); in testInflateTag() 177 new MyPaintDrawable().inflateTag("padding", mResources, parser, null); in testInflateTag() 189 assertTrue(paintDrawable.inflateTag("corners", mResources, parser, attr)); in testInflateTag() 194 return mResources.getXml(R.drawable.paintdrawable_attr); in getParser()
|
D | RotateDrawableTest.java | 64 private Resources mResources; field in RotateDrawableTest 69 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup() 70 mRotateDrawable = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in setup() 88 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_rel); in testInflate() 96 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_abs); in testInflate() 179 Drawable drawable = mResources.getDrawable(R.drawable.pass); in testInvalidateDrawable() 264 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetIntrinsicWidthAndHeight() 269 XmlPullParser parser = mResources.getXml(R.drawable.rotatedrawable); in testGetIntrinsicWidthAndHeight() 274 rotateDrawable.inflate(mResources, parser, attrs); in testGetIntrinsicWidthAndHeight() 292 RotateDrawable d1 = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in testMutate() [all …]
|
D | VectorDrawableSizeTest.java | 41 private Resources mResources = null; field in VectorDrawableSizeTest 61 mResources = mContext.getResources(); in setup() 69 final int densityDpi = mResources.getConfiguration().densityDpi; in testVectorDrawableSize() 71 VectorDrawable drawable = (VectorDrawable) mResources.getDrawable(mResId, null); in testVectorDrawableSize()
|
D | AnimationDrawableTest.java | 68 private Resources mResources; field in AnimationDrawableTest 79 mResources = activity.getResources(); in setup() 184 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames() 203 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame() 208 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame() 213 drawable = mResources.getDrawable(R.drawable.scenery); in testGetFrame() 283 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect() 303 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingDrawable() 323 dr.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateNullXmlPullParser() 331 dr.inflate(mResources, parser, null); in testInflateNullAttributeSet() [all …]
|
D | DrawableTest.java | 75 private Resources mResources; field in DrawableTest 80 mResources = mContext.getResources(); in setup() 169 try (InputStream source = mResources.openRawResource(R.raw.testimage)) { in testCreateFromIncomplete() 193 assertNotNull(Drawable.createFromResourceStream(mResources, new TypedValue(), in testCreateFromIncomplete() 198 assertNotNull(Drawable.createFromResourceStream(mResources, new TypedValue(), in testCreateFromIncomplete() 206 try (InputStream source = mResources.openRawResource(R.raw.testimage); in writeSampleImage() 309 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream1() 318 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream1() 359 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream2() 368 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream2() [all …]
|
D | NinePatchDrawableTest.java | 84 private Resources mResources; field in NinePatchDrawableTest 88 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup() 100 Bitmap bmp = BitmapFactory.decodeResource(mResources, R.drawable.ninepatch_0); in testConstructors() 101 String name = mResources.getResourceName(R.drawable.ninepatch_0); in testConstructors() 176 NinePatchDrawable npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_0); in testGetPadding() 184 npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_1); in testGetPadding() 380 mResources, bitmap, new byte[1000], null, "TESTNAME"); in testInflate() 383 int targetDensity = mResources.getDisplayMetrics().densityDpi; in testInflate() 391 XmlResourceParser parser = mResources.getXml(R.drawable.ninepatchdrawable); in testInflate() 397 ninePatchDrawable.inflate(mResources, parser, attrs); in testInflate() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | MovieTest.java | 54 private Resources mResources; field in MovieTest 60 mResources = mContext.getResources(); in setup() 61 mMovie = mResources.getMovie(MOVIE); in setup() 93 try (InputStream source = mResources.openRawResource(MOVIE); in writeSampleImage() 119 InputStream is = mResources.openRawResource(MOVIE); in testDecodeByteArray() 130 try (InputStream is = mResources.openRawResource(MOVIE)) { in testDecodeStream() 149 int expectedHeight = mResources.getDrawable(MOVIE).getIntrinsicHeight(); in testGetMovieProperties() 153 int expectedWidth = mResources.getDrawable(MOVIE).getIntrinsicWidth(); in testGetMovieProperties()
|
D | BitmapColorSpaceTest.java | 62 private Resources mResources; field in BitmapColorSpaceTest 66 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup() 218 Bitmap b = BitmapFactory.decodeResource(mResources, R.drawable.robot); in sRGB() 236 try (InputStream in = mResources.getAssets().open("green-p3.png")) { in p3() 258 try (InputStream in = mResources.getAssets().open("blue-16bit-srgb.png")) { in extendedSRGB() 281 try (InputStream in = mResources.getAssets().open(assetInLinearSRGB)) { in linearSRGB() 290 try (InputStream in = mResources.getAssets().open(assetInLinearSRGB)) { in linearSRGB() 322 try (InputStream in = mResources.getAssets().open(asset.name)) { in reconfigure() 354 try (InputStream in = mResources.getAssets().open("green-srgb.png")) { in reuse() 363 try (InputStream in = mResources.getAssets().open("green-p3.png")) { in reuse() [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | MediaMetadataRetrieverTest.java | 31 protected Resources mResources; field in MediaMetadataRetrieverTest 37 mResources = getContext().getResources(); in setUp() 49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
|