Home
last modified time | relevance | path

Searched refs:mResources (Results 1 – 25 of 58) sorted by relevance

123

/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java59 private Resources mResources; field in ResourcesTest
65 mResources = getContext().getResources(); in setUp()
82 mResources.getString(-1, "%s"); in testGetString()
88 final String strGo = mResources.getString(R.string.go, "%1$s%%", 12); in testGetString()
93 final XmlPullParser parser = mResources.getXml(R.xml.test_color); in testObtainAttributes()
96 final TypedArray testTypedArray = mResources.obtainAttributes(set, R.styleable.Style1); in testObtainAttributes()
101 assertEquals(mResources, testTypedArray.getResources()); in testObtainAttributes()
107 mResources.obtainTypedArray(-1); in testObtainTypedArray()
113 final TypedArray ta = mResources.obtainTypedArray(R.array.string); in testObtainTypedArray()
118 assertEquals(mResources, ta.getResources()); in testObtainTypedArray()
[all …]
DPrimitiveTest.java27 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()
DArrayTest.java26 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()
DPluralResourcesTest.java34 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/
DContactsContract_CommonDataKinds_ImTest.java25 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()
DContactsContract_CommonDataKinds_StructuredPostalTest.java25 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()
DContactsContract_CommonDataKinds_SipAddressTest.java25 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()
DContactsContract_CommonDataKinds_EmailTest.java25 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()
DContactsContract_CommonDataKinds_OrganizationTest.java29 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()
DContactsContract_CommonDataKinds_RelationTest.java25 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()
DContactsContract_CommonDataKinds_PhoneTest.java25 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/preference2/src/android/preference2/cts/
DSwitchPreferenceTest.java30 private Resources mResources; field in SwitchPreferenceTest
42 mResources = mActivity.getResources(); in setUp()
47 String titleExp = mResources.getString(R.string.title_switch_preference); in testGetTitle()
53 String summaryExp = mResources.getString(R.string.summary_switch_preference); in testGetSummary()
59 String summaryOnExp = mResources.getString( in testGetSummaryOn()
66 String summaryOffExp = mResources.getString( in testSummaryOff()
83 final CharSequence switchOffExp = mResources.getString( in testSetSwitchTextOff_Two()
101 final CharSequence switchOnExp = mResources.getString( in testSetSwitchTextOn_Two()
/cts/tests/tests/opengl/src/android/opengl/cts/
DCompressedTextureCtsActivity.java29 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/
DLevelListDrawableTest.java51 private Resources mResources; field in LevelListDrawableTest
57 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup()
138 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
151 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
164 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingContent()
179 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParser()
186 mLevelListDrawable.inflate(mResources, parser, null); in testInflateWithNullAttrSet()
192 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate()
194 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate()
196 (LevelListDrawable) mResources.getDrawable(R.drawable.levellistdrawable); in testMutate()
[all …]
DVectorDrawableTest.java191 private Resources mResources; field in VectorDrawableTest
204 mResources = mContext.getResources(); in setup()
242 XmlPullParser parser = mResources.getXml(resIds[i]); in verifyVectorDrawables()
255 Theme theme = mResources.newTheme(); in verifyVectorDrawables()
257 vectorDrawable.inflate(mResources, parser, attrs, theme); in verifyVectorDrawables()
272 Bitmap golden = BitmapFactory.decodeResource(mResources, goldenImages[i]); in verifyVectorDrawables()
273 DrawableTestUtils.compareImages(mResources.getString(resIds[i]), mBitmap, golden, in verifyVectorDrawables()
299 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet()
351 VectorDrawable d1 = (VectorDrawable) mResources.getDrawable(R.drawable.vector_icon_create); in testMutate()
352 VectorDrawable d2 = (VectorDrawable) mResources.getDrawable(R.drawable.vector_icon_create); in testMutate()
[all …]
DPaintDrawableTest.java48 private Resources mResources; field in PaintDrawableTest
52 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup()
139 assertTrue(paintDrawable.inflateTag("padding", mResources, parser, attr)); in testInflateTag()
146 assertFalse(new MyPaintDrawable().inflateTag("", mResources, parser, attr)); in testInflateTag()
151 new MyPaintDrawable().inflateTag(null, mResources, parser, attr); in testInflateTag()
172 assertTrue(paintDrawable.inflateTag("padding", mResources, null, attr)); in testInflateTag()
176 new MyPaintDrawable().inflateTag("padding", mResources, parser, null); in testInflateTag()
188 assertTrue(paintDrawable.inflateTag("corners", mResources, parser, attr)); in testInflateTag()
193 return mResources.getXml(R.drawable.paintdrawable_attr); in getParser()
DVectorDrawableSizeTest.java40 private Resources mResources = null; field in VectorDrawableSizeTest
60 mResources = mContext.getResources(); in setup()
68 final int densityDpi = mResources.getConfiguration().densityDpi; in testVectorDrawableSize()
70 VectorDrawable drawable = (VectorDrawable) mResources.getDrawable(mResId, null); in testVectorDrawableSize()
DRotateDrawableTest.java63 private Resources mResources; field in RotateDrawableTest
68 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup()
69 mRotateDrawable = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in setup()
87 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_rel); in testInflate()
95 d = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable_abs); in testInflate()
178 Drawable drawable = mResources.getDrawable(R.drawable.pass); in testInvalidateDrawable()
263 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetIntrinsicWidthAndHeight()
268 XmlPullParser parser = mResources.getXml(R.drawable.rotatedrawable); in testGetIntrinsicWidthAndHeight()
273 rotateDrawable.inflate(mResources, parser, attrs); in testGetIntrinsicWidthAndHeight()
291 RotateDrawable d1 = (RotateDrawable) mResources.getDrawable(R.drawable.rotatedrawable); in testMutate()
[all …]
DDrawableTest.java73 private Resources mResources; field in DrawableTest
78 mResources = mContext.getResources(); in setup()
163 try (InputStream source = mResources.openRawResource(R.raw.testimage); in writeSampleImage()
233 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream1()
242 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream1()
283 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream2()
292 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream2()
315 XmlPullParser parser = mResources.getXml(R.drawable.gradientdrawable); in testCreateFromXml()
316 Drawable drawable = Drawable.createFromXml(mResources, parser); in testCreateFromXml()
319 Drawable expected = mResources.getDrawable(R.drawable.gradientdrawable, null); in testCreateFromXml()
[all …]
DAnimationDrawableTest.java66 private Resources mResources; field in AnimationDrawableTest
76 mResources = activity.getResources(); in setup()
167 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
186 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame()
191 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
196 drawable = mResources.getDrawable(R.drawable.scenery); in testGetFrame()
266 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect()
286 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingDrawable()
306 dr.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateNullXmlPullParser()
314 dr.inflate(mResources, parser, null); in testInflateNullAttributeSet()
[all …]
DAnimatedVectorDrawableTest.java67 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()
152 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
153 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
154 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
180 mResources.getDrawable(mResId).setAlpha(restoreAlpha); in testMutate()
187 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testGetOpacity()
197 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testColorFilter()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DMovieTest.java53 private Resources mResources; field in MovieTest
59 mResources = mContext.getResources(); in setup()
60 mMovie = mResources.getMovie(MOVIE); in setup()
92 try (InputStream source = mResources.openRawResource(MOVIE); in writeSampleImage()
118 InputStream is = mResources.openRawResource(MOVIE); in testDecodeByteArray()
129 try (InputStream is = mResources.openRawResource(MOVIE)) { in testDecodeStream()
148 int expectedHeight = mResources.getDrawable(MOVIE).getIntrinsicHeight(); in testGetMovieProperties()
152 int expectedWidth = mResources.getDrawable(MOVIE).getIntrinsicWidth(); in testGetMovieProperties()
DBitmapColorSpaceTest.java54 private Resources mResources; field in BitmapColorSpaceTest
58 mResources = InstrumentationRegistry.getTargetContext().getResources(); in setup()
151 Bitmap b = BitmapFactory.decodeResource(mResources, R.drawable.robot); in sRGB()
169 try (InputStream in = mResources.getAssets().open("green-p3.png")) { in p3()
191 try (InputStream in = mResources.getAssets().open("prophoto-rgba16f.png")) { in extendedSRGB()
213 try (InputStream in = mResources.getAssets().open("green-p3.png")) { in reconfigure()
242 try (InputStream in = mResources.getAssets().open("green-srgb.png")) { in reuse()
251 try (InputStream in = mResources.getAssets().open("green-p3.png")) { in reuse()
272 try (InputStream in = mResources.getAssets().open(fileName)) { in verifyGetPixel()
310 try (InputStream in = mResources.getAssets().open(fileName)) { in verifyGetPixels()
[all …]
/cts/tests/tests/security/src/android/security/cts/
DMediaMetadataRetrieverTest.java31 protected Resources mResources; field in MediaMetadataRetrieverTest
37 mResources = getContext().getResources(); in setUp()
49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerSurfaceStubActivity.java31 protected Resources mResources; field in MediaPlayerSurfaceStubActivity
40 mResources = getResources(); in onCreate()
44 AssetFileDescriptor afd = mResources.openRawResourceFd(R.raw.testvideo); in onCreate()

123