/cts/tests/tests/content/src/android/content/res/cts/ |
D | ResourcesTest.java | 86 private Resources mResources; field in ResourcesTest 90 mResources = getContext().getResources(); in setUp() 114 mResources.getString(-1, "%s"); in testGetString() 120 final String strGo = mResources.getString(R.string.go, "%1$s%%", 12); in testGetString() 126 final XmlPullParser parser = mResources.getXml(R.xml.test_color); in testObtainAttributes() 129 final TypedArray testTypedArray = mResources.obtainAttributes(set, R.styleable.Style1); in testObtainAttributes() 134 assertEquals(mResources, testTypedArray.getResources()); in testObtainAttributes() 141 mResources.obtainTypedArray(-1); in testObtainTypedArray() 147 final TypedArray ta = mResources.obtainTypedArray(R.array.string); in testObtainTypedArray() 152 assertEquals(mResources, ta.getResources()); in testObtainTypedArray() [all …]
|
D | PrimitiveTest.java | 43 private Resources mResources; field in PrimitiveTest 47 mResources = getContext().getResources(); in setUp() 137 mResources.getString(R.string.formattedStringNone), in testFormattedString() 140 mResources.getString(R.string.formattedStringOne), in testFormattedString() 143 mResources.getString(R.string.formattedStringTwo), in testFormattedString() 147 mResources.getString(R.string.formattedStringNone), in testFormattedString() 150 mResources.getString(R.string.formattedStringOne, 42), in testFormattedString() 153 mResources.getString(R.string.formattedStringTwo, "unused", "hi", 43), in testFormattedString()
|
D | ArrayTest.java | 41 private Resources mResources; field in ArrayTest 45 mResources = getContext().getResources(); in setUp() 55 final String[] res = mResources.getStringArray(resid); in checkStringArray() 63 final CharSequence[] res = mResources.getTextArray(resid); in checkTextArray() 71 final int[] res = mResources.getIntArray(resid); in checkIntArray()
|
/cts/tests/tests/contactsprovider/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_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_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_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/hostsidetests/securitybulletin/test-apps/CVE-2021-39706/src/android/security/cts/CVE_2021_39706/ |
D | DeviceTest.java | 77 private Resources mResources; field in DeviceTest 83 assumeTrue(mResources.getString(R.string.openFail) + applicationName, in openApplication() 94 assumeTrue(mResources.getString(R.string.tapFail) + text, buttonClicked); in tapText() 116 mResources = mContext.getResources(); in setUp() 125 assumeFalse(mResources.getString(R.string.certInstalled), in testCredentialReset() 127 assumeTrue(mResources.getString(R.string.certInstallFail), in testCredentialReset() 130 assumeTrue(mResources.getString(R.string.certNotFound), isPocCaCertInstalled); in testCredentialReset() 133 ? mResources.getString(R.string.settingsPkgCar) in testCredentialReset() 134 : mResources.getString(R.string.settingsPkg); in testCredentialReset() 135 assumeTrue(settingsPkg + mResources.getString(R.string.pkgInstallFail), in testCredentialReset() [all …]
|
/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/hostsidetests/securitybulletin/test-apps/CVE-2021-39626/src/android/security/cts/CVE_2021_39626/ |
D | DeviceTest.java | 52 Resources mResources; field in DeviceTest 79 int result = mSharedPrefs.getInt(mResources.getString(R.string.resultKey), in tearDown() 80 mResources.getInteger(R.integer.assumptionFailure)); in tearDown() 81 String message = mSharedPrefs.getString(mResources.getString(R.string.messageKey), in tearDown() 82 mResources.getString(R.string.defaultSemaphoreMsg)); in tearDown() 108 mResources = mContext.getResources(); in testBtDiscoverable() 111 mResources.getString(R.string.sharedPreferences), Context.MODE_APPEND); in testBtDiscoverable() 117 if (key.equals(mResources.getString(R.string.resultKey))) { in testBtDiscoverable() 125 int result = mSharedPrefs.getInt(mResources.getString(R.string.resultKey), in testBtDiscoverable() 126 mResources.getInteger(R.integer.assumptionFailure)); in testBtDiscoverable() [all …]
|
/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 | 191 private Resources mResources; field in VectorDrawableTest 204 mResources = mContext.getResources(); in setup() 254 XmlPullParser parser = mResources.getXml(resIds[i]); in verifyVectorDrawables() 267 Theme theme = mResources.newTheme(); in verifyVectorDrawables() 269 vectorDrawable.inflate(mResources, parser, attrs, theme); in verifyVectorDrawables() 284 Bitmap golden = BitmapFactory.decodeResource(mResources, goldenImages[i]); in verifyVectorDrawables() 285 DrawableTestUtils.compareImages(mResources.getString(resIds[i]), mBitmap, golden, in verifyVectorDrawables() 309 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet() 361 VectorDrawable d1 = (VectorDrawable) mResources.getDrawable(R.drawable.vector_icon_create); in testMutate() 362 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 | 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 | 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 | AnimatedVectorDrawableTest.java | 76 private Resources mResources; field in AnimatedVectorDrawableTest 85 mResources = mActivity.getResources(); in setup() 92 XmlPullParser parser = mResources.getXml(mResId); in testInflate() 107 drawable.inflate(mResources, parser, attrs); in testInflate() 124 XmlPullParser parser = mResources.getXml(mResId); in testGetOpticalInsets() 127 drawable.inflate(mResources, parser, attrs); in testGetOpticalInsets() 172 AnimatedVectorDrawable d1 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 173 AnimatedVectorDrawable d2 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 174 AnimatedVectorDrawable d3 = (AnimatedVectorDrawable) mResources.getDrawable(mResId); in testMutate() 200 mResources.getDrawable(mResId).setAlpha(restoreAlpha); in testMutate() [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20415/src/android/security/cts/CVE_2022_20415/ |
D | DeviceTest.java | 50 private Resources mResources; field in DeviceTest 53 Bitmap testBitmap = Bitmap.createBitmap(mResources.getInteger(R.integer.width), in createNotificationIcon() 54 mResources.getInteger(R.integer.height), Bitmap.Config.ARGB_8888); in createNotificationIcon() 63 mResources.getInteger(R.integer.requestCodeIntent), in tryNotificationStart() 86 mResources.getInteger(R.integer.idTestNotification), pocNotification); in tryNotificationStart() 87 mNotificationManager.notify(mResources.getInteger(R.integer.idSummaryNotification), in tryNotificationStart() 96 mResources = mContext.getResources(); in testFullScreenIntent() 126 mNotificationManager.cancel(mResources.getInteger(R.integer.idSummaryNotification)); in testFullScreenIntent() 128 mResources.getInteger(R.integer.idTestNotification)); in testFullScreenIntent()
|
/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()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0487/src/android/security/cts/CVE_2021_0487/ |
D | DeviceTest.java | 58 Resources mResources; field in DeviceTest 96 mResources = mContext.getResources(); in testOverlayButtonPresence() 99 mResources.getString(R.string.sharedPreferences), Context.MODE_APPEND); in testOverlayButtonPresence() 105 if (key.equals(mResources.getString(R.string.resultKey))) { in testOverlayButtonPresence() 115 int result = sharedPrefs.getInt(mResources.getString(R.string.resultKey), in testOverlayButtonPresence() 116 mResources.getInteger(R.integer.assumptionFailure)); in testOverlayButtonPresence() 117 String message = sharedPrefs.getString(mResources.getString(R.string.messageKey), in testOverlayButtonPresence() 118 mResources.getString(R.string.defaultSemaphoreMsg)); in testOverlayButtonPresence() 119 assumeTrue(message, result != mResources.getInteger(R.integer.assumptionFailure)); in testOverlayButtonPresence()
|
/cts/hostsidetests/securitybulletin/test-apps/TestBluetoothDiscoverable/src/android/security/cts/TestBluetoothDiscoverable/ |
D | DeviceTest.java | 61 private Resources mResources; field in DeviceTest 76 mResources = sContext.getResources(); in setUp() 78 mStatusCode = mResources.getInteger(R.integer.assumptionFailure); in setUp() 87 .equals(mResources.getString(R.string.broadcastAction))) { in setUp() 89 intent.getIntExtra(mResources.getString(R.string.resultKey), in setUp() 90 mResources.getInteger(R.integer.assumptionFailure)); in setUp() 92 .getStringExtra(mResources.getString(R.string.messageKey)); in setUp() 167 mResources.getInteger(R.integer.timeoutMs))); in testConnectedDeviceDashboardFragment() 206 mResources.getInteger(R.integer.timeoutMs))); in testBluetoothDashboardFragment() 237 assumeTrue(mBroadcastReceived.tryAcquire(mResources.getInteger(R.integer.timeoutMs), in switchBluetoothMode() [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21129/src/android/security/cts/CVE_2023_21129/ |
D | PocService.java | 37 private Resources mResources; field in PocService 42 mResources = getResources(); in onStartCommand() 48 mResources.getInteger(R.integer.requestCode), in onStartCommand() 56 mResources.getInteger(R.integer.requestCode), in onStartCommand() 94 .setDesiredHeight(mResources.getInteger(R.integer.bubbleMetaDataheight)) in onStartCommand() 118 mResources.getInteger(R.integer.idPocNotification), in onStartCommand()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | MediaMetadataRetrieverTest.java | 30 protected Resources mResources; field in MediaMetadataRetrieverTest 36 mResources = getContext().getResources(); in setUp() 48 AssetFileDescriptor afd = mResources.openRawResourceFd(resid); in setDataSourceFd()
|