Reorder styleable attributes in shared libraries
This is a similar fix to https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/10109386 but deals with styleable attributes instead of style items. Bug: 147674078 Test: JavaClassGeneratorTest.SortsDynamicAttributesAfterFrameworkAttributes Change-Id: Ida6572cf07e2b5987e9d8941cf169a37c43578c4
This commit is contained in:
@@ -218,13 +218,10 @@ struct StyleableAttr {
|
||||
static bool operator<(const StyleableAttr& lhs, const StyleableAttr& rhs) {
|
||||
const ResourceId lhs_id = lhs.attr_ref->id.value_or_default(ResourceId(0));
|
||||
const ResourceId rhs_id = rhs.attr_ref->id.value_or_default(ResourceId(0));
|
||||
if (lhs_id < rhs_id) {
|
||||
return true;
|
||||
} else if (lhs_id > rhs_id) {
|
||||
return false;
|
||||
} else {
|
||||
if (lhs_id == rhs_id) {
|
||||
return lhs.attr_ref->name.value() < rhs.attr_ref->name.value();
|
||||
}
|
||||
return cmp_ids_dynamic_after_framework(lhs_id, rhs_id);
|
||||
}
|
||||
|
||||
void JavaClassGenerator::ProcessStyleable(const ResourceNameRef& name, const ResourceId& id,
|
||||
|
||||
Reference in New Issue
Block a user