summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.h
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-12-13 17:29:18 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-12-13 17:29:18 -0800
commit7b1f850c50427ff38c20c83721c2e7aa173e62c2 (patch)
tree92f02a12a16318cde6d9a3b3761ca2c0040ce557 /tools/aapt2/ResourceTable.h
parent3f4c4881a31f0a24979df539b9d1e9c557a3619d (diff)
parent10e260fc86f8b879e9a88610994344f30bea7520 (diff)
Merge "Merge 24Q4 into AOSP main" into main
Diffstat (limited to 'tools/aapt2/ResourceTable.h')
-rw-r--r--tools/aapt2/ResourceTable.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h
index 61e399c7ab68..cba6b70cfbd6 100644
--- a/tools/aapt2/ResourceTable.h
+++ b/tools/aapt2/ResourceTable.h
@@ -269,6 +269,7 @@ struct NewResource {
std::optional<AllowNew> allow_new;
std::optional<StagedId> staged_id;
bool allow_mangled = false;
+ FlagStatus flag_status = FlagStatus::NoFlag;
};
struct NewResourceBuilder {
@@ -282,6 +283,7 @@ struct NewResourceBuilder {
NewResourceBuilder& SetAllowNew(AllowNew allow_new);
NewResourceBuilder& SetStagedId(StagedId id);
NewResourceBuilder& SetAllowMangled(bool allow_mangled);
+ NewResourceBuilder& SetFlagStatus(FlagStatus flag_status);
NewResource Build();
private:
@@ -330,7 +332,8 @@ class ResourceTable {
std::unique_ptr<ResourceTable> Clone() const;
- // When a collision of resources occurs, this method decides which value to keep.
+ // When a collision of resources occurs, these methods decide which value to keep.
+ static CollisionResult ResolveFlagCollision(FlagStatus existing, FlagStatus incoming);
static CollisionResult ResolveValueCollision(Value* existing, Value* incoming);
// The string pool used by this resource table. Values that reference strings must use