Home
last modified time | relevance | path

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

123456

/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/services/tests/servicestests/src/com/android/server/display/
DDisplayDeviceConfigTest.java71 private Resources mResources; field in DisplayDeviceConfigTest
76 when(mContext.getResources()).thenReturn(mResources); in setUp()
514 when(mResources.getFloat(com.android.internal.R.dimen in mockDeviceConfigs()
516 when(mResources.getFloat(com.android.internal.R.dimen in mockDeviceConfigs()
529 when(mResources.obtainTypedArray( in setupDisplayDeviceConfigFromConfigResourceFile()
534 when(mResources.obtainTypedArray( in setupDisplayDeviceConfigFromConfigResourceFile()
537 when(mResources.getIntArray(com.android.internal.R.array in setupDisplayDeviceConfigFromConfigResourceFile()
540 when(mResources.getIntArray(com.android.internal.R.array in setupDisplayDeviceConfigFromConfigResourceFile()
542 when(mResources.getIntArray(com.android.internal.R.array in setupDisplayDeviceConfigFromConfigResourceFile()
547 when(mResources.obtainTypedArray( in setupDisplayDeviceConfigFromConfigResourceFile()
[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/packages/SystemUI/tests/src/com/android/systemui/assist/ui/
DDisplayUtilsTest.java42 Resources mResources; field in DisplayUtilsTest
59 when(mResources.getDimensionPixelSize(R.dimen.config_rounded_mask_size)).thenReturn(100); in testGetCornerRadii_onlyDefaultOverridden()
60 when(mMockContext.getResources()).thenReturn(mResources); in testGetCornerRadii_onlyDefaultOverridden()
68 when(mResources.getDimensionPixelSize(R.dimen.config_rounded_mask_size)).thenReturn(100); in testGetCornerRadii_allOverridden()
69 when(mResources.getDimensionPixelSize(R.dimen.config_rounded_mask_size_top)).thenReturn( in testGetCornerRadii_allOverridden()
71 when(mResources.getDimensionPixelSize(R.dimen.config_rounded_mask_size_bottom)).thenReturn( in testGetCornerRadii_allOverridden()
73 when(mMockContext.getResources()).thenReturn(mResources); in testGetCornerRadii_allOverridden()
/frameworks/base/core/tests/coretests/src/android/content/res/
DFontResourcesParserTest.java55 private Resources mResources; field in FontResourcesParserTest
60 mResources = mInstrumentation.getContext().getResources(); in setup()
65 XmlResourceParser parser = mResources.getXml(R.font.samplexmlfontforparsing); in testParse()
67 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParse()
101 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfont); in testParseDownloadableFont()
103 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont()
115 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontsinglecerts); in testParseDownloadableFont_singleCerts()
117 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_singleCerts()
136 XmlResourceParser parser = mResources.getXml(R.font.samplexmldownloadedfontmulticerts); in testParseDownloadableFont_multipleCerts()
138 FamilyResourceEntry result = FontResourcesParser.parse(parser, mResources); in testParseDownloadableFont_multipleCerts()
/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/flags/
DFeatureFlagsReleaseTest.kt40 @Mock private lateinit var mResources: Resources variable in com.android.systemui.flags.FeatureFlagsReleaseTest
54 mResources, in setup()
70 whenever(mResources.getBoolean(flagResourceId)).thenReturn(true) in testBooleanResourceFlag()
76 whenever(mResources.getString(1001)).thenReturn("") in testReadResourceStringFlag()
77 whenever(mResources.getString(1002)).thenReturn("res2") in testReadResourceStringFlag()
78 whenever(mResources.getString(1003)).thenReturn(null) in testReadResourceStringFlag()
79 whenever(mResources.getString(1004)).thenAnswer { throw NameNotFoundException() } in testReadResourceStringFlag()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsHelperTest.java63 @Mock private Resources mResources; field in SettingsHelperTest
75 when(mContext.getResources()).thenReturn(mResources); in setUp()
117 when(mResources.getBoolean( in testRestoreValue_lppForAssistantEnabled_updatesValue()
136 when(mResources.getBoolean( in testRestoreValue_lppForAssistantNotEnabled_updatesValueToDefaultConfig()
140 when(mResources.getInteger( in testRestoreValue_lppForAssistantNotEnabled_updatesValueToDefaultConfig()
143 when(mResources.getInteger( in testRestoreValue_lppForAssistantNotEnabled_updatesValueToDefaultConfig()
162 when(mResources.getBoolean( in testRestoreValue_lppForAssistantNotEnabledDefaultConfig_updatesValue()
166 when(mResources.getInteger( in testRestoreValue_lppForAssistantNotEnabledDefaultConfig_updatesValue()
169 when(mResources.getInteger( in testRestoreValue_lppForAssistantNotEnabledDefaultConfig_updatesValue()
188 when(mResources.getBoolean( in testRestoreValue_lppForAssistantNotAvailable_doesNotRestore()
[all …]
/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/location/settings/
DLocationSettingsTest.java59 private @Mock Resources mResources; field in LocationSettingsTest
68 doReturn(mResources).when(mContext).getResources(); in setUp()
91 doReturn(true).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testLoadDefaults()
94 doReturn(false).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testLoadDefaults()
100 doReturn(false).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testUpdate()
112 doReturn(false).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testSerialization()
124 doReturn(false).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testListeners()
159 doReturn(true).when(mResources).getBoolean(R.bool.config_defaultAdasGnssLocationEnabled); in testNonAutomotive()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DPhoneStatusBarPolicy.java141 private final Resources mResources; field in PhoneStatusBarPolicy
190 mResources = resources; in PhoneStatusBarPolicy()
276 mResources.getString(R.string.accessibility_ringer_vibrate)); in init()
280 mResources.getString(R.string.accessibility_ringer_silent)); in init()
290 mResources.getString(R.string.accessibility_status_bar_hotspot)); in init()
298 mResources.getString(R.string.accessibility_data_saver_on)); in init()
303 String microphoneString = mResources.getString(PrivacyType.TYPE_MICROPHONE.getNameId()); in init()
304 String microphoneDesc = mResources.getString( in init()
310 String cameraString = mResources.getString(PrivacyType.TYPE_CAMERA.getNameId()); in init()
311 String cameraDesc = mResources.getString( in init()
[all …]
DDozeParameters.java83 private final Resources mResources; field in DozeParameters
135 mResources = resources; in DozeParameters()
184 return mResources.getBoolean(R.bool.doze_suspend_display_state_supported); in getDozeSuspendDisplayStateSupported()
192 return mResources.getInteger( in getScreenBrightnessDoze()
284 return FORCE_BLANKING || !FORCE_NO_BLANKING && mResources.getBoolean( in getDisplayNeedsBlanking()
359 return SystemProperties.getBoolean(propName, mResources.getBoolean(resId)); in getBoolean()
363 int value = SystemProperties.getInt(propName, mResources.getInteger(resId)); in getInt()
372 return mResources.getBoolean(R.bool.doze_double_tap_reports_touch_coordinates); in doubleTapReportsTouchCoordinates()
380 mResources.getIntArray(R.array.doze_single_tap_uses_prox_posture_mapping), in singleTapUsesProx()
390 return mResources.getBoolean(R.bool.doze_single_tap_uses_prox); in singleTapUsesProx()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
DNotificationPanelViewControllerWithCoroutinesTest.kt63 whenever(mResources.getBoolean(com.android.internal.R.bool.config_keyguardUserSwitcher)) in <lambda>()
87 whenever(mResources.getBoolean(com.android.internal.R.bool.config_keyguardUserSwitcher)) in <lambda>()
89 whenever(mResources.getBoolean(R.bool.qs_show_user_switcher_for_single_user)) in <lambda>()
103 whenever(mResources.getBoolean(com.android.internal.R.bool.config_keyguardUserSwitcher)) in <lambda>()
105 whenever(mResources.getBoolean(R.bool.qs_show_user_switcher_for_single_user)) in <lambda>()
123 whenever(mResources.getBoolean(com.android.internal.R.bool.config_keyguardUserSwitcher)) in <lambda>()
125 whenever(mResources.getBoolean(R.bool.qs_show_user_switcher_for_single_user)) in <lambda>()
/frameworks/base/core/java/com/android/internal/policy/
DDecorContext.java43 private Resources mResources; field in DecorContext
70 mResources = context.getResources(); in setPhoneWindow()
103 mResources = context.getResources(); in getResources()
106 return mResources; in getResources()
111 return mResources.getAssets(); in getAssets()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/sensors/
DThresholdSensorImpl.java233 private final Resources mResources; field in ThresholdSensorImpl.Builder
246 mResources = resources; in Builder()
260 setSensorType(mResources.getString(sensorResourceId), requireWakeUp); in setSensorResourceId()
266 setThresholdValue(mResources.getFloat(thresholdResourceId)); in setThresholdResourceId()
275 setThresholdLatchValue(mResources.getFloat(thresholdLatchResourceId)); in setThresholdLatchResourceId()
364 private final Resources mResources; field in ThresholdSensorImpl.BuilderFactory
373 mResources = resources; in BuilderFactory()
379 return new Builder(mResources, mSensorManager, mExecution); in createBuilder()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DKeyguardClockPositionAlgorithmTest.java55 private Resources mResources; field in KeyguardClockPositionAlgorithmTest
82 when(mResources.getDimensionPixelSize(anyInt())).thenReturn(0); in setUp()
83 mClockPositionAlgorithm.loadDimens(mResources); in setUp()
292 when(mResources.getDimensionPixelSize(R.dimen.keyguard_split_shade_top_margin)) in notifPaddingMakesUpToFullMarginInSplitShade()
294 when(mResources.getDimensionPixelSize(R.dimen.large_screen_shade_header_height)) in notifPaddingMakesUpToFullMarginInSplitShade()
296 mClockPositionAlgorithm.loadDimens(mResources); in notifPaddingMakesUpToFullMarginInSplitShade()
549 when(mResources.getDimensionPixelSize(R.dimen.keyguard_split_shade_top_margin)) in setSplitShadeTopMargin()
551 mClockPositionAlgorithm.loadDimens(mResources); in setSplitShadeTopMargin()
563 when(mResources.getDimensionPixelSize(R.dimen.burn_in_prevention_offset_y_clock)) in givenMaxBurnInOffset()
565 mClockPositionAlgorithm.loadDimens(mResources); in givenMaxBurnInOffset()
/frameworks/base/services/core/java/com/android/server/audio/
DSoundEffectsHelper.java108 private final List<Resource> mResources = new ArrayList<Resource>(); field in SoundEffectsHelper
212 for (Resource res : mResources) { in onLoadSoundEffects()
247 for (Resource res : mResources) { in onUnloadSoundEffects()
267 Resource res = mResources.get(mEffects[effect]); in onPlaySoundEffect()
333 int defaultResourceIdx = mResources.size(); in loadSoundAssetDefaults()
334 mResources.add(new Resource("Effect_Tick.ogg")); in loadSoundAssetDefaults()
351 if (!mResources.isEmpty()) { in loadSoundAssets()
433 for (int i = 0; i < mResources.size(); i++) { in findOrAddResourceByFileName()
434 if (mResources.get(i).mFileName.equals(fileName)) { in findOrAddResourceByFileName()
438 int result = mResources.size(); in findOrAddResourceByFileName()
[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/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DLayout.java396 private final RenderResources mResources; field in Layout.Builder
412 mResources = mParams.getResources(); in Builder()
414 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FLOATING, true); in Builder()
428 mWindowBackground = mResources.findItemInTheme( in findBackground()
430 mWindowBackground = mResources.resolveResValue(mWindowBackground); in findBackground()
436 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_FULL_SCREEN, false); in findStatusBar()
442 mResources, ATTR_WINDOW_TRANSLUCENT_STATUS, false); in findStatusBar()
459 getBooleanThemeValue(mResources, in findAppCompatActionBar()
463 getBooleanThemeValue(mResources, in findAppCompatActionBar()
498 getBooleanThemeFrameworkAttrValue(mResources, ATTR_WINDOW_NO_TITLE, false); in findFrameworkBar()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/display/color/
DDisplayWhiteBalanceTintControllerTest.java56 private Resources mResources; field in DisplayWhiteBalanceTintControllerTest
68 mResources = InstrumentationRegistry.getContext().getResources(); in setUp()
70 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMin)) in setUp()
73 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureMax)) in setUp()
76 doReturn(mResources.getInteger(R.integer.config_displayWhiteBalanceColorTemperatureDefault)) in setUp()
79 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayNominalWhite)) in setUp()
154 doReturn(mResources.getStringArray(R.array.config_displayWhiteBalanceDisplayPrimaries)) in displayWhiteBalance_setupWithResources()
/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/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/pip/phone/
DPipSizeSpecHandlerTest.java75 @Mock private Resources mResources; field in PipSizeSpecHandlerTest
142 when(mResources.getDimensionPixelSize(anyInt())).thenReturn(DEFAULT_MIN_EDGE_SIZE); in setUp()
143 when(mResources.getFloat(anyInt())).thenReturn(OPTIMIZED_ASPECT_RATIO); in setUp()
144 when(mResources.getString(anyInt())).thenReturn("0x0"); in setUp()
145 when(mResources.getDisplayMetrics()) in setUp()
149 when(mContext.getResources()).thenReturn(mResources); in setUp()
/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/SystemUI/tests/src/com/android/keyguard/
DLockIconViewControllerBaseTest.java81 protected @Mock Resources mResources; field in LockIconViewControllerBaseTest
132 when(mContext.getResources()).thenReturn(mResources); in setUp()
136 when(mResources.getString(R.string.accessibility_unlock_button)).thenReturn(UNLOCKED_LABEL); in setUp()
137 when(mResources.getString(R.string.accessibility_lock_icon)).thenReturn(LOCKED_LABEL); in setUp()
138 when(mResources.getDrawable(anyInt(), any())).thenReturn(mIconDrawable); in setUp()
139 when(mResources.getDimensionPixelSize(R.dimen.lock_icon_padding)).thenReturn(PADDING); in setUp()
161 mResources, in setUp()
219 when(mLockIconView.getResources()).thenReturn(mResources); in setupLockIconViewMocks()

123456