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

Skip to content
Commit 60e7729b authored by Linus Tufvesson's avatar Linus Tufvesson
Browse files

Make finalize_res flag aware

This continues down the rabbit hole of using regex to parse the staging
file. Modified finalize_item to be called directly with matches and
return a tuple of strings that go in various places. It is a bit cryptic
but so was the inline regex modification before too. The proper solution
is to parse the xml and handle it.

As it is now it is very brittle
1. "removed_" being a magic constant that the rest of the resource
   frameworks knows how to handle
2. It still doesn't handle proper xml and has strong assumptions about
   how the items are listed
3. There is lots of room for improving the python code :)

It is however the path of least resistant right now to get finalization
moving forward.

Flag: EXEMPTE modifying a script used for finalization
Bug: 390120561
Test: frameworks/base/tools/aapt2/tools/finalize_res.py frameworks/base/core/res/res/values/public-staging.xml frameworks/base/core/res/res/values/public-final.xml
Change-Id: I8e3bda38a5229754fa679a79061527bc246d9e08
parent 5ae6e84c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment