Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c744ae8a authored by Adam Lesinski's avatar Adam Lesinski
Browse files

AAPT2: Implement attribute compat versioning

This change defines some hardcoded rules to degrade
attributes in newer SDKs to specific older attributes.

An attribute with a degrade rule will generate a new XML for the API
in which the attribute resulting from the degradation was introduced.

Since API 22 (Lollipop MR1), attributes are correctly ignored and do
not need to be versioned. In XML files defined for APIs 22+, the
original and degraded attributes coexist in the same XML file.

One such example is paddingHorizontal, introduced in API 26.
paddingHorizontal degrades to paddingLeft and paddingRight, which
were both introduced in API 1.

Bug: 35763493
Test: make aapt2_tests
Change-Id: I4aa8755a9ee2c0cc5afdc55c3d30093fd3a47f3d
parent 0418b72f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment