Home
last modified time | relevance | path

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

12345678910>>...15

/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.java41 import com.android.resources.ResourceType;
42 import com.android.resources.ResourceUrl;
90 Resources resources = new Resources(Resources_Delegate.class.getClassLoader()); in initSystem() local
91 resources.setImpl(new ResourcesImpl(assets, metrics, config, new DisplayAdjustments())); in initSystem()
92 sContexts.put(resources, Objects.requireNonNull(context)); in initSystem()
93 sLayoutlibCallbacks.put(resources, Objects.requireNonNull(layoutlibCallback)); in initSystem()
94 return Resources.mSystem = resources; in initSystem()
100 public static BridgeContext getContext(@NonNull Resources resources) { in getContext() argument
101 assert sContexts.containsKey(resources) : in getContext()
103 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/core/java/com/android/internal/policy/
DScreenDecorationsUtils.java33 public static float getWindowCornerRadius(Resources resources) { in getWindowCornerRadius() argument
34 if (!supportsRoundedCornersOnWindows(resources)) { in getWindowCornerRadius()
39 float defaultRadius = resources.getDimension(R.dimen.rounded_corner_radius) in getWindowCornerRadius()
40 - resources.getDimension(R.dimen.rounded_corner_radius_adjustment); in getWindowCornerRadius()
42 float topRadius = resources.getDimension(R.dimen.rounded_corner_radius_top) in getWindowCornerRadius()
43 - resources.getDimension(R.dimen.rounded_corner_radius_top_adjustment); in getWindowCornerRadius()
47 float bottomRadius = resources.getDimension(R.dimen.rounded_corner_radius_bottom) in getWindowCornerRadius()
48 - resources.getDimension(R.dimen.rounded_corner_radius_bottom_adjustment); in getWindowCornerRadius()
61 public static boolean supportsRoundedCornersOnWindows(Resources resources) { in supportsRoundedCornersOnWindows() argument
62 return resources.getBoolean(R.bool.config_supportsRoundedCornersOnWindows); in supportsRoundedCornersOnWindows()
/frameworks/base/cmds/idmap2/tests/
DResourceMappingTests.cpp135 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay-legacy.apk", "", in TEST() local
138 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
139 auto& res = *resources; in TEST()
152 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", "SwapNames", in TEST() local
156 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
157 auto& res = *resources; in TEST()
168 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", in TEST() local
172 ASSERT_TRUE(resources) << resources.GetErrorMessage(); in TEST()
173 auto& res = *resources; in TEST()
183 auto resources = TestGetResourceMapping("target/target.apk", "overlay/overlay.apk", "Inline", in TEST() local
[all …]
/frameworks/base/core/tests/coretests/src/android/content/res/
DResourcesLocaleTest.java36 final Resources resources = getContext().getResources(); in extractApkAndGetPath() local
37 try (InputStream is = resources.openRawResource(id)) { in extractApkAndGetPath()
38 File path = new File(getContext().getFilesDir(), resources.getResourceEntryName(id)); in extractApkAndGetPath()
53 private static void ensureNoLanguage(Resources resources, String language) { in ensureNoLanguage() argument
54 final String[] supportedLocales = resources.getAssets().getNonSystemLocales(); in ensureNoLanguage()
67 final Resources resources = createResourcesWithApk(R.raw.locales); in testEnglishIsAlwaysConsideredSupported() local
68 ensureNoLanguage(resources, "en"); in testEnglishIsAlwaysConsideredSupported()
74 resources.updateConfiguration(config, null); in testEnglishIsAlwaysConsideredSupported()
79 resources.getConfiguration().getLocales().get(0)); in testEnglishIsAlwaysConsideredSupported()
84 final Resources resources = createResourcesWithApk(R.raw.locales); in testSelectFirstSupportedLanguage() local
[all …]
DResourcesDrawableTest.java44 Resources resources = context.getResources(); in testLoadColorAsDrawable() local
45 Drawable drawable = resources.getDrawable(R.color.color1); in testLoadColorAsDrawable()
52 Resources resources = context.getResources(); in testLoadColorAsDrawableFailureThrowsOriginalException() local
57 resources.getDrawable(R.color.drawable_in_color_dir_invalid); in testLoadColorAsDrawableFailureThrowsOriginalException()
77 Resources resources = context.getResources(); in testLoadNormalDrawableInColorDir() local
78 Drawable drawable = resources.getDrawable(R.color.drawable_in_color_dir_valid); in testLoadNormalDrawableInColorDir()
/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/tests/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/av/services/mediaresourcemanager/test/
DResourceManagerService_test.cpp272 std::vector<MediaResourceParcel> resources; in testOverridePid() local
273 resources.push_back(MediaResource(MediaResource::Type::kSecureCodec, 1)); in testOverridePid()
274 resources.push_back(MediaResource(MediaResource::Type::kGraphicMemory, 150)); in testOverridePid()
283 CHECK_STATUS_FALSE(mService->reclaimResource(kLowPriorityPid, resources, &result)); in testOverridePid()
287 CHECK_STATUS_TRUE(mService->reclaimResource(kLowPriorityPid, resources, &result)); in testOverridePid()
291 CHECK_STATUS_FALSE(mService->reclaimResource(kLowPriorityPid, resources, &result)); in testOverridePid()
302 std::vector<MediaResourceParcel> resources; in testMarkClientForPendingRemoval() local
303 resources.push_back(MediaResource(MediaResource::Type::kNonSecureCodec, 1)); in testMarkClientForPendingRemoval()
309 CHECK_STATUS_FALSE(mService->reclaimResource(kTestPid2, resources, &result)); in testMarkClientForPendingRemoval()
315 CHECK_STATUS_TRUE(mService->reclaimResource(kTestPid2, resources, &result)); in testMarkClientForPendingRemoval()
[all …]
DResourceObserverService_test.cpp234 std::vector<MediaResourceParcel> resources; in TEST_F() local
236 resources = {MediaResource::CodecResource(1 /*secure*/, 1 /*video*/)}; in TEST_F()
237 mService->addResource(kTestPid1, kTestUid1, getId(mTestClient1), mTestClient1, resources); in TEST_F()
243 resources = {MediaResource::CodecResource(0 /*secure*/, 1 /*video*/)}; in TEST_F()
244 mService->addResource(kTestPid2, kTestUid2, getId(mTestClient2), mTestClient2, resources); in TEST_F()
250 resources = {MediaResource::CodecResource(1 /*secure*/, 1 /*video*/), in TEST_F()
252 mService->addResource(kTestPid2, kTestUid2, getId(mTestClient3), mTestClient3, resources); in TEST_F()
258 resources.push_back(MediaResource::CodecResource(1 /*secure*/, 0 /*video*/)); in TEST_F()
259 resources.push_back(MediaResource::CodecResource(0 /*secure*/, 0 /*video*/)); in TEST_F()
260 mService->addResource(kTestPid1, kTestUid1, getId(mTestClient1), mTestClient1, resources); in TEST_F()
[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/base/core/res/
DAndroid.bp48 name: "remote-color-resources-compile-public",
58 name: "remote-color-resources-compile-colors",
68 name: "remote-color-resources-apk",
73 ":remote-color-resources-compile-public",
74 ":remote-color-resources-compile-colors",
76 out: ["remote-color-resources.apk"],
81 name: "remote-color-resources-arsc",
82 srcs: [":remote-color-resources-apk"],
84 cmd: "mkdir -p $(genDir)/remote-color-resources-arsc && "
85 + "unzip -x $(in) resources.arsc -d $(genDir)/remote-color-resources-arsc && "
[all …]
/frameworks/av/services/mediaresourcemanager/
DResourceManagerService.cpp133 static bool hasResourceType(MediaResource::Type type, const ResourceList& resources) { in hasResourceType() argument
134 for (auto it = resources.begin(); it != resources.end(); it++) { in hasResourceType()
144 if (hasResourceType(type, infos[i].resources)) { in hasResourceType()
185 static void notifyResourceGranted(int pid, const std::vector<MediaResourceParcel> &resources) { in notifyResourceGranted() argument
190 for (size_t i = 0; i < resources.size(); ++i) { in notifyResourceGranted()
191 if (resources[i].subType == MediaResource::SubType::kAudioCodec) { in notifyResourceGranted()
193 } else if (resources[i].subType == MediaResource::SubType::kVideoCodec) { in notifyResourceGranted()
257 const ResourceList &resources = infos[j].resources; in dump() local
259 for (auto it = resources.begin(); it != resources.end(); it++) { in dump()
419 const std::vector<MediaResourceParcel>& resources) { in addResource() argument
[all …]
/frameworks/base/services/core/java/com/android/server/
DGestureLauncherService.java199 Resources resources = mContext.getResources(); in onBootPhase() local
200 if (!isGestureLauncherEnabled(resources)) { in onBootPhase()
236 Resources resources = mContext.getResources(); in updateCameraRegistered() local
238 registerCameraLaunchGesture(resources); in updateCameraRegistered()
244 registerCameraLiftTrigger(resources); in updateCameraRegistered()
284 private void registerCameraLaunchGesture(Resources resources) { in registerCameraLaunchGesture() argument
292 int cameraLaunchGestureId = resources.getInteger( in registerCameraLaunchGesture()
296 String sensorName = resources.getString( in registerCameraLaunchGesture()
335 private void registerCameraLiftTrigger(Resources resources) { in registerCameraLiftTrigger() argument
341 int cameraLiftTriggerId = resources.getInteger( in registerCameraLiftTrigger()
[all …]
/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()
/frameworks/base/core/java/android/app/
DResourcesManager.java213 WeakReference<Resources> resources = activityResources.get(i).resources; in countLiveReferences() local
214 if (resources != null && resources.get() != null) { in countLiveReferences()
246 public WeakReference<Resources> resources; field in ResourcesManager.ActivityResource
386 public Display getAdjustedDisplay(final int displayId, Resources resources) { in getAdjustedDisplay() argument
393 return dm.getCompatibleDisplay(displayId, resources); in getAdjustedDisplay()
733 Resources resources = activityResource.resources.get(); in findResourcesForActivityLocked() local
734 ResourcesKey key = resources == null ? null : findKeyForResourceImplLocked( in findResourcesForActivityLocked()
735 resources.getImpl()); in findResourcesForActivityLocked()
738 && Objects.equals(resources.getClassLoader(), targetClassLoader) in findResourcesForActivityLocked()
740 return resources; in findResourcesForActivityLocked()
[all …]
/frameworks/base/core/java/android/content/res/
DFontResourcesParser.java140 public static @Nullable FamilyResourceEntry parse(XmlPullParser parser, Resources resources) in parse() argument
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()
216 final FontFileResourceEntry entry = readFont(parser, resources); in readFamily()
[all …]
/frameworks/base/apex/blobstore/service/java/com/android/server/blob/
DBlobStoreUtils.java48 static int getDescriptionResourceId(@NonNull Resources resources, in getDescriptionResourceId() argument
50 return resources.getIdentifier(resourceEntryName, DESC_RES_TYPE_STRING, packageName); in getDescriptionResourceId()
56 final Resources resources = getPackageResources(context, packageName, userId); in getDescriptionResourceId() local
57 return resources == null in getDescriptionResourceId()
59 : getDescriptionResourceId(resources, resourceEntryName, packageName); in getDescriptionResourceId()
/frameworks/layoutlib/bridge/tests/src/com/android/ide/common/resources/deprecated/
DResourceFolder.java17 package com.android.ide.common.resources.deprecated;
20 import com.android.ide.common.resources.configuration.Configurable;
21 import com.android.ide.common.resources.configuration.FolderConfiguration;
24 import com.android.resources.FolderTypeRelationship;
25 import com.android.resources.ResourceFolderType;
26 import com.android.resources.ResourceType;
DResourceFile.java17 package com.android.ide.common.resources.deprecated;
20 import com.android.ide.common.resources.configuration.Configurable;
21 import com.android.ide.common.resources.configuration.FolderConfiguration;
22 import com.android.resources.ResourceType;
/frameworks/base/core/java/android/accessibilityservice/util/
DAccessibilityUtils.java119 final Resources resources = context.getResources(); in getScreenWidthPixels() local
120 final int screenWidthDp = resources.getConfiguration().screenWidthDp; in getScreenWidthPixels()
123 resources.getDisplayMetrics())); in getScreenWidthPixels()
133 final Resources resources = context.getResources(); in getScreenHeightPixels() local
134 final int screenHeightDp = resources.getConfiguration().screenHeightDp; in getScreenHeightPixels()
137 resources.getDisplayMetrics())); in getScreenHeightPixels()
/frameworks/layoutlib/bridge/resources/bars/
DREADME1 The directory contains the resources for StatusBar and Navigation Bar.
3 The resources are not arranged as per the standard resources configuration.
4 They are stored per API. However, to prevent duplication of resources, each API
/frameworks/base/tools/aapt2/cmd/
DLink_test.cpp292 R"(<resources>
294 </resources>)",
314 R"(<resources>
319 </resources>)",
336 R"(<resources>
342 </resources>)";
345 R"(<resources>
351 </resources>)";
439 R"(<resources>
442 <!-- S staged attributes (support staged resources in the same type id) -->
[all …]

12345678910>>...15