Home
last modified time | relevance | path

Searched refs:resources (Results 1 – 25 of 696) sorted by relevance

12345678910>>...28

/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DFakeHdmiCecConfig.java47 Resources resources = spy(context.getResources()); in buildResources() local
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()
57 doReturn(false).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()
[all …]
/frameworks/layoutlib/bridge/src/android/content/res/
DResources_Delegate.java38 import com.android.resources.ResourceType;
39 import com.android.resources.ResourceUrl;
88 Resources resources = new Resources(Resources_Delegate.class.getClassLoader()); in initSystem() local
89 resources.setImpl(new ResourcesImpl(assets, metrics, config, new DisplayAdjustments())); in initSystem()
90 sContexts.put(resources, Objects.requireNonNull(context)); in initSystem()
91 sLayoutlibCallbacks.put(resources, Objects.requireNonNull(layoutlibCallback)); in initSystem()
92 return Resources.mSystem = resources; in initSystem()
98 public static BridgeContext getContext(@NonNull Resources resources) { in getContext() argument
99 assert sContexts.containsKey(resources) : in getContext()
101 return sContexts.get(resources); in getContext()
[all …]
/frameworks/base/services/core/java/com/android/server/display/whitebalance/
DDisplayWhiteBalanceFactory.java60 SensorManager sensorManager, Resources resources) { in create() argument
62 createBrightnessSensor(handler, sensorManager, resources); in create()
64 AmbientFilterFactory.createBrightnessFilter(BRIGHTNESS_FILTER_TAG, resources); in create()
66 createColorTemperatureSensor(handler, sensorManager, resources); in create()
68 .createColorTemperatureFilter(COLOR_TEMPERATURE_FILTER_TAG, resources); in create()
69 final DisplayWhiteBalanceThrottler throttler = createThrottler(resources); in create()
70 final float[] displayWhiteBalanceLowLightAmbientBrightnesses = getFloatArray(resources, in create()
73 final float[] displayWhiteBalanceLowLightAmbientBiases = getFloatArray(resources, in create()
76 final float lowLightAmbientColorTemperature = getFloat(resources, in create()
79 final float[] displayWhiteBalanceHighLightAmbientBrightnesses = getFloatArray(resources, in create()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/complication/dagger/
DComplicationHostViewModule.java71 static int providesComplicationPadding(@Main Resources resources) { in providesComplicationPadding() argument
72 return resources.getDimensionPixelSize(R.dimen.dream_overlay_complication_margin); in providesComplicationPadding()
77 static int providesComplicationMarginPositionStart(@Main Resources resources) { in providesComplicationMarginPositionStart() argument
78 return resources.getDimensionPixelSize(R.dimen.dream_overlay_container_padding_start); in providesComplicationMarginPositionStart()
83 static int providesComplicationMarginPositionTop(@Main Resources resources) { in providesComplicationMarginPositionTop() argument
84 return resources.getDimensionPixelSize(R.dimen.dream_overlay_container_padding_top); in providesComplicationMarginPositionTop()
89 static int providesComplicationMarginPositionEnd(@Main Resources resources) { in providesComplicationMarginPositionEnd() argument
90 return resources.getDimensionPixelSize(R.dimen.dream_overlay_container_padding_end); in providesComplicationMarginPositionEnd()
95 static int providesComplicationMarginPositionBottom(@Main Resources resources) { in providesComplicationMarginPositionBottom() argument
96 return resources.getDimensionPixelSize(R.dimen.dream_overlay_container_padding_bottom); in providesComplicationMarginPositionBottom()
[all …]
DDreamHomeControlsComplicationComponent.java69 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()
118 resources.getDimensionPixelSize(R.dimen.dream_overlay_bottom_affordance_inset) 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()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/drawable/
DDrawableSizeTest.kt19 lateinit var resources: Resources variable in com.android.systemui.util.drawable.DrawableSizeTest
23 resources = context.resources in setUp()
29 val result = DrawableSize.downscaleToSize(resources, drawable, 100, 100) in testDownscaleToSize_drawableZeroSize_unchanged()
35 val drawable = BitmapDrawable(resources, in testDownscaleToSize_drawableSmallerThanRequirement_unchanged()
37 resources.displayMetrics, in testDownscaleToSize_drawableSmallerThanRequirement_unchanged()
43 val result = DrawableSize.downscaleToSize(resources, drawable, 300, 300) in testDownscaleToSize_drawableSmallerThanRequirement_unchanged()
51 val drawable = BitmapDrawable(resources, in testDownscaleToSize_drawableLargerThanRequirementWithDensity_resized()
53 resources.displayMetrics, in testDownscaleToSize_drawableLargerThanRequirementWithDensity_resized()
60 val result = DrawableSize.downscaleToSize(resources, drawable, 75, 75) in testDownscaleToSize_drawableLargerThanRequirementWithDensity_resized()
68 val drawable = resources.getDrawable(android.R.drawable.stat_sys_download, in testDownscaleToSize_drawableAnimated_unchanged()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DScreenDecorationsUtils.java39 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()
/frameworks/base/core/tests/coretests/src/android/content/res/
DResourcesLocaleTest.java38 final Resources resources = getContext().getResources(); in extractApkAndGetPath() local
39 try (InputStream is = resources.openRawResource(id)) { in extractApkAndGetPath()
40 File path = new File(getContext().getFilesDir(), resources.getResourceEntryName(id)); in extractApkAndGetPath()
55 private static void ensureNoLanguage(Resources resources, String language) { in ensureNoLanguage() argument
56 final String[] supportedLocales = resources.getAssets().getNonSystemLocales(); in ensureNoLanguage()
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
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/dagger/
DDreamOverlayModule.java101 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
135 return (long) resources.getInteger(R.integer.config_dreamOverlayInBlurDurationMs); in providesDreamInBlurAnimationDuration()
[all …]
/frameworks/base/cmds/idmap2/tests/
DResourceMappingTests.cpp145 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay-legacy.apk", "", in TEST() local
148 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
149 auto& res = *resources; in TEST()
162 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", "SwapNames", in TEST() local
166 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
167 auto& res = *resources; in TEST()
178 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", in TEST() local
182 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
183 auto& res = *resources; in TEST()
193 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", "Inline", in TEST() local
[all …]
/frameworks/av/services/mediaresourcemanager/test/
DResourceManagerService_test.cpp333 std::vector<MediaResourceParcel> resources; in testOverridePid() local
334 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testOverridePid()
335 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testOverridePid()
348 CHECK_STATUS_FALSE(mService->reclaimResource(clientInfo, resources, &result)); in testOverridePid()
352 CHECK_STATUS_TRUE(mService->reclaimResource(clientInfo, resources, &result)); in testOverridePid()
356 CHECK_STATUS_FALSE(mService->reclaimResource(clientInfo, resources, &result)); in testOverridePid()
377 std::vector<MediaResourceParcel> resources; in testMarkClientForPendingRemoval() local
378 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testMarkClientForPendingRemoval()
384 CHECK_STATUS_FALSE(mService->reclaimResource(client2Info, resources, &result)); in testMarkClientForPendingRemoval()
392 CHECK_STATUS_TRUE(mService->reclaimResource(client2Info, resources, &result)); in testMarkClientForPendingRemoval()
[all …]
DResourceObserverService_test.cpp271 std::vector<MediaResourceParcel> resources; in TEST_F() local
273 resources = {createSecureVideoCodecResource()}; in TEST_F()
274 mService->addResource(client1Info, mTestClient1, resources); in TEST_F()
280 resources = {createNonSecureVideoCodecResource()}; in TEST_F()
281 mService->addResource(client2Info, mTestClient2, resources); in TEST_F()
287 resources = {createSecureVideoCodecResource(), in TEST_F()
289 mService->addResource(client3Info, mTestClient3, resources); in TEST_F()
295 resources.push_back(createSecureAudioCodecResource()); in TEST_F()
296 resources.push_back(createNonSecureAudioCodecResource()); in TEST_F()
297 mService->addResource(client1Info, mTestClient1, resources); in TEST_F()
[all …]
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/
DAdaptiveOutlineDrawable.java64 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
82 resources.getString(com.android.internal.R.string.config_icon_mask))); in init()
83 mStrokeWidth = resources.getDimensionPixelSize(R.dimen.adaptive_outline_stroke); in init()
85 mOutlinePaint.setColor(getColor(resources, type)); in init()
[all …]
/frameworks/layoutlib/bridge/bridge_client/src/com/android/layoutlib/bridge/intensive/setup/
DConfigGenerator.java20 import com.android.ide.common.resources.configuration.CountryCodeQualifier;
21 import com.android.ide.common.resources.configuration.DensityQualifier;
22 import com.android.ide.common.resources.configuration.FolderConfiguration;
23 import com.android.ide.common.resources.configuration.KeyboardStateQualifier;
24 import com.android.ide.common.resources.configuration.LayoutDirectionQualifier;
25 import com.android.ide.common.resources.configuration.LocaleQualifier;
26 import com.android.ide.common.resources.configuration.NavigationMethodQualifier;
27 import com.android.ide.common.resources.configuration.NetworkCodeQualifier;
28 import com.android.ide.common.resources.configuration.NightModeQualifier;
29 import com.android.ide.common.resources.configuration.ScreenDimensionQualifier;
[all …]
/frameworks/base/services/core/java/com/android/server/display/utils/
DAmbientFilterFactory.java60 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()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/
DPartner.java65 return entry.resources.getDrawable(entry.id); in getDrawable()
75 return entry.resources.getString(entry.id); in getString()
83 return resourceEntry.resources.getColor(resourceEntry.id); in getColor()
92 return entry.resources.getText(entry.id); in getText()
113 return new ResourceEntry(partner.resources, partnerId, true); in getResourceEntry()
120 public Resources resources; field in Partner.ResourceEntry
124 ResourceEntry(Resources resources, int id, boolean isOverlay) { in ResourceEntry() argument
125 this.resources = resources; in ResourceEntry()
182 private final Resources resources; field in Partner
186 resources = res; in Partner()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/drawable/
DAdaptiveIconDrawable_Delegate.java62 Resources resources) { in createThemedVersionFromMonochrome() argument
64 int[] colors = getColors(resources); in createThemedVersionFromMonochrome()
69 private static int[] getColors(Resources resources) { in getColors() argument
71 if (resources.getConfiguration().isNightModeActive()) { in getColors()
72 colors[0] = resources.getColor(android.R.color.system_neutral1_800, null); in getColors()
73 colors[1] = resources.getColor(android.R.color.system_accent1_100, null); in getColors()
75 colors[0] = resources.getColor(android.R.color.system_accent1_100, null); in getColors()
76 colors[1] = resources.getColor(android.R.color.system_neutral2_700, null); in getColors()
/frameworks/base/packages/EasterEgg/src/com/android/egg/landroid/
DNamer.kt29 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))
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/service/dagger/
DObservableServiceModule.java47 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()
/frameworks/base/core/java/android/os/vibrator/
DVibrationConfig.java64 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()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shadow/
DDoubleShadowTextClockTest.kt44 @Mock lateinit var resources: Resources variable in com.android.systemui.shadow.DoubleShadowTextClockTest
61 whenever(resources.getBoolean(R.bool.dream_overlay_complication_clock_bottom_padding)) in testAddingPaddingToBottomOfClockWhenConfigIsTrue()
66 resources = resources, in testAddingPaddingToBottomOfClockWhenConfigIsTrue()
76 whenever(resources.getBoolean(R.bool.dream_overlay_complication_clock_bottom_padding)) in testRemovingPaddingToBottomOfClockWhenConfigIsFalse()
81 resources = resources, in testRemovingPaddingToBottomOfClockWhenConfigIsFalse()
/frameworks/base/core/res/
DAndroid.bp47 name: "remote-color-resources-compile-public",
57 name: "remote-color-resources-compile-colors",
67 name: "remote-color-resources-apk",
72 ":remote-color-resources-compile-public",
73 ":remote-color-resources-compile-colors",
75 out: ["remote-color-resources.apk"],
80 name: "remote-color-resources-arsc",
81 srcs: [":remote-color-resources-apk"],
83 cmd: "mkdir -p $(genDir)/remote-color-resources-arsc && " +
84 "unzip -x $(in) resources.arsc -d $(genDir)/remote-color-resources-arsc && " +
[all …]
/frameworks/base/services/core/java/com/android/server/
DGestureLauncherService.java249 Resources resources = mContext.getResources(); in onBootPhase() local
250 if (!isGestureLauncherEnabled(resources)) { in onBootPhase()
272 resources.getInteger( in onBootPhase()
301 Resources resources = mContext.getResources(); in updateCameraRegistered() local
303 registerCameraLaunchGesture(resources); in updateCameraRegistered()
309 registerCameraLiftTrigger(resources); in updateCameraRegistered()
357 private void registerCameraLaunchGesture(Resources resources) { in registerCameraLaunchGesture() argument
365 int cameraLaunchGestureId = resources.getInteger( in registerCameraLaunchGesture()
369 String sensorName = resources.getString( in registerCameraLaunchGesture()
408 private void registerCameraLiftTrigger(Resources resources) { in registerCameraLiftTrigger() argument
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DLargeScreenUtils.kt13 fun shouldUseSplitNotificationShade(resources: Resources): Boolean { in shouldUseSplitNotificationShade()
14 return resources.getBoolean(R.bool.config_use_split_notification_shade) in shouldUseSplitNotificationShade()
23 fun shouldUseLargeScreenShadeHeader(resources: Resources): Boolean { in shouldUseLargeScreenShadeHeader()
24 return resources.getBoolean(R.bool.config_use_large_screen_shade_header) in shouldUseLargeScreenShadeHeader()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSmartReplyConstants.java76 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()

12345678910>>...28