/aosp12/frameworks/base/tools/aapt2/ |
H A D | Resource.cpp | 49 case ResourceType::kAnim: in to_string() 53 case ResourceType::kArray: in to_string() 55 case ResourceType::kAttr: in to_string() 59 case ResourceType::kBool: in to_string() 61 case ResourceType::kColor: in to_string() 65 case ResourceType::kDimen: in to_string() 69 case ResourceType::kFont: in to_string() 73 case ResourceType::kId: in to_string() 83 case ResourceType::kMenu: in to_string() 91 case ResourceType::kRaw: in to_string() [all …]
|
H A D | Resource_test.cpp | 26 EXPECT_EQ(*type, ResourceType::kAnim); in TEST() 34 EXPECT_EQ(*type, ResourceType::kArray); in TEST() 38 EXPECT_EQ(*type, ResourceType::kAttr); in TEST() 46 EXPECT_EQ(*type, ResourceType::kBool); in TEST() 50 EXPECT_EQ(*type, ResourceType::kColor); in TEST() 58 EXPECT_EQ(*type, ResourceType::kDimen); in TEST() 66 EXPECT_EQ(*type, ResourceType::kFont); in TEST() 74 EXPECT_EQ(*type, ResourceType::kId); in TEST() 90 EXPECT_EQ(*type, ResourceType::kMenu); in TEST() 106 EXPECT_EQ(*type, ResourceType::kRaw); in TEST() [all …]
|
H A D | Resource.h | 39 enum class ResourceType { enum 73 android::StringPiece to_string(ResourceType type); 78 const ResourceType* ParseResourceType(const android::StringPiece& str); 86 ResourceType type = ResourceType::kRaw; 90 ResourceName(const android::StringPiece& p, ResourceType t, const android::StringPiece& e); 106 ResourceType type = ResourceType::kRaw; 113 ResourceNameRef(const android::StringPiece& p, ResourceType t, const android::StringPiece& e); 293 inline ::std::ostream& operator<<(::std::ostream& out, const ResourceType& val) { 301 inline ResourceName::ResourceName(const android::StringPiece& p, ResourceType t, in ResourceName() 344 inline ResourceNameRef::ResourceNameRef(const android::StringPiece& p, ResourceType t, in ResourceNameRef()
|
H A D | ResourceUtils_test.cpp | 48 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST() 52 EXPECT_THAT(actual, Eq(ResourceNameRef({}, ResourceType::kColor, "foo"))); in TEST() 56 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST() 67 EXPECT_THAT(actual, Eq(ResourceNameRef({}, ResourceType::kColor, "foo"))); in TEST() 77 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST() 87 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kColor, "foo"))); in TEST() 97 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kId, "foo"))); in TEST() 107 EXPECT_THAT(actual, Eq(ResourceNameRef("android", ResourceType::kId, "foo"))); in TEST() 116 std::unique_ptr<Item> item = ResourceUtils::ParseBinaryResValue(ResourceType::kId, in TEST() 154 const ResourceName kAndroidStyleFooName("android", ResourceType::kStyle, "foo"); in TEST() [all …]
|
H A D | ResourceParser.cpp | 502 ResourceType type; in ParseResource() 514 {ResourceType::kDimen, in ParseResource() 519 {ResourceType::kFraction, in ParseResource() 608 out_resource->name.type = ResourceType::kId; in ParseResource() 627 } else if (!ref || ref->name.value().type != ResourceType::kId) { in ParseResource() 644 out_resource->name.type = ResourceType::kMacro; in ParseResource() 959 if (*parsed_type == ResourceType::kId) { in ParsePublic() 1293 out_resource->name.type = ResourceType::kAttr; in ParseAttrImpl() 1596 out_resource->name.type = ResourceType::kArray; in ParseArrayImpl() 1651 out_resource->name.type = ResourceType::kPlurals; in ParsePlural() [all …]
|
H A D | ResourceUtils.cpp | 54 const ResourceType* type; in ToResourceName() 89 const ResourceType* type; in ToResourceName() 137 const ResourceType* parsed_type = ParseResourceType(type); in ParseResourceName() 185 if (create && name.type != ResourceType::kId) { in ParseReference() 234 out_ref->type = ResourceType::kAttr; in ParseAttributeReference() 277 ref.type = ResourceType::kStyle; in ParseStyleParentReference() 283 const ResourceType* parsed_type = ParseResourceType(type_str); in ParseStyleParentReference() 284 if (!parsed_type || *parsed_type != ResourceType::kStyle) { in ParseStyleParentReference() 743 if (type == ResourceType::kId) { in ParseBinaryResValue() 772 if (type != ResourceType::kString && util::StartsWith(str, "res/")) { in ParseBinaryResValue() [all …]
|
H A D | ResourceTable.h | 171 const ResourceType type; 179 explicit ResourceTableType(const ResourceType type) : type(type) {} in ResourceTableType() 199 ResourceTableType* FindType(ResourceType type) const; 200 ResourceTableType* FindOrCreateType(ResourceType type); 220 ResourceType type;
|
/aosp12/frameworks/opt/car/setupwizard/library/main/src/com/android/car/setupwizardlib/partner/ |
H A D | PartnerConfig.java | 23 PartnerConfigKey.KEY_IMMERSIVE_MODE, ResourceType.STRING), 26 PartnerConfigKey.KEY_TOOLBAR_BG_COLOR, ResourceType.COLOR), 29 PartnerConfigKey.KEY_TOOLBAR_BUTTON_ICON_BACK, ResourceType.DRAWABLE), 47 PartnerConfigKey.KEY_TOOLBAR_BUTTON_RADIUS, ResourceType.DIMENSION), 74 PartnerConfigKey.KEY_TOOLBAR_DIVIDER_BG, ResourceType.DRAWABLE), 80 PartnerConfigKey.KEY_LOADING_INDICATOR_COLOR, ResourceType.COLOR), 86 PartnerConfigKey.KEY_LAYOUT_BG_COLOR, ResourceType.COLOR); 88 public enum ResourceType { enum in PartnerConfig 97 private final ResourceType mResourceType; 99 public ResourceType getResourceType() { in getResourceType() [all …]
|
H A D | PartnerConfigHelper.java | 77 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.COLOR) { in getColor() 116 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.COLOR) { in getColorStateList() 163 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.DRAWABLE) { in getDrawable() 206 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.STRING) { in getString() 252 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.DIMENSION) { in getDimension() 288 if (partnerConfig.getResourceType() != PartnerConfig.ResourceType.BOOLEAN) { in getBoolean()
|
/aosp12/frameworks/layoutlib/bridge/tests/src/android/content/res/ |
H A D | Resources_DelegateTest.java | 19 import com.android.resources.ResourceType; 34 @NonNull ResourceType type, @Nullable ResourceUrl url) { in assertResourceUrl() 51 assertResourceUrl("package", "name", ResourceType.ID, in resourceUrlFromName() 53 assertResourceUrl("package", "name", ResourceType.ID, in resourceUrlFromName() 55 assertResourceUrl("package", "test", ResourceType.STRING, in resourceUrlFromName() 57 assertResourceUrl(null, "test", ResourceType.STRING, in resourceUrlFromName() 62 assertResourceUrl("p1", "r1", ResourceType.STRING, in resourceUrlFromName() 64 assertResourceUrl("p2", "r1", ResourceType.STRING, in resourceUrlFromName() 66 assertResourceUrl("p1", "r1", ResourceType.ID, in resourceUrlFromName()
|
/aosp12/frameworks/layoutlib/bridge/tests/src/com/android/ide/common/resources/deprecated/ |
H A D | ResourceRepository.java | 25 import com.android.resources.ResourceType; 47 protected Map<ResourceType, Map<String, ResourceItem>> mResourceMap = 48 new EnumMap<>(ResourceType.class); 77 mResourceMap = new EnumMap<>(ResourceType.class); in clear() 280 public Map<ResourceType, ResourceValueMap> getConfiguredResources( in getConfiguredResources() 299 Map<ResourceType, ResourceValueMap> map = in doGetConfiguredResources() 300 new EnumMap<>(ResourceType.class); in doGetConfiguredResources() 302 for (ResourceType key : ResourceType.values()) { in doGetConfiguredResources() 318 protected void removeFile(@NotNull Collection<ResourceType> types, in removeFile() 322 for (ResourceType type : types) { in removeFile() [all …]
|
H A D | MultiResourceFile.java | 25 import com.android.resources.ResourceType; 50 private final Map<ResourceType, ResourceValueMap> mResourceItems = 51 new EnumMap<>(ResourceType.class); 53 private Collection<ResourceType> mResourceTypeList = null; 84 Map<ResourceType, ResourceValueMap> oldResourceItems in update() 99 for (ResourceType type : mResourceTypeList) { in update() 120 for (ResourceType type : mResourceTypeList) { in updateResourceItems() 157 ResourceType resType = value.getResourceType(); in addResourceValue() 180 public ResourceValue getValue(ResourceType type, String name) { in getValue()
|
H A D | FrameworkResources.java | 23 import com.android.resources.ResourceType; 53 private final Map<ResourceType, List<ResourceItem>> mPublicResourceMap = 54 new EnumMap<>(ResourceType.class); 89 ResourceType lastType = null; in loadPublicResources() 116 ResourceType type; in loadPublicResources() 120 type = ResourceType.fromXmlValue(typeName); in loadPublicResources() 186 for (ResourceType type : ResourceType.values()) { in loadPublicResources()
|
H A D | IdGeneratingResourceFile.java | 30 import com.android.resources.ResourceType; 48 private final Collection<ResourceType> mResourceTypeList; 52 private final ResourceType mFileType; 56 … public IdGeneratingResourceFile(TestFileWrapper file, ResourceFolder folder, ResourceType type) { in IdGeneratingResourceFile() 62 mResourceTypeList = EnumSet.of(mFileType, ResourceType.ID); in IdGeneratingResourceFile() 105 public ResourceValue getValue(ResourceType type, String name) { in getValue() 107 if (type != mFileType && type != ResourceType.ID) { in getValue() 152 item = repository.getResourceItem(ResourceType.ID, idName); in updateResourceItems()
|
H A D | SingleResourceFile.java | 27 import com.android.resources.ResourceType; 42 private final ResourceType mType; 50 List<ResourceType> types = FolderTypeRelationship.getRelatedResourceTypes(folder.getType()); in SingleResourceFile() 110 public ResourceValue getValue(ResourceType type, String name) { in getValue()
|
H A D | ResourceFolder.java | 26 import com.android.resources.ResourceType; 97 List<ResourceType> types = FolderTypeRelationship.getRelatedResourceTypes(mType); in createResourceFile() 98 ResourceType primaryType = types.get(0); in createResourceFile()
|
/aosp12/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ |
H A D | DynamicIdMap.java | 19 import com.android.resources.ResourceType; 30 private final Map<Pair<ResourceType, String>, Integer> mDynamicIds = new HashMap<>(); 31 private final SparseArray<Pair<ResourceType, String>> mRevDynamicIds = new SparseArray<>(); 53 public Integer getId(ResourceType type, String name) { in getId() 65 public Integer getId(Pair<ResourceType, String> resource) { in getId() argument 76 public Pair<ResourceType, String> resolveId(int id) { in resolveId()
|
/aosp12/frameworks/base/tools/aapt2/link/ |
H A D | PrivateAttributeMover_test.cpp | 44 ResourceTableType* type = package->FindType(ResourceType::kAttr); in TEST() 50 type = package->FindType(ResourceType::kAttrPrivate); in TEST() 71 ResourceTableType* type = package->FindType(ResourceType::kAttr); in TEST() 75 type = package->FindType(ResourceType::kAttrPrivate); in TEST() 90 ASSERT_EQ(nullptr, package->FindType(ResourceType::kAttrPrivate)); in TEST() 95 ASSERT_EQ(nullptr, package->FindType(ResourceType::kAttrPrivate)); in TEST()
|
/aosp12/frameworks/base/tools/aapt2/cmd/ |
H A D | Optimize_test.cpp | 47 EXPECT_THAT(name_collapse_exemptions, Contains(ResourceName({}, ResourceType::kString, "foo"))); in TEST_F() 48 EXPECT_THAT(name_collapse_exemptions, Contains(ResourceName({}, ResourceType::kDimen, "bar"))); in TEST_F() 64 EXPECT_THAT(name_collapse_exemptions, Contains(ResourceName({}, ResourceType::kString, "foo"))); in TEST_F() 65 EXPECT_THAT(name_collapse_exemptions, Contains(ResourceName({}, ResourceType::kDimen, "bar"))); in TEST_F()
|
/aosp12/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/ |
H A D | Bridge.java | 32 import com.android.resources.ResourceType; 96 private final static Map<Integer, Pair<ResourceType, String>> sRMap = new HashMap<>(); 102 …private final static Map<ResourceType, Map<String, Integer>> sRevRMap = new EnumMap<>(ResourceType… 209 ResourceType resType = ResourceType.fromClassName(resTypeName); in init() 214 fullMap = sRevRMap.get(ResourceType.ATTR); in init() 275 sRevRMap.put(ResourceType.ATTR, revRAttrMap); in parseStyleable() 278 sRevRMap.put(ResourceType.STYLEABLE, revRStyleableMap); in parseStyleable() 327 sRMap.put(attrValue, Pair.of(ResourceType.ATTR, attrName)); in parseStyleable() 330 sRMap.put(index, Pair.of(ResourceType.STYLEABLE, name)); in parseStyleable() 534 Pair<ResourceType, String> pair = sRMap.get(value); in resolveResourceId() [all …]
|
/aosp12/packages/services/Car/cpp/watchdog/aidl/android/automotive/watchdog/ |
H A D | ICarWatchdog.aidl | 23 import android.automotive.watchdog.ResourceType; 142 void addResourceOveruseListener(in ResourceType[] resourceTypes, in addResourceOveruseListener() 163 List<ResourceOveruseStats> getResourceOveruseStats(in ResourceType[] resourceTypes); in getResourceOveruseStats()
|
/aosp12/frameworks/base/tools/aapt2/optimize/ |
H A D | ResourceFilter_test.cpp | 41 ResourceName({}, ResourceType::kString, "exclude_listed"), in TEST() 42 ResourceName({}, ResourceType::kString, "exclude_listed2"), in TEST() 65 ResourceName({}, ResourceType::kString, "exclude_listed"), in TEST()
|
/aosp12/frameworks/base/tools/aapt2/java/ |
H A D | JavaClassGenerator.cpp | 454 if (context_->GetMinSdkVersion() < SDK_O && name.type == ResourceType::kId && in ProcessResource() 553 type.type == ResourceType::kAttrPrivate ? ResourceType::kAttr : type.type, in ProcessType() 564 if (resource_name.type == ResourceType::kStyleable) { in ProcessType() 619 if (type->type == ResourceType::kAttrPrivate || type->type == ResourceType::kMacro) { in Generate() 639 if (type->type == ResourceType::kAttr) { in Generate() 641 if (const ResourceTableType* priv_type = package->FindType(ResourceType::kAttrPrivate)) { in Generate() 649 if (out != nullptr && type->type == ResourceType::kStyleable && is_public) { in Generate()
|
/aosp12/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
H A D | RenderDrawable.java | 26 import com.android.resources.ResourceType; 76 ResourceType resourceType = drawableResource.getResourceType(); in render() 77 if (resourceType != ResourceType.DRAWABLE && resourceType != ResourceType.MIPMAP) { in render()
|
/aosp12/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/ |
H A D | UnresolvedResourceValue.java | 20 import com.android.resources.ResourceType; 33 super(namespace, ResourceType.STRING, "layoutlib", value); in UnresolvedResourceValue()
|