Home
last modified time | relevance | path

Searched refs:Reference (Results 1 – 25 of 58) sorted by relevance

123

/frameworks/base/tools/aapt2/
DValueVisitor_test.cpp30 Reference* visited = nullptr;
32 void Visit(Reference* ref) override { visited = ref; } in Visit()
38 std::list<Reference*> visited_refs;
41 void Visit(Reference* ref) override { visited_refs.push_back(ref); } in Visit()
50 Reference ref(ResourceName{"android", ResourceType::kAttr, "foo"}); in TEST()
75 std::unique_ptr<Reference> ref = test::BuildReference("android:color/white"); in TEST()
76 EXPECT_NE(ValueCast<Reference>(ref.get()), nullptr); in TEST()
84 EXPECT_EQ(ValueCast<Reference>(style.get()), nullptr); in TEST()
DResourceValues.h150 struct Reference : public BaseItem<Reference> { struct
158 Reference::Type reference_type; argument
162 Reference(); argument
163 explicit Reference(const ResourceNameRef& n, Type type = Type::kResource);
164 explicit Reference(const ResourceId& i, Type type = Type::kResource);
165 Reference(const ResourceNameRef& n, const ResourceId& i);
169 Reference* Clone(StringPool* new_pool) const override;
177 bool operator<(const Reference&, const Reference&);
178 bool operator==(const Reference&, const Reference&);
293 Reference symbol;
[all …]
DResourceValues_test.cpp219 ASSERT_TRUE(Reference().Flatten(&value)); in TEST()
235 attr2.symbols.push_back(Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), in TEST()
245 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); in TEST()
247 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x02u}); in TEST()
249 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/baz")), 0x04u}); in TEST()
251 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bat")), 0x80u}); in TEST()
264 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); in TEST()
299 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); in TEST()
301 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/bar")), 0x07u}); in TEST()
305 Attribute::Symbol{Reference(test::ParseNameOrDie("android:id/foo")), 0x01u}); in TEST()
[all …]
DResourceValues.cpp97 Reference::Reference() : reference_type(Type::kResource) {} in Reference() function in aapt::Reference
99 Reference::Reference(const ResourceNameRef& n, Type t) in Reference() function in aapt::Reference
102 Reference::Reference(const ResourceId& i, Type type) in Reference() function in aapt::Reference
105 Reference::Reference(const ResourceNameRef& n, const ResourceId& i) in Reference() function in aapt::Reference
108 bool Reference::Equals(const Value* value) const { in Equals()
109 const Reference* other = ValueCast<Reference>(value); in Equals()
118 bool Reference::Flatten(android::Res_value* out_value) const { in Flatten()
122 if (reference_type == Reference::Type::kResource) { in Flatten()
139 Reference* Reference::Clone(StringPool* /*new_pool*/) const { in Clone()
140 return new Reference(*this); in Clone()
[all …]
DResourceUtils.cpp254 Maybe<Reference> ParseStyleParentReference(const StringPiece& str, in ParseStyleParentReference()
299 Reference result(ref); in ParseStyleParentReference()
304 Maybe<Reference> ParseXmlAttributeName(const StringPiece& str) { in ParseXmlAttributeName()
310 Reference ref; in ParseXmlAttributeName()
329 return Maybe<Reference>(std::move(ref)); in ParseXmlAttributeName()
332 std::unique_ptr<Reference> TryParseReference(const StringPiece& str, in TryParseReference()
337 std::unique_ptr<Reference> value = util::make_unique<Reference>(ref); in TryParseReference()
346 return util::make_unique<Reference>(ref, Reference::Type::kAttribute); in TryParseReference()
361 std::unique_ptr<Reference> MakeNull() { in MakeNull()
364 return util::make_unique<Reference>(); in MakeNull()
[all …]
DResourceUtils.h119 Maybe<Reference> ParseStyleParentReference(const android::StringPiece& str, std::string* out_error);
128 Maybe<Reference> ParseXmlAttributeName(const android::StringPiece& str);
137 std::unique_ptr<Reference> TryParseReference(const android::StringPiece& str,
149 std::unique_ptr<Reference> MakeNull();
DValueVisitor.h33 virtual void Visit(Reference* value) { VisitItem(value); } in Visit()
58 virtual void Visit(const Reference* value) { in Visit()
142 for (Reference& reference : styleable->entries) { in VisitSubValues()
DDebug.cpp64 const Reference& parent_ref = style->parent.value(); in Visit()
107 if (const Reference* ref = ValueCast<Reference>(item)) { in VisitItem()
239 if (const Reference* ref = ValueCast<Reference>(&item)) { in PrintItem()
DResourceUtils_test.cpp144 Maybe<Reference> ref = ResourceUtils::ParseStyleParentReference("@android:style/foo", &err_str); in TEST()
195 ASSERT_THAT(ResourceUtils::MakeNull(), Pointee(ValueEq(Reference()))); in TEST()
196 ASSERT_THAT(ResourceUtils::TryParseNullOrEmpty("@null"), Pointee(ValueEq(Reference()))); in TEST()
/frameworks/base/tools/aapt2/link/
DReferenceLinker.h41 static const SymbolTable::Symbol* ResolveSymbol(const Reference& reference,
47 static const SymbolTable::Symbol* ResolveSymbolCheckVisibility(const Reference& reference,
54 static const SymbolTable::Symbol* ResolveAttributeCheckVisibility(const Reference& reference,
61 static Maybe<xml::AaptAttribute> CompileXmlAttribute(const Reference& reference,
68 static void WriteResourceName(const Reference& orig, const CallSite& callsite,
72 static void WriteAttributeName(const Reference& ref, const CallSite& callsite,
79 static bool LinkReference(const CallSite& callsite, Reference* reference, IAaptContext* context,
DReferenceLinker.cpp59 void Visit(Reference* ref) override { in Visit()
79 Reference transformed_reference = entry.key; in Visit()
178 bool IsSymbolVisible(const SymbolTable::Symbol& symbol, const Reference& ref, in IsSymbolVisible()
204 const SymbolTable::Symbol* ReferenceLinker::ResolveSymbol(const Reference& reference, in ResolveSymbol()
221 const SymbolTable::Symbol* ReferenceLinker::ResolveSymbolCheckVisibility(const Reference& reference, in ResolveSymbolCheckVisibility()
239 const Reference& reference, const CallSite& callsite, SymbolTable* symbols, in ResolveAttributeCheckVisibility()
254 Maybe<xml::AaptAttribute> ReferenceLinker::CompileXmlAttribute(const Reference& reference, in CompileXmlAttribute()
271 void ReferenceLinker::WriteResourceName(const Reference& ref, const CallSite& callsite, in WriteResourceName()
281 Reference fully_qualified = ref; in WriteResourceName()
294 void ReferenceLinker::WriteAttributeName(const Reference& ref, const CallSite& callsite, in WriteAttributeName()
[all …]
DReferenceLinker_test.cpp59 Reference* ref = test::GetValue<Reference>(table.get(), "com.app.test:string/foo"); in TEST()
64 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/bar"); in TEST()
69 ref = test::GetValue<Reference>(table.get(), "com.app.test:string/baz"); in TEST()
DXmlReferenceLinker.cpp47 void Visit(Reference* ref) override { in Visit()
96 Reference attr_ref( in Visit()
/frameworks/base/tools/aapt2/test/
DBuilders.cpp63 return AddValue(name, id, util::make_unique<Reference>(ParseNameOrDie(ref))); in AddReference()
154 std::unique_ptr<Reference> BuildReference(const StringPiece& ref, const Maybe<ResourceId>& id) { in BuildReference()
155 std::unique_ptr<Reference> reference = util::make_unique<Reference>(ParseNameOrDie(ref)); in BuildReference()
184 Attribute::Symbol{Reference(ResourceName({}, ResourceType::kId, name)), value}); in AddItem()
193 style_->parent = Reference(ParseNameOrDie(str)); in SetParent()
198 style_->entries.push_back(Style::Entry{Reference(ParseNameOrDie(str)), std::move(value)}); in AddItem()
214 styleable_->entries.push_back(Reference(ParseNameOrDie(str))); in AddItem()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/leak/
DReferenceTestUtils.java21 import java.lang.ref.Reference;
33 Reference<?> ref = new WeakReference<>(o, q); in createCollectionWaiter()
/frameworks/base/core/java/android/view/accessibility/
DWeakSparseArray.java21 import java.lang.ref.Reference;
48 for (Reference ref = mRefQueue.poll(); ref != null; ref = mRefQueue.poll()) { in removeUnreachableValues()
/frameworks/base/tools/aapt2/format/binary/
DTableFlattener.cpp92 Reference key = Reference(ResourceId(ResTable_map::ATTR_TYPE)); in Visit()
98 Reference key = Reference(ResourceId(ResTable_map::ATTR_MIN)); in Visit()
104 Reference key = Reference(ResourceId(ResTable_map::ATTR_MAX)); in Visit()
117 const Reference& parent_ref = style->parent.value(); in Visit()
140 Reference key(android::ResTable_map::ATTR_MIN + i); in Visit()
183 Reference key(q); in Visit()
199 void FlattenKey(Reference* key, ResTable_map* out_entry) { in FlattenKey()
208 void FlattenEntry(Reference* key, Item* value) { in FlattenEntry()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/
DWeakIdentityHashMap.java19 import java.lang.ref.Reference;
36 Reference<?> ref; in cleanUp()
DTrackedGarbage.java23 import java.lang.ref.Reference;
55 Reference<?> ref; in cleanUp()
/frameworks/base/tools/aapt2/process/
DSymbolTable.h101 const Symbol* FindByReference(const Reference& ref);
161 const Reference& ref) { in FindByReference()
203 const Reference& ref) override;
/frameworks/base/tools/aapt2/format/proto/
DProtoDeserialize.cpp46 void Visit(Reference* reference) override { in Visit()
621 static Reference::Type DeserializeReferenceTypeFromPb(const pb::Reference_Type& pb_type) { in DeserializeReferenceTypeFromPb()
624 return Reference::Type::kResource; in DeserializeReferenceTypeFromPb()
626 return Reference::Type::kAttribute; in DeserializeReferenceTypeFromPb()
630 return Reference::Type::kResource; in DeserializeReferenceTypeFromPb()
633 static bool DeserializeReferenceFromPb(const pb::Reference& pb_ref, Reference* out_ref, in DeserializeReferenceFromPb()
720 style->parent = Reference(); in DeserializeValueFromPb()
755 Reference attr_ref; in DeserializeValueFromPb()
817 const pb::Reference& pb_ref = pb_item.ref(); in DeserializeItemFromPb()
818 std::unique_ptr<Reference> ref = util::make_unique<Reference>(); in DeserializeItemFromPb()
DProtoSerialize.cpp387 static pb::Reference_Type SerializeReferenceTypeToPb(Reference::Type type) { in SerializeReferenceTypeToPb()
389 case Reference::Type::kResource: in SerializeReferenceTypeToPb()
391 case Reference::Type::kAttribute: in SerializeReferenceTypeToPb()
399 static void SerializeReferenceToPb(const Reference& ref, pb::Reference* pb_ref) { in SerializeReferenceToPb()
459 void Visit(const Reference* ref) override { in Visit()
561 const Reference& parent = style->parent.value(); in Visit()
578 for (const Reference& entry : styleable->entries) { in Visit()
/frameworks/base/core/java/android/hardware/lights/
DLightsManager.java39 import java.lang.ref.Reference;
190 Reference.reachabilityFence(this); in close()
/frameworks/layoutlib/bridge/src/android/util/imagepool/
DImagePoolImpl.java27 import java.lang.ref.Reference;
46 private final Set<Reference<?>> mReferences = new HashSet<>();
/frameworks/base/tools/aapt2/xml/
DXmlUtil.h79 void ResolvePackage(const IPackageDeclStack* decl_stack, Reference* in_ref);

123