Home
last modified time | relevance | path

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

1234

/frameworks/support/v7/appcompat/src/android/support/v7/widget/
DResourcesWrapper.java44 private final Resources mResources; field in ResourcesWrapper
48 mResources = resources; in ResourcesWrapper()
53 return mResources.getText(id); in getText()
58 return mResources.getQuantityText(id, quantity); in getQuantityText()
63 return mResources.getString(id); in getString()
68 return mResources.getString(id, formatArgs); in getString()
74 return mResources.getQuantityString(id, quantity, formatArgs); in getQuantityString()
79 return mResources.getQuantityString(id, quantity); in getQuantityString()
84 return mResources.getText(id, def); in getText()
89 return mResources.getTextArray(id); in getTextArray()
[all …]
DTintContextWrapper.java87 private final Resources mResources; field in TintContextWrapper
96 mResources = new VectorEnabledTintResources(this, base.getResources()); in TintContextWrapper()
97 mTheme = mResources.newTheme(); in TintContextWrapper()
100 mResources = new TintResources(this, base.getResources()); in TintContextWrapper()
121 return mResources; in getResources()
127 return mResources.getAssets(); in getAssets()
/frameworks/support/compat/tests/java/android/support/v4/content/res/
DResourcesCompatTest.java42 private Resources mResources; field in ResourcesCompatTest
47 mResources = mContext.getResources(); in setup()
53 ResourcesCompat.getColor(mResources, R.color.text_color, null), in testGetColor()
59 final Resources.Theme yellowTheme = mResources.newTheme(); in testGetColor()
62 ResourcesCompat.getColor(mResources, R.color.simple_themed_selector, in testGetColor()
65 final Resources.Theme lilacTheme = mResources.newTheme(); in testGetColor()
68 ResourcesCompat.getColor(mResources, R.color.simple_themed_selector, in testGetColor()
76 ResourcesCompat.getColorStateList(mResources, R.color.complex_unthemed_selector, in testGetColorStateList()
90 final Resources.Theme yellowTheme = mResources.newTheme(); in testGetColorStateList()
93 ResourcesCompat.getColorStateList(mResources, R.color.complex_themed_selector, in testGetColorStateList()
[all …]
DFontResourcesParserCompatTest.java54 private Resources mResources; field in FontResourcesParserCompatTest
59 mResources = mInstrumentation.getContext().getResources(); in setup()
65 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfont); in testParse()
67 FamilyResourceEntry result = FontResourcesParserCompat.parse(parser, mResources); in testParse()
94 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont); in testParseDownloadableFont()
96 FamilyResourceEntry result = FontResourcesParserCompat.parse(parser, mResources); in testParseDownloadableFont()
109 List<List<byte[]>> result = FontResourcesParserCompat.readCerts(mResources, R.array.certs1); in testReadCertsSingleArray()
123 FontResourcesParserCompat.readCerts(mResources, R.array.certarray); in testReadCertsMultiArray()
/frameworks/base/core/tests/coretests/src/android/graphics/
DColorStateListTest.java32 private Resources mResources; field in ColorStateListTest
38 mResources = mContext.getResources(); in setUp()
39 mFailureColor = mResources.getColor(R.color.failColor); in setUp()
44 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testStateIsInList()
47 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList()
52 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testEmptyState()
55 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState()
60 int defaultColor = mResources.getColor(R.color.color1); in testGetColor()
61 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor()
66 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault()
[all …]
DGraphicsPerformanceTests.java121 private Resources mResources; field in GraphicsPerformanceTests.DecodeBitmapTest
130 mResources = context.getResources(); in setUp()
131 Assert.assertNotNull(mResources); in setUp()
141 BitmapFactory.decodeResource(mResources, R.drawable.test16x12); in testDecodeBitmap()
142 BitmapFactory.decodeResource(mResources, R.drawable.test32x24); in testDecodeBitmap()
143 BitmapFactory.decodeResource(mResources, R.drawable.test64x48); in testDecodeBitmap()
144 BitmapFactory.decodeResource(mResources, R.drawable.test128x96); in testDecodeBitmap()
145 BitmapFactory.decodeResource(mResources, R.drawable.test256x192); in testDecodeBitmap()
146 BitmapFactory.decodeResource(mResources, R.drawable.test320x240); in testDecodeBitmap()
/frameworks/support/compat/tests/java/android/support/v4/graphics/
DTypefaceCompatTest.java55 public Resources mResources; field in TypefaceCompatTest
60 mResources = mContext.getResources(); in setUp()
127 mResources.getXml(id), mResources); in getProviderResourceEntry()
140 getProviderResourceEntry(R.font.styletest_sync_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
146 getProviderResourceEntry(R.font.styletest_sync_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
152 getProviderResourceEntry(R.font.styletest_sync_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
158 getProviderResourceEntry(R.font.styletest_sync_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_syncloading()
180 getProviderResourceEntry(R.font.styletest_async_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_asyncloading()
192 getProviderResourceEntry(R.font.styletest_async_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_asyncloading()
204 getProviderResourceEntry(R.font.styletest_async_providerfont), mResources, in testCreateFromResourcesFamilyXml_resourceFont_asyncloading()
[all …]
/frameworks/support/v7/appcompat/tests/src/android/support/v7/widget/
DAppCompatBaseViewTest.java69 protected Resources mResources; field in AppCompatBaseViewTest
79 mResources = mActivity.getResources(); in setUp()
129 mResources, R.color.color_state_list_sand, null); in testBackgroundTintingWithNoBackground()
173 mResources, R.color.color_state_list_lilac, null); in testBackgroundTintingViewCompatWithNoBackground()
197 mResources, R.color.lilac_default, null); in testBackgroundTintingAcrossStateChange()
199 mResources, R.color.lilac_disabled, null); in testBackgroundTintingAcrossStateChange()
201 mResources, R.color.sand_default, null); in testBackgroundTintingAcrossStateChange()
203 mResources, R.color.sand_disabled, null); in testBackgroundTintingAcrossStateChange()
205 mResources, R.color.ocean_default, null); in testBackgroundTintingAcrossStateChange()
207 mResources, R.color.ocean_disabled, null); in testBackgroundTintingAcrossStateChange()
[all …]
DPopupMenuTest.java96 private Resources mResources; field in PopupMenuTest
105 mResources = mActivityTestRule.getActivity().getResources(); in setUp()
131 assertEquals(mResources.getString(R.string.popup_menu_highlight_description), in testBasicContent()
133 assertEquals(mResources.getString(R.string.popup_menu_highlight_tooltip), in testBasicContent()
143 mResources.getString(R.string.popup_menu_edit_description)); in testBasicContent()
145 mResources.getString(R.string.popup_menu_edit_tooltip)); in testBasicContent()
160 onView(withText(mResources.getString(R.string.popup_menu_highlight))) in testBasicContent()
164 mResources.getString(R.string.popup_menu_highlight_description)))); in testBasicContent()
166 onView(withText(mResources.getString(R.string.popup_menu_edit))) in testBasicContent()
170 mResources.getString(R.string.popup_menu_edit_description)))); in testBasicContent()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DFontResourcesParserTest.java51 private Resources mResources; field in FontResourcesParserTest
56 mResources = mInstrumentation.getContext().getResources(); in setup()
61 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfont); in testParse()
63 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParse()
89 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont); in testParseDownloadableFont()
91 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont()
102 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontsinglecerts); in testParseDownloadableFont_singleCerts()
104 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_singleCerts()
123 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontmulticerts); in testParseDownloadableFont_multipleCerts()
125 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_multipleCerts()
/frameworks/support/v7/appcompat/tests/src/android/support/v7/app/
DAppCompatMenuItemIconTintingTest.java55 private Resources mResources; field in AppCompatMenuItemIconTintingTest
65 mResources = mActivity.getResources(); in setup()
132 mResources, R.color.color_state_list_sand, null); in testIconTintingWithNoIcon()
151 mResources, R.color.sand_default, null); in testIconTintingAcrossTintListChange()
153 mResources, R.color.ocean_default, null); in testIconTintingAcrossTintListChange()
161 mResources, R.color.color_state_list_sand, null); in testIconTintingAcrossTintListChange()
168 mResources, R.color.color_state_list_ocean, null); in testIconTintingAcrossTintListChange()
192 mResources, R.color.color_state_list_lilac, null); in testIconOpaqueTintingAcrossIconChange()
194 mResources, R.color.lilac_default, null); in testIconOpaqueTintingAcrossIconChange()
228 mResources, R.color.color_state_list_emerald_translucent, null); in testIconTranslucentTintingAcrossIconChange()
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/tethering/
DTetheringConfigurationTest.java57 @Mock private Resources mResources; field in TetheringConfigurationTest
67 public Resources getResources() { return mResources; } in getResources()
81 when(mResources.getStringArray(com.android.internal.R.array.config_tether_dhcp_range)) in setUp()
83 when(mResources.getStringArray(com.android.internal.R.array.config_tether_usb_regexs)) in setUp()
85 when(mResources.getStringArray(com.android.internal.R.array.config_tether_wifi_regexs)) in setUp()
87 when(mResources.getStringArray(com.android.internal.R.array.config_tether_bluetooth_regexs)) in setUp()
94 when(mResources.getIntArray(com.android.internal.R.array.config_tether_upstream_types)) in testDunFromTelephonyManagerMeansDun()
110 when(mResources.getIntArray(com.android.internal.R.array.config_tether_upstream_types)) in testDunNotRequiredFromTelephonyManagerMeansNoDun()
126 when(mResources.getIntArray(com.android.internal.R.array.config_tether_upstream_types)) in testDunFromUpstreamConfigMeansDun()
143 when(mResources.getIntArray(com.android.internal.R.array.config_tether_upstream_types)) in testNoDefinedUpstreamTypesAddsEthernet()
[all …]
/frameworks/base/core/java/android/view/
DContextThemeWrapper.java35 private Resources mResources; field in ContextThemeWrapper
94 if (mResources != null) { in applyOverrideConfiguration()
125 if (mResources == null) { in getResourcesInternal()
127 mResources = super.getResources(); in getResourcesInternal()
130 mResources = resContext.getResources(); in getResourcesInternal()
133 return mResources; in getResourcesInternal()
/frameworks/support/v7/appcompat/src/android/support/v7/view/
DContextThemeWrapper.java44 private Resources mResources; field in ContextThemeWrapper
103 if (mResources != null) { in applyOverrideConfiguration()
128 if (mResources == null) { in getResourcesInternal()
130 mResources = super.getResources(); in getResourcesInternal()
133 mResources = resContext.getResources(); in getResourcesInternal()
136 return mResources; in getResourcesInternal()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DBatteryMeterDrawableTest.java44 private Resources mResources; field in BatteryMeterDrawableTest
49 mResources = mContext.getResources(); in setUp()
84 int criticalLevel = mResources.getInteger( in testDrawTextWarningAtCriticalLevel()
90 String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol); in testDrawTextWarningAtCriticalLevel()
96 int criticalLevel = mResources.getInteger( in testDrawTextNoWarningAboveCriticalLevel()
102 String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol); in testDrawTextNoWarningAboveCriticalLevel()
/frameworks/support/graphics/drawable/static/tests/src/android/support/graphics/drawable/tests/
DVectorDrawableTest.java131 private Resources mResources; field in VectorDrawableTest
146 mResources = mContext.getResources(); in setup()
159 mVectorDrawable = VectorDrawableCompat.create(mResources, resIds[i], mTheme); in verifyVectorDrawables()
172 Bitmap golden = BitmapFactory.decodeResource(mResources, goldenImages[i]); in verifyVectorDrawables()
173 compareImages(mBitmap, golden, mResources.getString(resIds[i])); in verifyVectorDrawables()
189 String originalFilePath = mResources.getString(resIds[index]); in saveVectorDrawableIntoPNG()
231 final String state = mResources.getResourceName(stateSet[i]); in getTitleForStateSet()
283 VectorDrawableCompat.create(mResources, TEST_ICON, mTheme); in testGetChangingConfigurations()
308 VectorDrawableCompat.create(mResources, R.drawable.vector_icon_delete, mTheme); in testGetConstantState()
322 VectorDrawableCompat.create(mResources, TEST_ICON, mTheme); in testMutate()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DLayout.java370 private final RenderResources mResources; field in Layout.Builder
386 mResources = mParams.getResources(); in Builder()
387 mWindowIsFloating = getBooleanThemeValue(mResources, ATTR_WINDOW_FLOATING, true, true); in Builder()
401 mWindowBackground = mResources.findItemInTheme(ATTR_WINDOW_BACKGROUND, true); in findBackground()
402 mWindowBackground = mResources.resolveResValue(mWindowBackground); in findBackground()
408 getBooleanThemeValue(mResources, ATTR_WINDOW_FULL_SCREEN, true, false); in findStatusBar()
413 getBooleanThemeValue(mResources, ATTR_WINDOW_TRANSLUCENT_STATUS, true, in findStatusBar()
431 getBooleanThemeValue(mResources, ATTR_WINDOW_NO_TITLE, false, false); in findAppCompatActionBar()
434 getBooleanThemeValue(mResources, ATTR_WINDOW_ACTION_BAR, false, true); in findAppCompatActionBar()
467 getBooleanThemeValue(mResources, ATTR_WINDOW_NO_TITLE, true, false); in findFrameworkBar()
[all …]
/frameworks/base/core/tests/overlaytests/OverlayTest/src/com/android/overlaytest/
DOverlayBaseTest.java15 private Resources mResources; field in OverlayBaseTest
22 mResources = getContext().getResources(); in setUp()
28 input = mResources.openRawResource(resId); in calculateRawResourceChecksum()
43 mResources.updateConfiguration(config, mResources.getDisplayMetrics()); in setLocale()
104 boolean actual = mResources.getBoolean(resId); in assertResource()
110 int actual = mResources.getInteger(resId); in assertResource()
116 String actual = mResources.getString(resId); in assertResource()
122 int[] actual = mResources.getIntArray(resId); in assertResource()
204 XmlResourceParser parser = mResources.getXml(R.xml.integer); in testAppXml()
224 input = mResources.openRawResource(resId); in testAppRaw()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DConnectToNetworkNotificationBuilder.java51 private Resources mResources; field in ConnectToNetworkNotificationBuilder
58 mResources = context.getResources(); in ConnectToNetworkNotificationBuilder()
74 mResources.getText(R.string.wifi_available_action_connect), in createConnectToNetworkNotification()
78 mResources.getText(R.string.wifi_available_action_all_networks), in createConnectToNetworkNotification()
137 .setColor(mResources.getColor(R.color.system_notification_accent_color, in createNotificationBuilder()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DShortcutParser.java48 private Resources mResources; field in ShortcutParser
78 mResources = mContext.getPackageManager().getResourcesForApplication(mPkg); in getShortcuts()
79 XmlResourceParser parser = mResources.getXml(mResId); in getShortcuts()
103 final TypedArray sa = mResources.obtainAttributes(mAttrs, R.styleable.Shortcut); in parseShortcut()
115 c.label = mResources.getString(titleResId); in parseShortcut()
123 c.intent = Intent.parseIntent(mResources, parser, mAttrs); in parseShortcut()
/frameworks/support/v7/appcompat/tests/src/android/support/v7/custom/
DContextWrapperFrameLayout.java39 private final Resources mResources; field in ContextWrapperFrameLayout.CustomContextWrapper
43 mResources = new CustomResources(base.getResources()); in CustomContextWrapper()
48 return mResources; in getResources()
/frameworks/opt/bitmap/src/com/android/bitmap/drawable/
DExtendedBitmapDrawable.java60 private final Resources mResources; field in ExtendedBitmapDrawable
76 mResources = res; in ExtendedBitmapDrawable()
94 … final int fadeOutDurationMs = mResources.getInteger(R.integer.bitmap_fade_animation_duration); in onOptsChanged()
95 mProgressDelayMs = mResources.getInteger(R.integer.bitmap_progress_animation_delay); in onOptsChanged()
99 int placeholderWidth = mResources.getDimensionPixelSize(R.dimen.placeholder_size); in onOptsChanged()
100 int placeholderHeight = mResources.getDimensionPixelSize(R.dimen.placeholder_size); in onOptsChanged()
104 placeholder = constantState.newDrawable(mResources); in onOptsChanged()
122 … mPlaceholder = new Placeholder(placeholder, mResources, placeholderWidth, placeholderHeight, in onOptsChanged()
129 int progressBarSize = mResources.getDimensionPixelSize(R.dimen.progress_bar_size); in onOptsChanged()
130 … mProgress = new Progress(mOpts.progressBar.getConstantState().newDrawable(mResources), mResources, in onOptsChanged()
/frameworks/opt/bitmap/src/com/android/bitmap/
DResourceRequestKey.java29 private Resources mResources; field in ResourceRequestKey
44 mResources = res; in ResourceRequestKey()
55 return mResources.openRawResource(mResId); in createInputStream()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/
DPartner.java105 return new ResourceEntry(partner.mResources, partnerId, true); in getResourceEntry()
173 private final Resources mResources; field in Partner
177 mResources = res; in Partner()
185 return mResources; in getResources()
189 return mResources.getIdentifier(name, defType, mPackageName); in getIdentifier()
/frameworks/base/tests/testables/src/android/testing/
DTestableResources.java39 private final Resources mResources; field in TestableResources
43 mResources = mock(Resources.class, withSettings() in TestableResources()
52 return mResources; in getResources()

1234