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

Skip to content
Commit 653a1c1a authored by Daniel Norman's avatar Daniel Norman
Browse files

Fix RRO loading from inside APEXes.

APEXes can already contain RRO APKs by using the 'rro' apex Soong
module field. However, these RROs were not being loaded properly by
Zygote or PackageManagerService.

For all RROs inside APEXes, the RRO uses the same overlay config that
is used for other RROs on the APEX's preinstalled partition.

For RROs targeting 'android', which are installed by Zygote
using AssetManager:
1. OverlayConfig looks for active APEXes in the apex-info-list file,
   which is already accessible to Zygote.
2. OverlayConfig passes the APEX module names to OverlayConfigParser,
   for each preinstalled-partition.
3. OverlayConfigParser uses OverlayScanner to scan the
   each /apex/<APEX>/overlay directory.

For other RROs:
1. PackageManagerService already parses and provides RROs inside APEXes
   to OverlayConfig.
2. RROs inside APEXes used to have no config rule applied because their
   path prefix (/apex/) did not match any partition rule. Now, their
   preinstalled path is used instead.

Bug: 199200417
Test: Define a static RRO targeting 'android' inside a /vendor APEX.
      Define a static RRO for settings provider inside a /vendor APEX.
      Observe APEXes are enabled by default.
Test: Make a change to an RRO inside a /vendor APEX.
      m <apex>; adb install <apex artifact>; adb reboot;
      Observe change has taken effect.
Change-Id: I2bce9bc704789329b8c6aac6d476f17ff6718e0f
Merged-In: I2bce9bc704789329b8c6aac6d476f17ff6718e0f
parent 5b4121cb
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