Commit Graph

7 Commits

Author SHA1 Message Date
Brett Chabot
3bc264d1a0 Migrate BackgroundDexOptServiceIntegrationTests to androidx.test
See go/jetpack-test-android-migration

Partial cherry-pick of commit a86ec10b96244a32931cd2949be0f55ee3ea14c8.

Test: atest BackgroundDexOptServiceIntegrationTests
Change-Id: I15d10a1962210cde7e079590437009f6a5938db2
Merged-In: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-07-01 22:29:03 +00:00
Andreas Gampe
a8ff8b2529 Framework: Allow root to send bg-dexopt
To allow testing, and work on rooted userdebug devices, allow the root
user to issue package bg-dexopt commands.

Bug: 111798412
Exempt-From-Owner-Approval: cherry-pick
Test: atest BackgroundDexOptServiceIntegrationTests
Merged-In: I5f52b8322ba386c797a9176a1b216cc547c66456
Change-Id: I5f52b8322ba386c797a9176a1b216cc547c66456
2019-07-01 22:28:38 +00:00
Jorim Jaggi
3752c462ef Fix BackgroundDexOptServiceIntegrationTests
- Ensure that calling uid is shell.
- Clear calling identity such that we don't get permission
failures when calling getCurrentUser()

Test: self
Exempt-From-Owner-Approval: cherry-pick
Merged-In: Ifbaceb47edbbc4a6b002d49411ca4635ffc33a08
Change-Id: Ifbaceb47edbbc4a6b002d49411ca4635ffc33a08
Fixes: 111798412
2019-07-01 22:27:49 +00:00
Sasha Smundak
4a3d1a0b0c Convert tests/**/Android.mk files to Android.bp, part II
See build/soong/README.md for more information.

Bug: 122332340
Test: treehugger
Change-Id: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
Merged-In: I886b6536a0ef1c8d21f15ec7ff9fdb9784d5b865
2019-03-14 14:30:58 -07:00
Calin Juravle
7fc0f633bc Fix BackgroundDexOptTest
Test: atest BackgroundDexOptServiceIntegrationTests
Bug: 76425903
Change-Id: I19b72b95ee19ebe1807e1ce108a39dec6196a097
2018-03-30 14:04:48 -07: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
Arthur Eubanks
1ea7ed0278 Add integration tests for BackgroundDexOptService
Add three tests:
1. Under normal conditions, check that dexopt upgrades test app to
$(getprop pm.dexopt.bg-dexopt).
2. Under low storage conditions and package is unused, check
that dexopt downgrades test app to $(getprop pm.dexopt.inactive).
3. Under low storage conditions and package is recently used, check
that dexopt upgrades test app to $(getprop pm.dexopt.bg-dexopt).

Test: atest -v BackgroundDexOptServiceIntegrationTests
BUG: 64807719

Change-Id: Iaa50d5120ea0255b38226bda0452e7e47f1ff5d0
2017-12-01 23:32:39 +00:00