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

Commit 807df5e7 authored by Jared Duke's avatar Jared Duke
Browse files

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
parent e835c3b4
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