Commit Graph

6 Commits

Author SHA1 Message Date
Mårten Kongstad
a3bd3491cc OMS: ensure framework overlays affect newly installed apps
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
2018-04-30 17:28:35 +01:00
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
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
2018-02-28 15:13:23 +00:00
Adam Lesinski
7b03181ab1 OMS: Make updates to category not reset the overlay's state
- 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
2018-02-22 23:16:08 +00:00
Mårten Kongstad
db0e34ed83 OMS: handle overlay package upgrades, uninstalls
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
2018-02-05 19:26:24 -08:00
Adam Lesinski
c1ef447548 OMS: Migrate device tests to atest
Test: atest OverlayDeviceTests
Change-Id: Ie1040ee45e4ffef060a4e21257b0a61fd4f4c660
2018-01-24 11:30:56 -08:00
Adam Lesinski
b67fc5fbfc OMS: Enable uninstallation of overlays
Test: atest OverlayHostTests
Change-Id: I8d43f5bcad6adac9ea5dab2837f85234e6482b7b
2018-01-24 11:30:56 -08:00