Support system feature lookups in host tooling
Introduce a host utility that does the following:
* Scrapes public Metalava API files for PackageManager.FEATURE_ defs
* Generates a simple utility class that maps from feature var values
to their respective feature names, e.g.,
* "android.software.print" -> "FEATURE_PRINTING"
This lookup will enable host parsing of <feature /> and
<unavailable-feature /> permission defs and integration in existing
system feature codegen, *without* needing a strict dependency on the
framework. This breaks any cyclic deps, allowing us to scrape product
permission .xml files and feed that back into build-time system feature
codegen for the framework.
Note: This change only adds the host utility, it doesn't make changes
to existing codegen. A follow-up change will do so, behind a build flag.
Bug: 203143243
Test: atest systemfeatures-gen-tests
Flag: EXEMPT simple tool addition
Change-Id: I210674c85efb068ac0e2d1898df590aab330db2b
Loading
Please register or sign in to comment