/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/ |
H A D | FakeHdmiCecConfig.java | 49 doReturn(true).when(resources).getBoolean( in buildResources() 51 doReturn(true).when(resources).getBoolean( in buildResources() 53 doReturn(true).when(resources).getBoolean( in buildResources() 55 doReturn(true).when(resources).getBoolean( in buildResources() 60 doReturn(true).when(resources).getBoolean( in buildResources() 62 doReturn(true).when(resources).getBoolean( in buildResources() 64 doReturn(true).when(resources).getBoolean( in buildResources() 66 doReturn(true).when(resources).getBoolean( in buildResources() 71 doReturn(true).when(resources).getBoolean( in buildResources() 73 doReturn(true).when(resources).getBoolean( in buildResources() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/display/whitebalance/ |
H A D | DisplayWhiteBalanceFactory.java | 60 SensorManager sensorManager, Resources resources) { in create() argument 98 final boolean lightModeAllowed = resources.getBoolean( in create() 121 SensorManager sensorManager, Resources resources) { in createBrightnessSensor() argument 122 final int rate = resources.getInteger( in createBrightnessSensor() 133 final String name = resources.getString( in createColorTemperatureSensor() 136 final int rate = resources.getInteger( in createColorTemperatureSensor() 143 final int increaseDebounce = resources.getInteger( in createThrottler() 145 final int decreaseDebounce = resources.getInteger( in createThrottler() 147 final float[] baseThresholds = getFloatArray(resources, in createThrottler() 159 resources.getValue(id, value, true /* resolveRefs */); in getFloat() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/complication/dagger/ |
H A D | ComplicationHostViewModule.java | 71 static int providesComplicationPadding(@Main Resources resources) { in providesComplicationPadding() argument 83 static int providesComplicationMarginPositionTop(@Main Resources resources) { in providesComplicationMarginPositionTop() argument 89 static int providesComplicationMarginPositionEnd(@Main Resources resources) { in providesComplicationMarginPositionEnd() argument 104 static int providesComplicationsFadeOutDuration(@Main Resources resources) { in providesComplicationsFadeOutDuration() argument 105 return resources.getInteger(R.integer.complicationFadeOutMs); in providesComplicationsFadeOutDuration() 113 static int providesComplicationsFadeOutDelay(@Main Resources resources) { in providesComplicationsFadeOutDelay() argument 114 return resources.getInteger(R.integer.complicationFadeOutDelayMs); in providesComplicationsFadeOutDelay() 122 static int providesComplicationsFadeInDuration(@Main Resources resources) { in providesComplicationsFadeInDuration() argument 123 return resources.getInteger(R.integer.complicationFadeInMs); in providesComplicationsFadeInDuration() 131 static int providesComplicationsRestoreTimeout(@Main Resources resources) { in providesComplicationsRestoreTimeout() argument [all …]
|
H A D | DreamHomeControlsComplicationComponent.java | 69 DreamHomeControlsComplicationComponent create(@BindsInstance Resources resources); in create() argument 100 static Drawable providesHomeControlsBackground(Context context, Resources resources) { in providesHomeControlsBackground() argument 102 resources, in providesHomeControlsBackground() 109 resources, in providesHomeControlsBackground() 115 resources.getDrawable(R.drawable.dream_overlay_bottom_affordance_bg), in providesHomeControlsBackground() 116 resources.getDimensionPixelOffset( in providesHomeControlsBackground() 127 private static DoubleShadowTextHelper.ShadowInfo createShadowInfo(Resources resources, in createShadowInfo() argument 131 resources.getDimension(blurId), in createShadowInfo() 132 resources.getDimension(offsetXId), in createShadowInfo() 133 resources.getDimension(offsetYId), in createShadowInfo() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/drawable/ |
H A D | DrawableSizeTest.kt | 19 lateinit var resources: Resources 23 resources = context.resources 29 val result = DrawableSize.downscaleToSize(resources, drawable, 100, 100) 35 val drawable = BitmapDrawable(resources, 37 resources.displayMetrics, 43 val result = DrawableSize.downscaleToSize(resources, drawable, 300, 300) 51 val drawable = BitmapDrawable(resources, 53 resources.displayMetrics, 60 val result = DrawableSize.downscaleToSize(resources, drawable, 75, 75) 69 resources.newTheme()) [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/policy/ |
H A D | ScreenDecorationsUtils.java | 39 final Resources resources = context.getResources(); in getWindowCornerRadius() local 40 if (!supportsRoundedCornersOnWindows(resources)) { in getWindowCornerRadius() 46 float defaultRadius = RoundedCorners.getRoundedCornerRadius(resources, displayUniqueId) in getWindowCornerRadius() 47 - RoundedCorners.getRoundedCornerRadiusAdjustment(resources, displayUniqueId); in getWindowCornerRadius() 49 float topRadius = RoundedCorners.getRoundedCornerTopRadius(resources, displayUniqueId) in getWindowCornerRadius() 50 - RoundedCorners.getRoundedCornerRadiusTopAdjustment(resources, displayUniqueId); in getWindowCornerRadius() 54 float bottomRadius = RoundedCorners.getRoundedCornerBottomRadius(resources, displayUniqueId) in getWindowCornerRadius() 55 - RoundedCorners.getRoundedCornerRadiusBottomAdjustment(resources, displayUniqueId); in getWindowCornerRadius() 68 public static boolean supportsRoundedCornersOnWindows(Resources resources) { in supportsRoundedCornersOnWindows() argument 69 return resources.getBoolean(R.bool.config_supportsRoundedCornersOnWindows); in supportsRoundedCornersOnWindows()
|
/aosp14/frameworks/base/cmds/idmap2/tests/ |
H A D | ResourceMappingTests.cpp | 148 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 166 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 182 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 197 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 228 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 252 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 271 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 291 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 325 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() 345 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST() [all …]
|
/aosp14/frameworks/base/core/tests/coretests/src/android/content/res/ |
H A D | ResourcesLocaleTest.java | 38 final Resources resources = getContext().getResources(); in extractApkAndGetPath() local 39 try (InputStream is = resources.openRawResource(id)) { in extractApkAndGetPath() 55 private static void ensureNoLanguage(Resources resources, String language) { in ensureNoLanguage() argument 69 final Resources resources = createResourcesWithApk(R.raw.locales); in testEnglishIsAlwaysConsideredSupported() local 70 ensureNoLanguage(resources, "en"); in testEnglishIsAlwaysConsideredSupported() 76 resources.updateConfiguration(config, null); in testEnglishIsAlwaysConsideredSupported() 81 resources.getConfiguration().getLocales().get(0)); in testEnglishIsAlwaysConsideredSupported() 86 final Resources resources = createResourcesWithApk(R.raw.locales); in testSelectFirstSupportedLanguage() local 87 ensureNoLanguage(resources, "fr"); in testSelectFirstSupportedLanguage() 93 resources.updateConfiguration(config, null); in testSelectFirstSupportedLanguage() [all …]
|
H A D | ResourcesDrawableTest.java | 46 Resources resources = context.getResources(); in testLoadColorAsDrawable() local 47 Drawable drawable = resources.getDrawable(R.color.color1); in testLoadColorAsDrawable() 54 Resources resources = context.getResources(); in testLoadColorAsDrawableFailureThrowsOriginalException() local 59 resources.getDrawable(R.color.drawable_in_color_dir_invalid); in testLoadColorAsDrawableFailureThrowsOriginalException() 79 Resources resources = context.getResources(); in testLoadNormalDrawableInColorDir() local 80 Drawable drawable = resources.getDrawable(R.color.drawable_in_color_dir_valid); in testLoadNormalDrawableInColorDir()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/dagger/ |
H A D | DreamOverlayModule.java | 101 static int providesMaxBurnInOffset(@Main Resources resources) { in providesMaxBurnInOffset() argument 102 return resources.getDimensionPixelSize(R.dimen.default_burn_in_prevention_offset); in providesMaxBurnInOffset() 108 static long providesBurnInProtectionUpdateInterval(@Main Resources resources) { in providesBurnInProtectionUpdateInterval() argument 109 return resources.getInteger( in providesBurnInProtectionUpdateInterval() 116 static long providesMillisUntilFullJitter(@Main Resources resources) { in providesMillisUntilFullJitter() argument 117 return resources.getInteger(R.integer.config_dreamOverlayMillisUntilFullJitter); in providesMillisUntilFullJitter() 125 static int providesDreamBlurRadius(@Main Resources resources) { in providesDreamBlurRadius() argument 126 return resources.getDimensionPixelSize(R.dimen.dream_overlay_anim_blur_radius); in providesDreamBlurRadius() 134 static long providesDreamInBlurAnimationDuration(@Main Resources resources) { in providesDreamInBlurAnimationDuration() argument 153 static int providesDreamInComplicationsTranslationY(@Main Resources resources) { in providesDreamInComplicationsTranslationY() argument [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/ |
H A D | AdaptiveOutlineDrawable.java | 64 public AdaptiveOutlineDrawable(Resources resources, Bitmap bitmap) { in AdaptiveOutlineDrawable() argument 65 super(new AdaptiveIconShapeDrawable(resources)); in AdaptiveOutlineDrawable() 67 init(resources, bitmap, ICON_TYPE_DEFAULT); in AdaptiveOutlineDrawable() 70 public AdaptiveOutlineDrawable(Resources resources, Bitmap bitmap, in AdaptiveOutlineDrawable() argument 72 super(new AdaptiveIconShapeDrawable(resources)); in AdaptiveOutlineDrawable() 74 init(resources, bitmap, type); in AdaptiveOutlineDrawable() 77 private void init(Resources resources, Bitmap bitmap, in init() argument 85 mOutlinePaint.setColor(getColor(resources, type)); in init() 90 mInsetPx = getDimensionPixelSize(resources, type); in init() 105 return resources.getColor(resId, /* theme */ null); in getColor() [all …]
|
/aosp14/frameworks/base/services/core/java/com/android/server/display/utils/ |
H A D | AmbientFilterFactory.java | 60 public static AmbientFilter createBrightnessFilter(String tag, Resources resources) { in createBrightnessFilter() argument 61 final int horizon = resources.getInteger( in createBrightnessFilter() 63 final float intercept = getFloat(resources, in createBrightnessFilter() 80 public static AmbientFilter createColorTemperatureFilter(String tag, Resources resources) { in createColorTemperatureFilter() argument 81 final int horizon = resources.getInteger( in createColorTemperatureFilter() 84 final float intercept = getFloat(resources, in createColorTemperatureFilter() 94 private static float getFloat(Resources resources, int id) { in getFloat() argument 97 resources.getValue(id, value, true /* resolveRefs */); in getFloat()
|
/aosp14/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/ |
H A D | Namer.kt | 29 class Namer(resources: Resources) { 30 private val planetDescriptors = Bag(resources.getStringArray(R.array.planet_descriptors)) 31 private val lifeDescriptors = Bag(resources.getStringArray(R.array.life_descriptors)) 32 private val anyDescriptors = Bag(resources.getStringArray(R.array.any_descriptors)) 33 private val atmoDescriptors = Bag(resources.getStringArray(R.array.atmo_descriptors)) 35 private val planetTypes = Bag(resources.getStringArray(R.array.planet_types)) 36 private val constellations = Bag(resources.getStringArray(R.array.constellations)) 37 private val constellationsRare = Bag(resources.getStringArray(R.array.constellations_rare)) 38 private val suffixes = Bag(resources.getStringArray(R.array.star_suffixes)) 39 private val suffixesRare = Bag(resources.getStringArray(R.array.star_suffixes_rare))
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/util/service/dagger/ |
H A D | ObservableServiceModule.java | 47 static int providesMaxReconnectAttempts(@Main Resources resources) { in providesMaxReconnectAttempts() argument 48 return resources.getInteger( in providesMaxReconnectAttempts() 54 static int provideBaseReconnectDelayMs(@Main Resources resources) { in provideBaseReconnectDelayMs() argument 55 return resources.getInteger( in provideBaseReconnectDelayMs() 61 static int providesMinConnectionDuration(@Main Resources resources) { in providesMinConnectionDuration() argument 62 return resources.getInteger( in providesMinConnectionDuration()
|
/aosp14/frameworks/base/core/res/ |
H A D | Android.bp | 67 name: "remote-color-resources-apk", 72 ":remote-color-resources-compile-public", 75 out: ["remote-color-resources.apk"], 80 name: "remote-color-resources-arsc", 81 srcs: [":remote-color-resources-apk"], 84 "unzip -x $(in) resources.arsc -d $(genDir)/remote-color-resources-arsc && " + 86 "mv $(genDir)/remote-color-resources-arsc/resources.arsc $(out) && " + 91 name: "remote-color-resources-arsc-zip", 94 ":remote-color-resources-arsc", 111 ":remote-color-resources-arsc", [all …]
|
/aosp14/frameworks/base/core/java/android/os/vibrator/ |
H A D | VibrationConfig.java | 64 public VibrationConfig(@Nullable Resources resources) { in VibrationConfig() argument 65 mHapticChannelMaxVibrationAmplitude = loadFloat(resources, in VibrationConfig() 67 mRampDownDurationMs = loadInteger(resources, in VibrationConfig() 69 mRampStepDurationMs = loadInteger(resources, in VibrationConfig() 72 mDefaultAlarmVibrationIntensity = loadDefaultIntensity(resources, in VibrationConfig() 74 mDefaultHapticFeedbackIntensity = loadDefaultIntensity(resources, in VibrationConfig() 76 mDefaultMediaVibrationIntensity = loadDefaultIntensity(resources, in VibrationConfig() 78 mDefaultNotificationVibrationIntensity = loadDefaultIntensity(resources, in VibrationConfig() 80 mDefaultRingVibrationIntensity = loadDefaultIntensity(resources, in VibrationConfig()
|
/aosp14/frameworks/base/services/core/java/com/android/server/ |
H A D | GestureLauncherService.java | 272 resources.getInteger( in onBootPhase() 301 Resources resources = mContext.getResources(); in updateCameraRegistered() local 303 registerCameraLaunchGesture(resources); in updateCameraRegistered() 309 registerCameraLiftTrigger(resources); in updateCameraRegistered() 369 String sensorName = resources.getString( in registerCameraLaunchGesture() 418 String sensorName = resources.getString( in registerCameraLiftTrigger() 492 boolean configSet = resources.getInteger( in isCameraLaunchEnabled() 500 return resources.getBoolean( in isCameraDoubleTapPowerEnabled() 505 boolean configSet = resources.getInteger( in isCameraLiftTriggerEnabled() 518 return resources.getBoolean( in isDefaultEmergencyGestureEnabled() [all …]
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shadow/ |
H A D | DoubleShadowTextClockTest.kt | 44 @Mock lateinit var resources: Resources 61 whenever(resources.getBoolean(R.bool.dream_overlay_complication_clock_bottom_padding)) 66 resources = resources, 76 whenever(resources.getBoolean(R.bool.dream_overlay_complication_clock_bottom_padding)) 81 resources = resources,
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
H A D | ConfigurationControllerImplTest.kt | 78 val config = mContext.resources.configuration 97 val config = mContext.resources.configuration 113 val config = mContext.resources.configuration 129 val config = mContext.resources.configuration 146 val config = mContext.resources.configuration 163 val config = mContext.resources.configuration 179 val config = mContext.resources.configuration 197 val config = mContext.resources.configuration 214 val config = mContext.resources.configuration 230 val config = mContext.resources.configuration [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
H A D | SmartReplyConstants.java | 76 final Resources resources = mContext.getResources(); in SmartReplyConstants() local 77 mDefaultEnabled = resources.getBoolean( in SmartReplyConstants() 79 mDefaultRequiresP = resources.getBoolean( in SmartReplyConstants() 81 mDefaultMaxSqueezeRemeasureAttempts = resources.getInteger( in SmartReplyConstants() 83 mDefaultEditChoicesBeforeSending = resources.getBoolean( in SmartReplyConstants() 85 mDefaultShowInHeadsUp = resources.getBoolean( in SmartReplyConstants() 87 mDefaultMinNumSystemGeneratedReplies = resources.getInteger( in SmartReplyConstants() 89 mDefaultMaxNumActions = resources.getInteger( in SmartReplyConstants() 91 mDefaultOnClickInitDelay = resources.getInteger( in SmartReplyConstants()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ui/ |
H A D | ControlsPopupMenu.kt | 38 private val resources: Resources = context.resources 41 resources.getDimensionPixelSize(R.dimen.control_popup_items_divider_height) 43 resources.getDimensionPixelSize(R.dimen.control_popup_horizontal_margin) 44 private val maxWidth: Int = resources.getDimensionPixelSize(R.dimen.control_popup_max_width) 46 private val dialogBackground: Drawable = resources.getDrawable(R.drawable.controls_popup_bg)!! 47 private val dimDrawable: Drawable = ColorDrawable(resources.getColor(R.color.control_popup_dim)) 93 val paddedWidth = resources.displayMetrics.widthPixels - 2 * horizontalMargin
|
/aosp14/frameworks/base/core/java/android/app/ |
H A D | ResourcesManager.java | 213 WeakReference<Resources> resources = activityResources.get(i).resources; in countLiveReferences() local 214 if (resources != null && resources.get() != null) { in countLiveReferences() 757 Resources resources = activityResource.resources.get(); in findResourcesForActivityLocked() local 784 resources.setImpl(impl); in createResourcesForActivityLocked() 788 activityResource.resources = new WeakReference<>(resources, in createResourcesForActivityLocked() 797 return resources; in createResourcesForActivityLocked() 806 resources.setImpl(impl); in createResourcesLocked() 813 return resources; in createResourcesLocked() 1140 return resources; in getResources() 1213 final Resources resources = activityResource.resources.get(); in updateResourcesForActivity() local [all …]
|
/aosp14/frameworks/base/core/java/com/android/internal/util/ |
H A D | UserIcons.java | 80 public static Drawable getDefaultUserIcon(Resources resources, int userId, boolean light) { in getDefaultUserIcon() argument 86 return getDefaultUserIconInColor(resources, resources.getColor(colorResId, null)); in getDefaultUserIcon() 95 public static Drawable getDefaultUserIconInColor(Resources resources, @ColorInt int color) { in getDefaultUserIconInColor() argument 96 Drawable icon = resources.getDrawable(R.drawable.ic_account_circle, null).mutate(); in getDefaultUserIconInColor() 105 public static int[] getUserIconColors(Resources resources) { in getUserIconColors() argument 108 result[i] = resources.getColor(USER_ICON_COLORS[i], null); in getUserIconColors()
|
/aosp14/frameworks/base/core/java/android/content/res/ |
H A D | FontResourcesParser.java | 151 return readFamilies(parser, resources); in parse() 155 Resources resources) throws XmlPullParserException, IOException { in readFamilies() argument 160 return readFamily(parser, resources); in readFamilies() 169 Resources resources) throws XmlPullParserException, IOException { in readFamily() argument 171 TypedArray array = resources.obtainAttributes(attrs, R.styleable.FontFamily); in readFamily() 185 TypedArray typedArray = resources.obtainTypedArray(certsId); in readFamily() 192 String[] certsArray = resources.getStringArray(certId); in readFamily() 197 String[] certsArray = resources.getStringArray(certsId); in readFamily() 217 final FontFileResourceEntry entry = readFont(parser, resources); in readFamily() 232 private static FontFileResourceEntry readFont(XmlPullParser parser, Resources resources) in readFont() argument [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/ |
H A D | KeyguardPreviewSmartspaceViewModel.kt | 41 SettingsClockSize.DYNAMIC -> getLargeClockSmartspaceTopPadding(context.resources) 42 SettingsClockSize.SMALL -> getSmallClockSmartspaceTopPadding(context.resources) 63 fun getLargeClockSmartspaceTopPadding(resources: Resources): Int { 64 return with(resources) { 71 fun getSmallClockSmartspaceTopPadding(resources: Resources): Int { 72 return with(resources) {
|