Home
last modified time | relevance | path

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

123

/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java65 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 …]
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/preference/src/android/preference/cts/
DSwitchPreferenceTest.java28 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/
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/
DVectorDrawableTest.java190 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 …]
DLevelListDrawableTest.java52 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 …]
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()
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 …]
DPaintDrawableTest.java49 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()
DRotateDrawableTest.java64 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 …]
DVectorDrawableSizeTest.java41 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()
DAnimationDrawableTest.java68 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 …]
DDrawableTest.java75 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 …]
DNinePatchDrawableTest.java84 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/
DMovieTest.java54 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()
DBitmapColorSpaceTest.java62 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/
DMediaMetadataRetrieverTest.java31 protected Resources mResources; field in MediaMetadataRetrieverTest
37 mResources = getContext().getResources(); in setUp()
49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()

123