Home
last modified time | relevance | path

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

12

/cts/tests/tests/content/src/android/content/res/cts/
DResourcesTest.java54 private Resources mResources; field in ResourcesTest
60 mResources = getContext().getResources(); in setUp()
77 mResources.getString(-1, "%s"); in testGetString()
83 final String strGo = mResources.getString(R.string.go, "%1$s%%", 12); in testGetString()
88 final XmlPullParser parser = mResources.getXml(R.xml.test_color); in testObtainAttributes()
91 final TypedArray testTypedArray = mResources.obtainAttributes(set, R.styleable.Style1); in testObtainAttributes()
96 assertEquals(mResources, testTypedArray.getResources()); in testObtainAttributes()
102 mResources.obtainTypedArray(-1); in testObtainTypedArray()
108 final TypedArray ta = mResources.obtainTypedArray(R.array.string); in testObtainTypedArray()
113 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()
DRawResourceTest.java28 private Resources mResources; field in RawResourceTest
33 mResources = mContext.getResources(); in setUp()
38 final InputStream is = mResources.openRawResource(R.raw.text); in testReadToEnd()
DFractionTest.java27 private Resources mResources; field in FractionTest
33 mResources = mContext.getResources(); in setUp()
78 mResources.getValue(resid, mValue, true); in tryFraction()
/cts/tests/tests/provider/src/android/provider/cts/
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_OrganizationTest.java26 private Resources mResources; field in ContactsContract_CommonDataKinds_OrganizationTest
31 mResources = mContext.getResources(); in setUp()
45 String label = mResources.getString(res); in assertGetTypeLabel()
46 assertEquals(label, Organization.getTypeLabel(mResources, type, "")); in assertGetTypeLabel()
52 assertEquals(label, Organization.getTypeLabel(mResources, Im.TYPE_CUSTOM, label)); 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_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/graphics/src/android/opengl/cts/
DCompressedTextureCtsActivity.java34 protected Resources mResources; field in CompressedTextureCtsActivity
47 mResources = getResources(); in onCreate()
54 Bitmap bitmap = BitmapFactory.decodeResource(mResources, R.raw.basetex, optionsRGB); in onCreate()
59 compressed = CompressedTextureLoader.loadTextureDXT(mResources, R.raw.ddstex); in onCreate()
61 compressed = CompressedTextureLoader.loadTextureATC(mResources, 0); //cts for now in onCreate()
63 compressed = CompressedTextureLoader.loadTexturePVRTC(mResources, R.raw.pvrtex); in onCreate()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAnimatedVectorDrawableTest.java47 private Resources mResources; field in AnimatedVectorDrawableTest
67 mResources = mActivity.getResources(); in setUp()
80 String originalFilePath = mResources.getString(resId); in saveVectorDrawableIntoPNG()
104 XmlPullParser parser = mResources.getXml(mResId); in testInflate()
117 mAnimatedVectorDrawable.inflate(mResources, parser, attrs); in testInflate()
167 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
168 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
169 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate()
194 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testReset()
208 final AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testAddCallback()
[all …]
DAnimationDrawableTest.java50 private Resources mResources; field in AnimationDrawableTest
60 mResources = activity.getResources(); in setUp()
183 Drawable frame = mResources.getDrawable(R.drawable.failed); in testGetNumberOfFrames()
201 Drawable drawable = mResources.getDrawable(R.drawable.testimage); in testGetFrame()
206 drawable = mResources.getDrawable(R.drawable.pass); in testGetFrame()
211 drawable = mResources.getDrawable(R.drawable.scenery); in testGetFrame()
283 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateCorrect()
302 dr.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflateMissingDrawable()
324 dr.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateNullXmlPullParser()
335 dr.inflate(mResources, parser, null); in testInflateNullAttributeSet()
[all …]
DNinePatchDrawableTest.java51 private Resources mResources; field in NinePatchDrawableTest
56 mResources = getInstrumentation().getTargetContext().getResources(); in setUp()
67 Bitmap bmp = BitmapFactory.decodeResource(mResources, R.drawable.ninepatch_0); in testConstructors()
68 String name = mResources.getResourceName(R.drawable.ninepatch_0); in testConstructors()
142 NinePatchDrawable npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_0); in testGetPadding()
150 npd = (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatch_1); in testGetPadding()
319 new NinePatchDrawable(mResources, bitmap, new byte[1000], null, "TESTNAME"); in testInflate()
323 XmlResourceParser parser = mResources.getXml(R.drawable.ninepatchdrawable); in testInflate()
329 ninePatchDrawable.inflate(mResources, parser, attrs); in testInflate()
338 (NinePatchDrawable) mResources.getDrawable(R.drawable.ninepatchdrawable); in testMutate()
[all …]
DStateListDrawableTest.java43 private Resources mResources; field in StateListDrawableTest
52 mResources = getInstrumentation().getTargetContext().getResources(); in setUp()
160 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
181 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
199 mStateListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
214 mStateListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters()
220 mStateListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters()
228 (StateListDrawable) mResources.getDrawable(R.drawable.statelistdrawable); in testMutate()
230 (StateListDrawable) mResources.getDrawable(R.drawable.statelistdrawable); in testMutate()
232 (StateListDrawable) mResources.getDrawable(R.drawable.statelistdrawable); in testMutate()
DLevelListDrawableTest.java40 private Resources mResources; field in LevelListDrawableTest
49 mResources = getInstrumentation().getTargetContext().getResources(); in setUp()
116 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
129 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
139 mLevelListDrawable.inflate(mResources, parser, Xml.asAttributeSet(parser)); in testInflate()
154 mLevelListDrawable.inflate(mResources, null, Xml.asAttributeSet(parser)); in testInflateWithNullParameters()
160 mLevelListDrawable.inflate(mResources, parser, null); in testInflateWithNullParameters()
DDrawableTest.java50 Resources mResources; field in DrawableTest
56 mResources = mContext.getResources(); in setUp()
142 source = mResources.openRawResource(R.raw.testimage); in writeSampleImage()
220 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream1()
229 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream1()
270 assertNull(Drawable.createFromResourceStream(mResources, null, inputEmptyStream, in testCreateFromResourceStream2()
279 assertNotNull(Drawable.createFromResourceStream(mResources, value, inputStream, in testCreateFromResourceStream2()
302 XmlPullParser parser = mResources.getXml(R.drawable.gradientdrawable); in testCreateFromXml()
303 Drawable drawable = Drawable.createFromXml(mResources, parser); in testCreateFromXml()
310 XmlPullParser parser = mResources.getXml(R.drawable.gradientdrawable); in testCreateFromXmlInner()
[all …]
/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()
DMediaExtractorTest.java31 protected Resources mResources; field in MediaExtractorTest
37 mResources = getContext().getResources(); in setUp()
48 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in getDataSourceFor()
DMediaMetadataRetrieverTest.java31 protected Resources mResources; field in MediaMetadataRetrieverTest
37 mResources = getContext().getResources(); in setUp()
49 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
60 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceCallback()
/cts/tests/tests/widget/src/android/widget/cts/
DAbsSeekBarTest.java49 private Resources mResources; field in AbsSeekBarTest
55 mResources = mActivity.getResources(); in setUp()
84 Drawable drawable1 = mResources.getDrawable(R.drawable.scenery); in testSetThumb()
85 Drawable drawable2 = mResources.getDrawable(R.drawable.pass); in testSetThumb()
115 Drawable drawable1 = mResources.getDrawable(R.drawable.scenery); in testVerifyDrawable()
116 Drawable drawable2 = mResources.getDrawable(R.drawable.pass); in testVerifyDrawable()
117 Drawable drawable3 = mResources.getDrawable(R.drawable.blue); in testVerifyDrawable()
118 Drawable drawable4 = mResources.getDrawable(R.drawable.black); in testVerifyDrawable()

12