summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.h
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-11-13 13:57:20 -0800
committer Xin Li <delphij@google.com> 2024-11-13 14:01:00 -0800
commitde53d9657cd5e352984697fc130159c474e819a9 (patch)
tree79b7d2c74d20c83b9adaddfde7862240e4d3725e /tools/aapt2/ResourceTable.h
parent70a1e5dcf316f8ddf6d1b3b00341c7a35a8dcc58 (diff)
parent8eecb1a1afe454e3233f27b06f9e5d41b5bec011 (diff)
Merge 24Q4 (ab/12406339) into aosp-main-future
Bug: 370570306 Merged-In: Ic2ffd5a1f4420121b958cadb726c3e805cda1434 Change-Id: If0f7008f8e699bf1fca8d20ee5e05877a61ea002
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