/frameworks/layoutlib/bridge/src/android/content/res/ |
D | Resources_Delegate.java | 41 import com.android.resources.ResourceType; 42 import com.android.resources.ResourceUrl; 91 Resources resources = new Resources(Resources_Delegate.class.getClassLoader()); in initSystem() local 92 resources.setImpl(new ResourcesImpl(assets, metrics, config, new DisplayAdjustments())); in initSystem() 93 sContexts.put(resources, Objects.requireNonNull(context)); in initSystem() 94 sLayoutlibCallbacks.put(resources, Objects.requireNonNull(layoutlibCallback)); in initSystem() 95 return Resources.mSystem = resources; in initSystem() 101 public static BridgeContext getContext(@NonNull Resources resources) { in getContext() argument 102 assert sContexts.containsKey(resources) : in getContext() 104 return sContexts.get(resources); in getContext() [all …]
|
/frameworks/base/services/core/java/com/android/server/display/whitebalance/ |
D | DisplayWhiteBalanceFactory.java | 58 SensorManager sensorManager, Resources resources) { in create() argument 60 createBrightnessSensor(handler, sensorManager, resources); in create() 61 final AmbientFilter brightnessFilter = createBrightnessFilter(resources); in create() 63 createColorTemperatureSensor(handler, sensorManager, resources); in create() 64 final AmbientFilter colorTemperatureFilter = createColorTemperatureFilter(resources); in create() 65 final DisplayWhiteBalanceThrottler throttler = createThrottler(resources); in create() 66 final float[] displayWhiteBalanceLowLightAmbientBrightnesses = getFloatArray(resources, in create() 69 final float[] displayWhiteBalanceLowLightAmbientBiases = getFloatArray(resources, in create() 72 final float lowLightAmbientColorTemperature = getFloat(resources, in create() 75 final float[] displayWhiteBalanceHighLightAmbientBrightnesses = getFloatArray(resources, in create() [all …]
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | ScreenDecorationsUtils.java | 33 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/core/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 36 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 …]
|
D | ResourcesDrawableTest.java | 44 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/av/services/mediaresourcemanager/ |
D | ResourceManagerService.cpp | 74 static bool hasResourceType(MediaResource::Type type, const ResourceList& resources) { in hasResourceType() argument 75 for (auto it = resources.begin(); it != resources.end(); it++) { in hasResourceType() 85 if (hasResourceType(type, infos[i].resources)) { in hasResourceType() 124 static void notifyResourceGranted(int pid, const Vector<MediaResource> &resources) { in notifyResourceGranted() argument 129 for (size_t i = 0; i < resources.size(); ++i) { in notifyResourceGranted() 130 if (resources[i].mSubType == MediaResource::kAudioCodec) { in notifyResourceGranted() 132 } else if (resources[i].mSubType == MediaResource::kVideoCodec) { in notifyResourceGranted() 188 const ResourceList &resources = infos[j].resources; in dump() local 190 for (auto it = resources.begin(); it != resources.end(); it++) { in dump() 310 const Vector<MediaResource> &resources) { in addResource() argument [all …]
|
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/ |
D | ConfigGenerator.java | 20 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/ |
D | ResourceManagerService_test.cpp | 186 const Vector<MediaResource> &resources) { in expectEqResourceInfo() argument 189 EXPECT_TRUE(isEqualResources(resources, info.resources)); in expectEqResourceInfo() 398 Vector<MediaResource> resources; in testReclaimResourceSecure() local 399 resources.push_back(MediaResource(MediaResource::kSecureCodec, 1)); in testReclaimResourceSecure() 400 resources.push_back(MediaResource(MediaResource::kGraphicMemory, 150)); in testReclaimResourceSecure() 409 EXPECT_FALSE(mService->reclaimResource(kLowPriorityPid, resources)); in testReclaimResourceSecure() 410 EXPECT_FALSE(mService->reclaimResource(kMidPriorityPid, resources)); in testReclaimResourceSecure() 413 EXPECT_TRUE(mService->reclaimResource(kHighPriorityPid, resources)); in testReclaimResourceSecure() 417 EXPECT_TRUE(mService->reclaimResource(kHighPriorityPid, resources)); in testReclaimResourceSecure() 421 EXPECT_FALSE(mService->reclaimResource(kHighPriorityPid, resources)); in testReclaimResourceSecure() [all …]
|
/frameworks/av/media/libmedia/ |
D | IResourceManagerService.cpp | 79 const Vector<MediaResource> &resources) { in addResource() argument 86 writeToParcel(&data, resources); in addResource() 91 virtual void removeResource(int pid, int64_t clientId, const Vector<MediaResource> &resources) { in removeResource() argument 96 writeToParcel(&data, resources); in removeResource() 110 virtual bool reclaimResource(int callingPid, const Vector<MediaResource> &resources) { in reclaimResource() argument 114 writeToParcel(&data, resources); in reclaimResource() 152 Vector<MediaResource> resources; in onTransact() local 153 readFromParcel(data, &resources); in onTransact() 154 addResource(pid, uid, clientId, client, resources); in onTransact() 162 Vector<MediaResource> resources; in onTransact() local [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/ |
D | Partner.java | 65 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/services/core/java/com/android/server/ |
D | GestureLauncherService.java | 150 Resources resources = mContext.getResources(); in onBootPhase() local 151 if (!isGestureLauncherEnabled(resources)) { in onBootPhase() 183 Resources resources = mContext.getResources(); in updateCameraRegistered() local 185 registerCameraLaunchGesture(resources); in updateCameraRegistered() 191 registerCameraLiftTrigger(resources); in updateCameraRegistered() 223 private void registerCameraLaunchGesture(Resources resources) { in registerCameraLaunchGesture() argument 231 int cameraLaunchGestureId = resources.getInteger( in registerCameraLaunchGesture() 235 String sensorName = resources.getString( in registerCameraLaunchGesture() 274 private void registerCameraLiftTrigger(Resources resources) { in registerCameraLiftTrigger() argument 280 int cameraLiftTriggerId = resources.getInteger( in registerCameraLiftTrigger() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | SmartReplyConstants.java | 73 final Resources resources = mContext.getResources(); in SmartReplyConstants() local 74 mDefaultEnabled = resources.getBoolean( in SmartReplyConstants() 76 mDefaultRequiresP = resources.getBoolean( in SmartReplyConstants() 78 mDefaultMaxSqueezeRemeasureAttempts = resources.getInteger( in SmartReplyConstants() 80 mDefaultEditChoicesBeforeSending = resources.getBoolean( in SmartReplyConstants() 82 mDefaultShowInHeadsUp = resources.getBoolean( in SmartReplyConstants() 84 mDefaultMinNumSystemGeneratedReplies = resources.getInteger( in SmartReplyConstants() 86 mDefaultMaxNumActions = resources.getInteger( in SmartReplyConstants() 88 mDefaultOnClickInitDelay = resources.getInteger( in SmartReplyConstants()
|
/frameworks/base/core/java/android/content/res/ |
D | FontResourcesParser.java | 133 public static @Nullable FamilyResourceEntry parse(XmlPullParser parser, Resources resources) in parse() argument 144 return readFamilies(parser, resources); in parse() 148 Resources resources) throws XmlPullParserException, IOException { in readFamilies() argument 153 return readFamily(parser, resources); in readFamilies() 162 Resources resources) throws XmlPullParserException, IOException { in readFamily() argument 164 TypedArray array = resources.obtainAttributes(attrs, R.styleable.FontFamily); in readFamily() 176 TypedArray typedArray = resources.obtainTypedArray(certsId); in readFamily() 183 String[] certsArray = resources.getStringArray(certId); in readFamily() 188 String[] certsArray = resources.getStringArray(certsId); in readFamily() 201 final FontFileResourceEntry entry = readFont(parser, resources); in readFamily() [all …]
|
/frameworks/base/core/java/android/app/ |
D | ResourcesManager.java | 304 public Display getAdjustedDisplay(final int displayId, Resources resources) { in getAdjustedDisplay() argument 311 return dm.getCompatibleDisplay(displayId, resources); in getAdjustedDisplay() 636 Resources resources = weakResourceRef.get(); in getOrCreateResourcesForActivityLocked() local 638 if (resources != null in getOrCreateResourcesForActivityLocked() 639 && Objects.equals(resources.getClassLoader(), classLoader) in getOrCreateResourcesForActivityLocked() 640 && resources.getImpl() == impl) { in getOrCreateResourcesForActivityLocked() 642 Slog.d(TAG, "- using existing ref=" + resources); in getOrCreateResourcesForActivityLocked() 644 return resources; in getOrCreateResourcesForActivityLocked() 648 Resources resources = compatInfo.needsCompatResources() ? new CompatResources(classLoader) in getOrCreateResourcesForActivityLocked() local 650 resources.setImpl(impl); in getOrCreateResourcesForActivityLocked() [all …]
|
/frameworks/base/packages/SettingsLib/AdaptiveIcon/src/com/android/settingslib/widget/ |
D | AdaptiveOutlineDrawable.java | 42 public AdaptiveOutlineDrawable(Resources resources, Bitmap bitmap) { in AdaptiveOutlineDrawable() argument 43 super(new AdaptiveIconShapeDrawable(resources)); in AdaptiveOutlineDrawable() 47 resources.getString(com.android.internal.R.string.config_icon_mask))); in AdaptiveOutlineDrawable() 49 mOutlinePaint.setColor(resources.getColor(R.color.bt_outline_color, null)); in AdaptiveOutlineDrawable() 51 mOutlinePaint.setStrokeWidth(resources.getDimension(R.dimen.adaptive_outline_stroke)); in AdaptiveOutlineDrawable() 54 mInsetPx = resources in AdaptiveOutlineDrawable()
|
D | AdaptiveIconShapeDrawable.java | 41 public AdaptiveIconShapeDrawable(Resources resources) { in AdaptiveIconShapeDrawable() argument 43 init(resources); in AdaptiveIconShapeDrawable() 53 private void init(Resources resources) { in init() argument 56 resources.getString(com.android.internal.R.string.config_icon_mask))); in init()
|
/frameworks/layoutlib/bridge/resources/bars/ |
D | README | 1 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/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/util/ |
D | SessionParamsBuilder.java | 28 import com.android.ide.common.resources.ResourceResolver; 29 import com.android.ide.common.resources.configuration.FolderConfiguration; 30 import com.android.ide.common.resources.deprecated.ResourceRepository; 33 import com.android.resources.ResourceType; 84 public SessionParamsBuilder setProjectResources(@NonNull ResourceRepository resources) { in setProjectResources() argument 85 mProjectResources = resources; in setProjectResources() 90 public SessionParamsBuilder setFrameworkResources(@NonNull ResourceRepository resources) { in setFrameworkResources() argument 91 mFrameworkResources = resources; in setFrameworkResources()
|
/frameworks/base/rs/java/android/renderscript/ |
D | ScriptC.java | 59 protected ScriptC(RenderScript rs, Resources resources, int resourceID) { in ScriptC() argument 61 long id = internalCreate(rs, resources, resourceID); in ScriptC() 87 …private static synchronized long internalCreate(RenderScript rs, Resources resources, int resource… in internalCreate() argument 90 InputStream is = resources.openRawResource(resourceID); in internalCreate() 116 String resName = resources.getResourceEntryName(resourceID); in internalCreate()
|
/frameworks/rs/support/java/src/androidx/renderscript/ |
D | ScriptC.java | 57 protected ScriptC(RenderScript rs, Resources resources, int resourceID) { in ScriptC() argument 59 long id = internalCreate(rs, resources, resourceID); in ScriptC() 88 …private static synchronized long internalCreate(RenderScript rs, Resources resources, int resource… in internalCreate() argument 91 InputStream is = resources.openRawResource(resourceID); in internalCreate() 117 String resName = resources.getResourceEntryName(resourceID); in internalCreate()
|
/frameworks/layoutlib/bridge/tests/res/testApp/MyApplication/src/main/java/com/android/layoutlib/test/myapplication/ |
D | ArraysCheckWidget.java | 39 Resources resources = context.getResources(); in ArraysCheckWidget() local 40 for (CharSequence chars : resources.getTextArray(R.array.array)) { in ArraysCheckWidget() 43 for (int i : resources.getIntArray(R.array.int_array)) { in ArraysCheckWidget() 46 for (String string : resources.getStringArray(R.array.string_array)) { in ArraysCheckWidget()
|
/frameworks/base/packages/SettingsLib/HelpUtils/src/com/android/settingslib/ |
D | HelpUtils.java | 184 Resources resources = context.getResources(); in addIntentParameters() local 186 resources.getBoolean(android.R.bool.config_sendPackageName); in addIntentParameters() 190 {resources.getString(android.R.string.config_helpPackageNameKey)}; in addIntentParameters() 192 {resources.getString(android.R.string.config_helpPackageNameValue)}; in addIntentParameters() 194 resources.getString(android.R.string.config_helpIntentExtraKey); in addIntentParameters() 196 resources.getString(android.R.string.config_helpIntentNameKey); in addIntentParameters() 198 resources.getString(android.R.string.config_feedbackIntentExtraKey); in addIntentParameters() 200 resources.getString(android.R.string.config_feedbackIntentNameKey); in addIntentParameters()
|
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
D | ResourceModifiers.java | 60 public static void init(Resources resources) { in init() argument 61 sInstance = new ResourceModifiers(resources); in init() 64 public ResourceModifiers(Resources resources) { in ResourceModifiers() argument 65 mBitmap = BitmapFactory.decodeResource(resources, R.drawable.sunset1); in ResourceModifiers() 69 mDrawWidth = resources.getDimensionPixelSize(R.dimen.layer_width); in ResourceModifiers() 70 mDrawHeight = resources.getDimensionPixelSize(R.dimen.layer_height); in ResourceModifiers()
|
/frameworks/layoutlib/remote/common/src/com/android/layout/remote/api/ |
D | RemoteHardwareConfig.java | 20 import com.android.resources.Density; 21 import com.android.resources.ScreenOrientation; 22 import com.android.resources.ScreenRound; 23 import com.android.resources.ScreenSize;
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | DisplayPowerController.java | 404 final Resources resources = context.getResources(); in DisplayPowerController() local 405 final int screenBrightnessSettingMinimum = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 408 mScreenBrightnessDozeConfig = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 411 mScreenBrightnessDimConfig = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 417 mScreenBrightnessRangeMaximum = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 419 mScreenBrightnessDefault = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 422 mScreenBrightnessForVrRangeMinimum = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 424 mScreenBrightnessForVrRangeMaximum = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 426 mScreenBrightnessForVrDefault = clampAbsoluteBrightness(resources.getInteger( in DisplayPowerController() 429 mUseSoftwareAutoBrightnessConfig = resources.getBoolean( in DisplayPowerController() [all …]
|