Allow packages to be enabled depending on sku value

This change allows packages to be enabled on boot depending
on the sku of the device.  This enables the same product image
to be used on different skus.

Example:
Packages are listed here in a disabled state:
/product/etc/sysconfig/disabled-in-sku.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
    <disabled-in-sku package="com.sony.product1.app"/>
    <disabled-in-sku package="com.sony.product2.app"/>
</config>

Then enabled depending on the sku values read from
"ro.boot.hardware.sku"

e.g. an sku of '00001':
/product/etc/sysconfig/sku_00001/enabled-in-sku-override.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
    <enabled-in-sku-override package="com.sony.product2.app"/>
</config>

Status of apps after customisation:
product2 app - enabled
product1 app - disabled and not visible to PackageManager

Bug: 376275452
Test: atest FrameworksServicesTests:com.android.server.systemconfig.SystemConfigTest
Change-Id: Id1418beda7e264cab90086836c32785341fb5aac
2 files changed