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
The legacy-test library has been deprecated in favour of the
android.test.base library which is part of the SDK.
The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.
* core/tests/overlaytests/OverlayAppFiltered/Android.mk
Removed legacy-test from LOCAL_JAVA_LIBRARIES because the source
for module 'com.android.overlaytest.filtered_app_overlay' does not
depend on classes from legacy-test
* core/tests/overlaytests/OverlayAppFirst/Android.mk
Removed legacy-test from LOCAL_JAVA_LIBRARIES because the source
for module 'com.android.overlaytest.first_app_overlay' does not
depend on classes from legacy-test
* core/tests/overlaytests/OverlayAppSecond/Android.mk
Removed legacy-test from LOCAL_JAVA_LIBRARIES because the source
for module 'com.android.overlaytest.second_app_overlay' does not
depend on classes from legacy-test
* core/tests/overlaytests/OverlayTest/Android.mk
Replaced 'legacy-test' with 'android.test.base' in
LOCAL_JAVA_LIBRARIES because the source for module 'OverlayTest'
depends on classes from android.test.base
* core/tests/overlaytests/OverlayTestOverlay/Android.mk
Removed legacy-test from LOCAL_JAVA_LIBRARIES because the source
for module 'com.android.overlaytest.overlay' does not depend on
classes from legacy-test
* test-mock/Android.mk
Removed legacy-test from LOCAL_JAVA_LIBRARIES because the source
for module 'repackaged.android.test.mock' does not depend on
classes from legacy-test
Bug: 30188076
Test: make checkbuild
Change-Id: I729412304884cf5da88b05dbe8fbe645ad7b5b15
The purpose here is to provide support for selectively
enabling Runtime Resource Overlays (RROs) (specifically
those pertaining to a specific SKU, within a OEM's "single
build" covering multiple SKUs) at boot based on the value
of a pre-defined system property.
This mechanism is designed to be compatible with other,
recent changes to Runtime Resource Overlays - specifically:
- has no effect on 'isStatic'. Resource overlays must be
attributed as static in order to qualify for loading into
the system_server. The 'requiredSystemPropertyName/
requiredSystemPropertyValue' mechanism operates
independent of this and can be used on both static and
non static overlays. The effect of specifying a conditional
property on any overlay is that it will ONLY be enabled
in the event that the system reflects both the property
and the specified value (Note that in the ABSENCE of a
conditional property, overlays are assumed to be enabled).
- has no effect on OverlayManagerService (OMS) API. The
OMS provides the system with an interface through which
overlays can be enabled/disabled and even rearranged at
runtime. This provides the basis of support for various
user-level features (e.g. dynamic theme selection).
The 'requiredSystemPropertyName/requiredSystemPropertyValue'
mechanism operates independent of this -
with enablement being completely coupled to the available
system properties on the device and NOT subject to change
at runtime.
Note: as part of this change, original overlay tests have been
updated (fixed) and expanded to include tests to cover the
conditional property implementation.
Issue: http://b/35100249
Test: frameworks/base/core/tests/overlaytests/testrunner.py
Change-Id: I1990ce21a27a385db1e2f53294b69dd03988351e
The overlaytests testrunner.py script wants to invoke adb shell md5sum
to compute the md5 of a file, but wrongly invokes it as md5. Maybe
it used to have that name, but it doesn't exist under that name in master.
Fix it.
Change-Id: I3ec4be162fab0cd3915f010f9b1add37b5397973
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
The introduction of support for split apks has resulted in the move of
applications from /partition/app/pkg.apk to /partition/app/pkg/pkg.apk.
Update the RRO testrunner to use the new paths.
Bug: 17765434
Change-Id: I6eebfb6f879404077b9447c750ddc395ecd9a547
Add automated test cases for runtime resource overlay, iteration 2.
The test cases are a mixture of 'adb shell' commands and regular
instrumentation tests. The device is rebooted between tests to setup
different overlay scenarios for framework-res.apk.
To verify Runtime resoure overlay, iteration 2, run
$ frameworks/base/core/tests/overlaytests/testrunner.py
For a list of supported options, run
$ frameworks/base/core/tests/overlaytests/testrunner.py --help
Change-Id: I692aa1a7ad073efd116b24f9ec7f197dfd65dfef
Added a config option to allow the lid switch to turn off the
screen. This is a closer match to what a lid switch should be
doing.
Removed an old feature to bypass keyguard when keyboard is visible
because the way it was plumbed in made bad assumptions about
the meaning of the lid switch. Also, the last product we shipped
that had a physical keyboard turned this config option off.
So away it goes. We can bring it back someday if we really want it.
It's questionable how useful the feature is anyhow, since it only
works when the keyguard is unsecure and when the lid switch is
unlikely to be jostled in the user's pocket.
Fixed a bug where we would tell the power manager that the keyboard
was visible even if the lid switch did not control the keyboard.
This used to cause the power manager to try to set the keyboard
brightness, which doesn't work.
Bug: 6377115
Bug: 6406726
Change-Id: Ic84b71d09563d51c92cd1cf132fa8bdee6509103
Test runner will now create directory /vendor/overlay/framework, if
missing.
Also, move wallpaper from drawable to drawable-nodpi for it to actually
take effect on ICS code.
Change-Id: I7615345e847c5fca91aedc459f6aa3316a45aab5
Previously, building overlay packages required passing aapt its -o flag.
This commit decouples the idmap generation code from the effects of the
-o flag.
Since this commit renders the -o flag obsolete, support for the flag was
removed from aapt as well.
Change-Id: Ied2e0ab8cb800e49623f0a2044b06cd4935473d5
Runtime resource overlay allows unmodified applications to appear
as if they had been compiled with additional resources defined. See
libs/utils/README for more information.
This commit is the first iteration of runtime resource overlay. It
provides the actual overlay modifications and loading of trusted overlay
packages (ie residing in /vendor) targeting framework-res.apk.
This commit loads exactly one overlay package. The overlay,
if present, must target framework-res.apk and be located at
/vendor/overlay/framework/framework-res.apk.
Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db