Make sure to tell the package manager about an application's overlay
paths if there is at least one enabled overlay affecting the
application. This includes looking at framework overlays (which affect
all applications).
Also, add a test to verify the following flow:
- Enable an overlay targeting "android"
- Install an app
- Launch the newly installed app
- Assert that the newly installed app uses the framework overlay
Also, update InstallOverlayTests#installPlatformSignedFrameworkOverlay\
AndUpdate to assert the correct resource (framework instead of app
resource).
Bug: 78808367
Test: atest 'OverlayHostTests:InstallOverlayTests#enabledFrameworkOverlayMustAffectNewlyInstalledPackage'
Change-Id: Ic3450af6c2e827efce056874606caf1d853359eb
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
- Also change how default overlays are applied. Apply them if no other
overlay is enabled for the same category as the default overlay.
Bug: 73740686
Test: manual
Test: adb shell rm /data/system/overlays.xml && adb reboot #verify that colors are blue
Test: adb pull /data/system/overlays.xml \
&& <edit overlay to remove categories> \
&& adb push overlays.xml /data/system/overlays.xml \
&& adb reboot # verify that colors are blue
Change-Id: If42afd287703e2e159d0087e477c19409f724124
Teach the overlay manager about upgrades and uninstalls of overlay
packages. Add two transient overlay states STATE_TARGET_UPGRADING and
STATE_OVERLAY_UPGRADING.
Test: atest OverlayHostTests
Change-Id: I2d04204150f9e749f070b4e4363eacbd59355014