Home
last modified time | relevance | path

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

123456

/frameworks/base/packages/CarSystemUI/tests/src/com/android/systemui/car/navigationbar/
DSystemBarConfigsTest.java61 private Resources mResources; field in SystemBarConfigsTest
71 mSystemBarConfigs = new SystemBarConfigs(mResources); in onInit_allSystemBarsEnabled_eachHasUniqueBarTypes_doesNotThrowException()
76 when(mResources.getInteger(R.integer.config_topSystemBarType)).thenReturn(0); in onInit_allSystemBarsEnabled_twoBarsHaveDuplicateType_throwsRuntimeException()
77 when(mResources.getInteger(R.integer.config_bottomSystemBarType)).thenReturn(0); in onInit_allSystemBarsEnabled_twoBarsHaveDuplicateType_throwsRuntimeException()
79 mSystemBarConfigs = new SystemBarConfigs(mResources); in onInit_allSystemBarsEnabled_twoBarsHaveDuplicateType_throwsRuntimeException()
84 mSystemBarConfigs = new SystemBarConfigs(mResources); in onInit_allSystemBarsEnabled_systemBarSidesSortedByZOrder()
97 when(mResources.getInteger(R.integer.config_topSystemBarZOrder)).thenReturn(33); in onInit_intersectingBarsHaveSameZOrder_throwsRuntimeException()
98 when(mResources.getInteger(R.integer.config_leftSystemBarZOrder)).thenReturn(33); in onInit_intersectingBarsHaveSameZOrder_throwsRuntimeException()
100 mSystemBarConfigs = new SystemBarConfigs(mResources); in onInit_intersectingBarsHaveSameZOrder_throwsRuntimeException()
105 when(mResources.getBoolean(R.bool.config_hideBottomSystemBarForKeyboard)).thenReturn(false); in onInit_hideBottomSystemBarForKeyboardValueDoNotSync_throwsRuntimeException()
[all …]
/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/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/
DSystemBarConfigs.java83 private final Resources mResources; field in SystemBarConfigs
95 mResources = resources; in SystemBarConfigs()
165 mTopNavBarEnabled = mResources.getBoolean(R.bool.config_enableTopNavigationBar); in readConfigs()
166 mBottomNavBarEnabled = mResources.getBoolean(R.bool.config_enableBottomNavigationBar); in readConfigs()
167 mLeftNavBarEnabled = mResources.getBoolean(R.bool.config_enableLeftNavigationBar); in readConfigs()
168 mRightNavBarEnabled = mResources.getBoolean(R.bool.config_enableRightNavigationBar); in readConfigs()
174 .setGirth(mResources.getDimensionPixelSize( in readConfigs()
176 .setBarType(mResources.getInteger(R.integer.config_topSystemBarType)) in readConfigs()
177 .setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder)) in readConfigs()
178 .setHideForKeyboard(mResources.getBoolean( in readConfigs()
[all …]
/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/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DApConfigUtilTest.java126 @Mock Resources mResources; field in ApConfigUtilTest
279 mResources); in chooseApChannel2GBandWithNoAllowedChannel()
289 when(mResources.getString(R.string.config_wifiSoftap2gChannelList)) in chooseApChannel2GBandWithAllowedChannels()
295 mResources); in chooseApChannel2GBandWithAllowedChannels()
304 when(mResources.getString(R.string.config_wifiSoftap5gChannelList)) in chooseApChannel5GBandWithAllowedChannels()
310 SoftApConfiguration.BAND_5GHZ, mWifiNative, mResources); in chooseApChannel5GBandWithAllowedChannels()
323 mResources)); in chooseApChannel5GBandWithNoAllowedChannels()
331 when(mResources.getString(R.string.config_wifiSoftap2gChannelList)) in chooseApChannelWillHighBandPrefer()
335 when(mResources.getString(R.string.config_wifiSoftap5gChannelList)) in chooseApChannelWillHighBandPrefer()
342 mWifiNative, mResources); in chooseApChannelWillHighBandPrefer()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiApConfigStoreTest.java92 private MockResources mResources; field in WifiApConfigStoreTest
107 mResources = new MockResources(); in setUp()
108 mResources.setString(R.string.config_wifiSoftap2gChannelList, in setUp()
110 mResources.setString(R.string.wifi_tether_configure_ssid_default, in setUp()
112 mResources.setString(R.string.wifi_localhotspot_configure_ssid_default, in setUp()
117 when(mContext.getResources()).thenReturn(mResources); in setUp()
488 mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true); in randomizeBssid_randomizesWhenEnabled()
499 mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true); in randomizeBssid_fallbackPathWhenMacCalculationFails()
514 mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, false); in randomizeBssid_usesFactoryMacWhenRandomizationOff()
525 mResources.setBoolean(R.bool.config_wifi_ap_mac_randomization_supported, true); in randomizeBssid_forwardsCustomMac()
[all …]
/frameworks/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DTetheringConfigurationTest.java68 @Mock private Resources mResources; field in TetheringConfigurationTest
93 return mResources; in getResources()
117 when(mResources.getStringArray(R.array.config_tether_dhcp_range)).thenReturn( in setUp()
119 when(mResources.getInteger(R.integer.config_tether_offload_poll_interval)).thenReturn( in setUp()
121 when(mResources.getStringArray(R.array.config_tether_usb_regexs)).thenReturn(new String[0]); in setUp()
122 when(mResources.getStringArray(R.array.config_tether_wifi_regexs)) in setUp()
124 when(mResources.getStringArray(R.array.config_tether_bluetooth_regexs)).thenReturn( in setUp()
126 when(mResources.getIntArray(R.array.config_tether_upstream_types)).thenReturn(new int[0]); in setUp()
127 when(mResources.getStringArray(R.array.config_mobile_hotspot_provision_app)) in setUp()
129 when(mResources.getBoolean(R.bool.config_tether_enable_legacy_dhcp_server)).thenReturn( in setUp()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DScreenshotNotificationsController.java53 private final Resources mResources; field in ScreenshotNotificationsController
64 mResources = context.getResources(); in ScreenshotNotificationsController()
69 mIconSize = mResources.getDimensionPixelSize( in ScreenshotNotificationsController()
79 panelWidth = mResources.getDimensionPixelSize(R.dimen.notification_panel_width); in ScreenshotNotificationsController()
87 mPreviewHeight = mResources.getDimensionPixelSize(R.dimen.notification_max_height); in ScreenshotNotificationsController()
157 .setContentTitle(mResources.getString(R.string.screenshot_saving_title)) in showSavingScreenshotNotification()
162 .setColor(mResources.getColor( in showSavingScreenshotNotification()
167 .setContentTitle(mResources.getString(R.string.screenshot_saving_title)) in showSavingScreenshotNotification()
171 .setColor(mResources.getColor( in showSavingScreenshotNotification()
206 .setContentTitle(mResources.getString(R.string.screenshot_saved_title)) in showScreenshotActionsNotification()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DDozeParameters.java54 private final Resources mResources; field in DozeParameters
66 mResources = resources; in DozeParameters()
99 return mResources.getBoolean(R.bool.doze_suspend_display_state_supported); in getDozeSuspendDisplayStateSupported()
107 return mResources.getInteger( in getScreenBrightnessDoze()
177 return FORCE_BLANKING || !FORCE_NO_BLANKING && mResources.getBoolean( in getDisplayNeedsBlanking()
194 return SystemProperties.getBoolean(propName, mResources.getBoolean(resId)); in getBoolean()
198 int value = SystemProperties.getInt(propName, mResources.getInteger(resId)); in getInt()
207 return mResources.getBoolean(R.bool.doze_double_tap_reports_touch_coordinates); in doubleTapReportsTouchCoordinates()
DPhoneStatusBarPolicy.java136 private final Resources mResources; field in PhoneStatusBarPolicy
179 mResources = resources; in PhoneStatusBarPolicy()
274 mResources.getString(R.string.accessibility_status_bar_hotspot)); in init()
279 mResources.getString(R.string.accessibility_managed_profile)); in init()
284 mResources.getString(R.string.accessibility_data_saver_on)); in init()
289 String microphoneString = mResources.getString(PrivacyType.TYPE_MICROPHONE.getNameId()); in init()
290 String microphoneDesc = mResources.getString( in init()
296 String cameraString = mResources.getString(PrivacyType.TYPE_CAMERA.getNameId()); in init()
297 String cameraDesc = mResources.getString( in init()
304 mResources.getString(R.string.accessibility_location_active)); in init()
[all …]
/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/core/java/com/android/internal/policy/
DDecorContext.java41 private Resources mResources; field in DecorContext
60 mResources = context.getResources(); in setPhoneWindow()
93 mResources = context.getResources(); in getResources()
96 return mResources; in getResources()
101 return mResources.getAssets(); in getAssets()
/frameworks/base/services/core/java/com/android/server/audio/
DSoundEffectsHelper.java95 private final List<Resource> mResources = new ArrayList<Resource>(); field in SoundEffectsHelper
195 for (Resource res : mResources) { in onLoadSoundEffects()
230 for (Resource res : mResources) { in onUnloadSoundEffects()
249 Resource res = mResources.get(mEffects[effect]); in onPlaySoundEffect()
315 int defaultResourceIdx = mResources.size(); in loadTouchSoundAssetDefaults()
316 mResources.add(new Resource("Effect_Tick.ogg")); in loadTouchSoundAssetDefaults()
326 if (!mResources.isEmpty()) { in loadTouchSoundAssets()
393 for (int i = 0; i < mResources.size(); i++) { in findOrAddResourceByFileName()
394 if (mResources.get(i).mFileName.equals(fileName)) { in findOrAddResourceByFileName()
398 int result = mResources.size(); in findOrAddResourceByFileName()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DLayout.java397 private final RenderResources mResources; field in Layout.Builder
413 mResources = mParams.getResources(); in Builder()
415 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FLOATING, true); in Builder()
429 mWindowBackground = mResources.findItemInTheme( in findBackground()
431 mWindowBackground = mResources.resolveResValue(mWindowBackground); in findBackground()
437 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FULL_SCREEN, false); in findStatusBar()
443 mResources, ATTR_WINDOW_TRANSLUCENT_STATUS, false); in findStatusBar()
460 getBooleanThemeValue(mResources, in findAppCompatActionBar()
464 getBooleanThemeValue(mResources, in findAppCompatActionBar()
499 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_NO_TITLE, false); in findFrameworkBar()
[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/base/core/tests/overlaytests/device/src/com/android/overlaytest/
DOverlayBaseTest.java55 private Resources mResources; field in OverlayBaseTest
72 mResources = mContext.getResources(); in setUp()
76 try (InputStream input = mResources.openRawResource(resId)) { in calculateRawResourceChecksum()
90 mResources.updateConfiguration(config, mResources.getDisplayMetrics()); in setLocale()
151 boolean actual = mResources.getBoolean(resId); in assertResource()
157 int actual = mResources.getInteger(resId); in assertResource()
163 String actual = mResources.getString(resId); in assertResource()
169 int[] actual = mResources.getIntArray(resId); in assertResource()
260 XmlResourceParser parser = mResources.getXml(R.xml.integer); in testAppXml()
281 input = mResources.openRawResource(resId); in testAppRaw()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/display/color/
DDisplayWhiteBalanceTintControllerTest.java55 private Resources mResources; field in DisplayWhiteBalanceTintControllerTest
67 mResources = InstrumentationRegistry.getContext().getResources(); in setUp()
69 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMin)) in setUp()
72 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMax)) in setUp()
75 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureDefault)) in setUp()
78 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayNominalWhite)) in setUp()
153 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries)) in displayWhiteBalance_setupWithResources()
/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/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/base/packages/CarSystemUI/src/com/android/systemui/car/userswitcher/
DUserSwitchTransitionViewController.java57 private final Resources mResources; field in UserSwitchTransitionViewController
87 mResources = resources; in UserSwitchTransitionViewController()
90 mWindowShownTimeoutMs = mResources.getInteger( in UserSwitchTransitionViewController()
160 mResources.getString(R.string.car_loading_profile_developer_message, in populateLoadingText()
163 msgView.setText(mResources.getString(R.string.car_loading_profile)); in populateLoadingText()
/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()

123456