Home
last modified time | relevance | path

Searched refs:ResourceType (Results 1 – 25 of 64) sorted by relevance

123

/frameworks/base/tools/aapt2/
DResource.cpp47 StringPiece to_string(ResourceType type) { in to_string()
49 case ResourceType::kAnim: in to_string()
51 case ResourceType::kAnimator: in to_string()
53 case ResourceType::kArray: in to_string()
55 case ResourceType::kAttr: in to_string()
57 case ResourceType::kAttrPrivate: in to_string()
59 case ResourceType::kBool: in to_string()
61 case ResourceType::kColor: in to_string()
63 case ResourceType::kConfigVarying: in to_string()
65 case ResourceType::kDimen: in to_string()
[all …]
DResource_test.cpp24 const ResourceType* type = ParseResourceType("anim"); in TEST()
26 EXPECT_EQ(*type, ResourceType::kAnim); in TEST()
30 EXPECT_EQ(*type, ResourceType::kAnimator); in TEST()
34 EXPECT_EQ(*type, ResourceType::kArray); in TEST()
38 EXPECT_EQ(*type, ResourceType::kAttr); in TEST()
42 EXPECT_EQ(*type, ResourceType::kAttrPrivate); in TEST()
46 EXPECT_EQ(*type, ResourceType::kBool); in TEST()
50 EXPECT_EQ(*type, ResourceType::kColor); in TEST()
54 EXPECT_EQ(*type, ResourceType::kConfigVarying); in TEST()
58 EXPECT_EQ(*type, ResourceType::kDimen); in TEST()
[all …]
DResource.h39 enum class ResourceType { enum
77 android::StringPiece to_string(ResourceType type);
82 const ResourceType* ParseResourceType(const android::StringPiece& str);
90 ResourceType type = ResourceType::kRaw;
94 ResourceName(const android::StringPiece& p, ResourceType t, const android::StringPiece& e);
110 ResourceType type = ResourceType::kRaw;
117 ResourceNameRef(const android::StringPiece& p, ResourceType t, const android::StringPiece& e);
286 inline ::std::ostream& operator<<(::std::ostream& out, const ResourceType& val) {
294 inline ResourceName::ResourceName(const android::StringPiece& p, ResourceType t, in ResourceName()
337 inline ResourceNameRef::ResourceNameRef(const android::StringPiece& p, ResourceType t, in ResourceNameRef()
DResourceUtils_test.cpp48 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 …]
DResourceParser.cpp489 ResourceType type; in ParseResource()
497 {"bool", {ResourceType::kBool, android::ResTable_map::TYPE_BOOLEAN}}, in ParseResource()
498 {"color", {ResourceType::kColor, android::ResTable_map::TYPE_COLOR}}, in ParseResource()
499 {"configVarying", {ResourceType::kConfigVarying, android::ResTable_map::TYPE_ANY}}, in ParseResource()
501 {ResourceType::kDimen, in ParseResource()
504 {"drawable", {ResourceType::kDrawable, android::ResTable_map::TYPE_COLOR}}, in ParseResource()
506 {ResourceType::kFraction, in ParseResource()
509 {"integer", {ResourceType::kInteger, android::ResTable_map::TYPE_INTEGER}}, in ParseResource()
510 {"string", {ResourceType::kString, android::ResTable_map::TYPE_STRING}}, in ParseResource()
518 std::bind(&ResourceParser::ParseStyle, std::placeholders::_1, ResourceType::kConfigVarying, in ParseResource()
[all …]
DResourceUtils.cpp54 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()
328 ref.name = ResourceName(package, ResourceType::kAttr, name.empty() ? trimmed_str : name); in ParseXmlAttributeName()
736 std::unique_ptr<Item> ParseBinaryResValue(const ResourceType& type, const ConfigDescription& config, in ParseBinaryResValue()
[all …]
/frameworks/opt/car/setupwizard/library/main/src/com/android/car/setupwizardlib/partner/
DPartnerConfig.java23 PartnerConfigKey.KEY_IMMERSIVE_MODE, ResourceType.STRING),
26 PartnerConfigKey.KEY_TOOLBAR_BG_COLOR, ResourceType.COLOR),
29 PartnerConfigKey.KEY_TOOLBAR_BUTTON_ICON_BACK, ResourceType.DRAWABLE),
32 PartnerConfigKey.KEY_TOOLBAR_BUTTON_FONT_FAMILY, ResourceType.STRING),
35 PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_HORIZONTAL, ResourceType.DIMENSION),
38 PartnerConfigKey.KEY_TOOLBAR_BUTTON_PADDING_VERTICAL, ResourceType.DIMENSION),
41 PartnerConfigKey.KEY_TOOLBAR_BUTTON_RADIUS, ResourceType.DIMENSION),
44 PartnerConfigKey.KEY_TOOLBAR_BUTTON_SPACING, ResourceType.DIMENSION),
47 PartnerConfigKey.KEY_TOOLBAR_BUTTON_TEXT_SIZE, ResourceType.DIMENSION),
50 PartnerConfigKey.KEY_TOOLBAR_PRIMARY_BUTTON_BG, ResourceType.DRAWABLE),
[all …]
DPartnerConfigHelper.java77 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()
/frameworks/layoutlib/bridge/tests/src/android/content/res/
DResources_DelegateTest.java19 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()
/frameworks/layoutlib/bridge/tests/src/com/android/ide/common/resources/deprecated/
DResourceRepository.java26 import com.android.resources.ResourceType;
48 protected Map<ResourceType, Map<String, ResourceItem>> mResourceMap =
49 new EnumMap<>(ResourceType.class);
78 mResourceMap = new EnumMap<>(ResourceType.class); in clear()
175 public ResourceItem getResourceItem(@NotNull ResourceType type, @NotNull String name) { in getResourceItem()
281 public Map<ResourceType, ResourceValueMap> getConfiguredResources( in getConfiguredResources()
296 private Map<ResourceType, ResourceValueMap> doGetConfiguredResources( in doGetConfiguredResources()
300 Map<ResourceType, ResourceValueMap> map = in doGetConfiguredResources()
301 new EnumMap<>(ResourceType.class); in doGetConfiguredResources()
303 for (ResourceType key : ResourceType.values()) { in doGetConfiguredResources()
[all …]
DMultiResourceFile.java25 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()
DFrameworkResources.java23 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()
DIdGeneratingResourceFile.java30 import com.android.resources.ResourceType;
48 private final Collection<ResourceType> mResourceTypeList;
52 private final ResourceType mFileType;
56 public IdGeneratingResourceFile(IAbstractFile 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()
DSingleResourceFile.java27 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()
DResourceFolder.java26 import com.android.resources.ResourceType;
97 List<ResourceType> types = FolderTypeRelationship.getRelatedResourceTypes(mType); in createResourceFile()
98 ResourceType primaryType = types.get(0); in createResourceFile()
DResourceFile.java23 import com.android.resources.ResourceType;
72 public abstract ResourceValue getValue(ResourceType type, String name); in getValue()
DResourceItem.java21 import com.android.resources.ResourceType;
71 public ResourceValue getResourceValue(ResourceType type, FolderConfiguration referenceConfig) { in getResourceValue()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/
DDynamicIdMap.java19 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()
/frameworks/base/tools/aapt2/link/
DPrivateAttributeMover_test.cpp44 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()
DPrivateAttributeMover.cpp60 ResourceTableType* type = package->FindType(ResourceType::kAttr); in Consume()
83 ResourceTableType* priv_attr_type = package->FindOrCreateType(ResourceType::kAttrPrivate); in Consume()
/frameworks/base/tools/aapt2/cmd/
DOptimize_test.cpp47 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()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/
DBridge.java32 import com.android.resources.ResourceType;
98 private final static Map<Integer, Pair<ResourceType, String>> sRMap = new HashMap<>();
104 …private final static Map<ResourceType, Map<String, Integer>> sRevRMap = new EnumMap<>(ResourceType
211 ResourceType resType = ResourceType.getEnum(resTypeName); in init()
216 fullMap = sRevRMap.get(ResourceType.ATTR); in init()
278 sRevRMap.put(ResourceType.ATTR, revRAttrMap); in parseStyleable()
281 sRevRMap.put(ResourceType.STYLEABLE, revRStyleableMap); in parseStyleable()
331 sRMap.put(attrValue, Pair.of(ResourceType.ATTR, attrName)); in parseStyleable()
335 sRMap.put(index, Pair.of(ResourceType.STYLEABLE, name)); in parseStyleable()
539 Pair<ResourceType, String> pair = sRMap.get(value); in resolveResourceId()
[all …]
/frameworks/base/tools/aapt2/optimize/
DResourceFilter_test.cpp41 ResourceName({}, ResourceType::kString, "blacklisted"), in TEST()
42 ResourceName({}, ResourceType::kString, "blacklisted2"), in TEST()
65 ResourceName({}, ResourceType::kString, "blacklisted"), in TEST()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DUnresolvedResourceValue.java20 import com.android.resources.ResourceType;
33 super(namespace, ResourceType.STRING, "layoutlib", value); in UnresolvedResourceValue()
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DRenderDrawable.java26 import com.android.resources.ResourceType;
76 ResourceType resourceType = drawableResource.getResourceType(); in render()
77 if (resourceType != ResourceType.DRAWABLE && resourceType != ResourceType.MIPMAP) { in render()

123