Files
frameworks_base/core/java/com
felkachang a8fc015345 Enforce the overlayable mechanism for self-targeting
The overlayable mechanism has defined which roles can overlay the
specified resources and which resources are overlayable.

In order to reduce the argument between platform and applications,
self-targeting applications should enforce the overlayable mechanism.
It makes the overlay range be defined in the overlayable list. It
also defines the limitation of what kind of package can overlay the
resources of the self-targeting application.

To fill the policy flag, OverlayManagerImpl.java gets the following
information and passes them as bool type to JNI OverlayManagerImpl.
* SYSTEM_PARTITION
* VENDOR_PARTITION
* PRODUCT_PARTITION
* ODM_PARTITION
* OEM_PARTITION
* SIGNATURE

Not support
* ACTOR_SIGNATURE
* CONFIG_SIGNATURE

JNI OverlayManagerImpl fills the policy flags according to the
information from the ApplicationInfo. 'enforce_overlayable'is true to
enforce checking overlayable before generating an idmap.

Fixes: 238061808
Bug: 205919743

Test: atest \
              OverlayHostTests \
              OverlayDeviceTests \
              SelfTargetingOverlayDeviceTests \
              OverlayRemountedTest \
              FrameworksServicesTests:com.android.server.om \
              CtsContentTestCases:android.content.om.cts \
              idmap2_tests

Change-Id: I749d1a90a00f0a91e7796bc0f9f668f9ecfdb8b0
2022-11-28 17:06:06 +08:00
..