Home
last modified time | relevance | path

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

1234

/frameworks/base/core/tests/coretests/src/android/graphics/
DColorStateListTest.java33 private Resources mResources; field in ColorStateListTest
39 mResources = mContext.getResources(); in setUp()
40 mFailureColor = mResources.getColor(R.color.failColor); in setUp()
45 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testStateIsInList()
48 assertEquals(mResources.getColor(R.color.testcolor1), focusColor); in testStateIsInList()
53 ColorStateList colorStateList = mResources.getColorStateList(R.color.color1); in testEmptyState()
56 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testEmptyState()
61 int defaultColor = mResources.getColor(R.color.color1); in testGetColor()
62 assertEquals(mResources.getColor(R.color.testcolor2), defaultColor); in testGetColor()
67 int defaultColor = mResources.getColor(R.color.color_no_default); in testGetColorWhenListHasNoDefault()
[all …]
DGraphicsPerformanceTests.java122 private Resources mResources; field in GraphicsPerformanceTests.DecodeBitmapTest
131 mResources = context.getResources(); in setUp()
132 Assert.assertNotNull(mResources); in setUp()
142 BitmapFactory.decodeResource(mResources, R.drawable.test16x12); in testDecodeBitmap()
143 BitmapFactory.decodeResource(mResources, R.drawable.test32x24); in testDecodeBitmap()
144 BitmapFactory.decodeResource(mResources, R.drawable.test64x48); in testDecodeBitmap()
145 BitmapFactory.decodeResource(mResources, R.drawable.test128x96); in testDecodeBitmap()
146 BitmapFactory.decodeResource(mResources, R.drawable.test256x192); in testDecodeBitmap()
147 BitmapFactory.decodeResource(mResources, R.drawable.test320x240); in testDecodeBitmap()
/frameworks/base/core/tests/overlaytests/host/test-apps/UpdateOverlay/src/com/android/server/om/hosttest/update_overlay_test/
DUpdateOverlayTest.java36 private Resources mResources; field in UpdateOverlayTest
42 mResources = InstrumentationRegistry in setUp()
51 assertEquals("App Resource", mResources.getString(R.string.app_resource)); in expectAppResource()
56 assertEquals("App Resource Overlay V1", mResources.getString(R.string.app_resource)); in expectAppOverlayV1Resource()
61 assertEquals("App Resource Overlay V2", mResources.getString(R.string.app_resource)); in expectAppOverlayV2Resource()
66 assertEquals("OK", mResources.getString(android.R.string.ok)); in expectFrameworkResource()
71 assertEquals("Framework Overlay V1", mResources.getString(android.R.string.ok)); in expectFrameworkOverlayV1Resource()
76 assertEquals("Framework Overlay V2", mResources.getString(android.R.string.ok)); in expectFrameworkOverlayV2Resource()
/frameworks/base/core/tests/coretests/src/android/content/res/
DFontResourcesParserTest.java53 private Resources mResources; field in FontResourcesParserTest
58 mResources = mInstrumentation.getContext().getResources(); in setup()
63 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfontforparsing); in testParse()
65 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParse()
99 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont); in testParseDownloadableFont()
101 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont()
112 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontsinglecerts); in testParseDownloadableFont_singleCerts()
114 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_singleCerts()
133 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontmulticerts); in testParseDownloadableFont_multipleCerts()
135 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_multipleCerts()
/frameworks/base/core/tests/coretests/src/android/content/pm/
DCrossProfileAppsTest.java63 private Resources mResources; field in CrossProfileAppsTest
82 when(mContext.getResources()).thenReturn(mResources); in mockResources()
83 when(mResources.getDrawable(anyInt(), nullable(Resources.Theme.class))) in mockResources()
101 verify(mResources).getString(R.string.managed_profile_label); in getProfileSwitchingLabel_managedProfile()
109 verify(mResources).getString(R.string.user_owner_label); in getProfileSwitchingLabel_personalProfile()
122 verify(mResources).getDrawable(R.drawable.ic_corp_badge, null); in getProfileSwitchingIcon_managedProfile()
130 verify(mResources).getDrawable(R.drawable.ic_account_circle, null); in getProfileSwitchingIcon_personalProfile()
/frameworks/base/core/java/android/view/
DContextThemeWrapper.java42 private Resources mResources; field in ContextThemeWrapper
101 if (mResources != null) { in applyOverrideConfiguration()
132 if (mResources == null) { in getResourcesInternal()
134 mResources = super.getResources(); in getResourcesInternal()
137 mResources = resContext.getResources(); in getResourcesInternal()
140 return mResources; in getResourcesInternal()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/
DBatteryMeterDrawableTest.java45 private Resources mResources; field in BatteryMeterDrawableTest
50 mResources = mContext.getResources(); in setUp()
85 int criticalLevel = mResources.getInteger( in testDrawTextWarningAtCriticalLevel()
91 String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol); in testDrawTextWarningAtCriticalLevel()
97 int criticalLevel = mResources.getInteger( in testDrawTextNoWarningAboveCriticalLevel()
103 String warningString = mResources.getString(R.string.battery_meter_very_low_overlay_symbol); in testDrawTextNoWarningAboveCriticalLevel()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/display/color/
DDisplayWhiteBalanceTintControllerTest.java53 private Resources mResources; field in DisplayWhiteBalanceTintControllerTest
65 mResources = InstrumentationRegistry.getContext().getResources(); in setUp()
67 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMin)) in setUp()
70 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMax)) in setUp()
73 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureDefault)) in setUp()
76 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayNominalWhite)) in setUp()
151 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries)) in displayWhiteBalance_setupWithResources()
/frameworks/base/core/java/android/content/pm/
DCrossProfileApps.java43 private final Resources mResources; field in CrossProfileApps
50 mResources = context.getResources(); in CrossProfileApps()
143 return mResources.getString(stringRes); in getProfileSwitchingLabel()
165 return mResources.getDrawable(R.drawable.ic_corp_badge, null); in getProfileSwitchingIconDrawable()
168 mResources, UserHandle.USER_SYSTEM, true /* light */); in getProfileSwitchingIconDrawable()
/frameworks/base/tests/net/java/com/android/server/connectivity/tethering/
DTetheringConfigurationTest.java65 @Mock private Resources mResources; field in TetheringConfigurationTest
88 public Resources getResources() { return mResources; } in getResources()
107 when(mResources.getStringArray(com.android.internal.R.array.config_tether_dhcp_range)) in setUp()
109 when(mResources.getStringArray(com.android.internal.R.array.config_tether_usb_regexs)) in setUp()
111 when(mResources.getStringArray(com.android.internal.R.array.config_tether_wifi_regexs)) in setUp()
113 when(mResources.getStringArray(com.android.internal.R.array.config_tether_bluetooth_regexs)) in setUp()
115 when(mResources.getIntArray(config_tether_upstream_types)).thenReturn(new int[0]); in setUp()
116 when(mResources.getStringArray( in setUp()
126 when(mResources.getIntArray(config_tether_upstream_types)).thenReturn( in getTetheringConfiguration()
210 when(mResources.getIntArray(config_tether_upstream_types)).thenReturn(new int[]{}); in testNoDefinedUpstreamTypesAddsEthernet()
[all …]
/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/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/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DLayout.java395 private final RenderResources mResources; field in Layout.Builder
411 mResources = mParams.getResources(); in Builder()
413 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FLOATING, true); in Builder()
427 mWindowBackground = mResources.findItemInTheme( in findBackground()
429 mWindowBackground = mResources.resolveResValue(mWindowBackground); in findBackground()
435 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FULL_SCREEN, false); in findStatusBar()
441 mResources, ATTR_WINDOW_TRANSLUCENT_STATUS, false); in findStatusBar()
458 getBooleanThemeValue(mResources, in findAppCompatActionBar()
462 getBooleanThemeValue(mResources, in findAppCompatActionBar()
497 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_NO_TITLE, false); in findFrameworkBar()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/
DImageDecoder.java126 mResources = res; in InputStreamSource()
131 final Resources mResources; field in ImageDecoder.InputStreamSource
136 public Resources getResources() { return mResources; } in getResources()
156 mResources = res; in AssetInputStreamSource()
168 private final Resources mResources; field in ImageDecoder.AssetInputStreamSource
172 public Resources getResources() { return mResources; } in getResources()
187 mResources = res; in ResourceSource()
192 final Resources mResources; field in ImageDecoder.ResourceSource
197 public Resources getResources() { return mResources; } in getResources()
/frameworks/base/core/tests/overlaytests/device/src/com/android/overlaytest/
DOverlayBaseTest.java48 private Resources mResources; field in OverlayBaseTest
64 mResources = InstrumentationRegistry.getContext().getResources(); in setUp()
68 try (InputStream input = mResources.openRawResource(resId)) { in calculateRawResourceChecksum()
82 mResources.updateConfiguration(config, mResources.getDisplayMetrics()); in setLocale()
143 boolean actual = mResources.getBoolean(resId); in assertResource()
149 int actual = mResources.getInteger(resId); in assertResource()
155 String actual = mResources.getString(resId); in assertResource()
161 int[] actual = mResources.getIntArray(resId); in assertResource()
252 XmlResourceParser parser = mResources.getXml(R.xml.integer); in testAppXml()
273 input = mResources.openRawResource(resId); in testAppRaw()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DConnectToNetworkNotificationBuilder.java56 private Resources mResources; field in ConnectToNetworkNotificationBuilder
63 mResources = context.getResources(); in ConnectToNetworkNotificationBuilder()
93 mResources.getText(R.string.wifi_available_action_connect), in createConnectToAvailableNetworkNotification()
96 mResources.getText(R.string.wifi_available_action_all_networks), in createConnectToAvailableNetworkNotification()
173 .setColor(mResources.getColor(R.color.system_notification_accent_color, in createNotificationBuilder()
/frameworks/base/tests/testables/src/android/testing/
DTestableResources.java39 private final Resources mResources; field in TestableResources
44 mResources = mock(Resources.class, withSettings() in TestableResources()
53 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/net/wifi/tests/wifitests/src/com/android/server/wifi/
DVelocityBasedConnectedScoreTest.java62 @Spy private MockResources mResources = new MockResources(); field in VelocityBasedConnectedScoreTest
65 doReturn(value).when(mResources).getInteger(resourceName); in setupIntegerResource()
87 setUpResources(mResources); in setUp()
90 when(mContext.getResources()).thenReturn(mResources); in setUp()
DWifiApConfigStoreTest.java89 private MockResources mResources; field in WifiApConfigStoreTest
108 mResources = new MockResources(); in setUp()
109 mResources.setString(R.string.config_wifi_framework_sap_2G_channel_list, in setUp()
111 mResources.setString(R.string.wifi_tether_configure_ssid_default, in setUp()
113 mResources.setString(R.string.wifi_localhotspot_configure_ssid_default, in setUp()
116 mResources.setBoolean(R.bool.config_wifi_convert_apband_5ghz_to_any, false); in setUp()
117 mResources.setText(R.string.wifi_softap_config_change, in setUp()
119 mResources.setText(R.string.wifi_softap_config_change_summary, in setUp()
121 mResources.setText(R.string.wifi_softap_config_change_detailed, in setUp()
123 when(mContext.getResources()).thenReturn(mResources); in setUp()
[all …]
DSarManagerTest.java83 private MockResources mResources; field in SarManagerTest
107 mResources = getMockResources(); in setUp()
109 when(mContext.getResources()).thenReturn(mResources); in setUp()
120 mResources = null; in cleanUp()
173 mResources.setBoolean( in createSarManager()
175 mResources.setBoolean( in createSarManager()
178 mResources.setBoolean( in createSarManager()
181 mResources.setString(R.string.config_wifi_sar_sensor_type, SAR_SENSOR_NAME); in createSarManager()
184 mResources.setInteger(R.integer.config_wifi_framework_sar_free_space_event_id, in createSarManager()
186 mResources.setInteger(R.integer.config_wifi_framework_sar_near_hand_event_id, in createSarManager()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/keyguard/clock/
DDefaultClockController.java43 private final Resources mResources; field in DefaultClockController
84 mResources = res; in DefaultClockController()
109 return mResources.getString(R.string.clock_title_default); in getTitle()
114 return BitmapFactory.decodeResource(mResources, R.drawable.default_thumbnail); in getThumbnail()
DAnalogClockController.java43 private final Resources mResources; field in AnalogClockController
86 mResources = res; in AnalogClockController()
115 return mResources.getString(R.string.clock_title_analog); in getTitle()
120 return BitmapFactory.decodeResource(mResources, R.drawable.analog_thumbnail); in getThumbnail()
/frameworks/base/core/java/android/view/animation/
DScaleAnimation.java31 private final Resources mResources; field in ScaleAnimation
65 mResources = context.getResources(); in ScaleAnimation()
146 mResources = null; in ScaleAnimation()
173 mResources = null; in ScaleAnimation()
214 mResources = null; in ScaleAnimation()
265 targetSize = TypedValue.complexToDimension(data, mResources.getDisplayMetrics()); in resolveScale()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/graph/
DBatteryMeterDrawableBaseTest.java31 private Resources mResources; field in BatteryMeterDrawableBaseTest
37 mResources = mContext.getResources(); in setUp()
44 isEqualTo(mResources.getDimensionPixelSize(R.dimen.battery_width)); in testGetIntrinsicSize()
46 isEqualTo(mResources.getDimensionPixelSize(R.dimen.battery_height)); in testGetIntrinsicSize()

1234