Commit Graph

9 Commits

Author SHA1 Message Date
Carmen Agimof
1ef924bfeb Revert "Downgrade the compilation filter of unused apps."
This reverts commit bdcc111625.

Reason for revert: It has been decided to not move forward with this experiment.

Change-Id: If52a2bb8ba57fd60ba736a5d23a254e72d78645b
2019-11-22 14:59:14 +00:00
Carmen Agimof
bdcc111625 Downgrade the compilation filter of unused apps.
This CL extends the downgrade functionality introduced earlier that was using
only sysprop for enabling the feature and adds DeviceConfig flags that allow
remote configuration. The SystemProperties used before are not removed and
used in case the DeviceConfig flag for enabling the feature is false and the
sysprop is set.

Manual testing:
1. Set the required flags (adb shell device_config put
package_manager_service downgrade_unused_apps_enabled "true" and adb shell
device_config put package_manager_service inactive_app_threshold_days "10")
2. Device should have less than 1 GB free space (use fallocate to create big
files)
3. Device has an app not used in the last 10 days: e.g. com.facebook.katana
4. Check compilation filter using adb shell dumpsys package com.facebook.katana
(should be speed-profile)
5. Run adb shell cmd package bg-dexopt-job
6. Check again compilation filter, should be verify

Bug: 139047287
Test: Integration tests added and manual testing
Change-Id: I874a0f82e9488fe1334b6c021cec865f4274b15a
2019-08-28 10:20:49 +01:00
Sasha Smundak
89414e1ed5 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
2019-03-12 09:37:32 -07:00
Brett Chabot
502ec7ae4b Migrate remainder of frameworks/base to androidx.test
See go/jetpack-test-android-migration

Exempt-From-Owner-Approval: automated package name refactoring

Test: m  m -j BroadcastRadioTests KeystoreTests mediaframeworktest ActivityManagerPerfTests AppLaunch AppLaunchWear BackgroundDexOptServiceIntegrationTests AppCompatibilityTest DynamicCodeLoggerIntegrationTests FlickerLibTest InternalTests PackageWatchdogTest RcsTests RollbackTestAppAv1 RollbackTestAppAv2 RollbackTestAppACrashingV2 RollbackTestAppBv1 RollbackTestAppBv2 RollbackTestAppASplitV1 RollbackTestAppASplitV2 RollbackTest ServiceCrashTest UsageStatsPerfTests UsbTests WindowAnimationJank
Change-Id: I32fe3297656eec6060da6c7e24582bcd5315fb16
2019-03-02 00:35:17 +00:00
Andreas Gampe
fa8b57d4f5 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
Test: atest BackgroundDexOptServiceIntegrationTests
Change-Id: I5f52b8322ba386c797a9176a1b216cc547c66456
2018-08-31 18:05:18 -07:00
Jorim Jaggi
7804f7fae4 Fix BackgroundDexOptServiceIntegrationTests
- Ensure that calling uid is shell.
- Clear calling identity such that we don't get permission
failures when calling getCurrentUser()

Test: self
Change-Id: Ifbaceb47edbbc4a6b002d49411ca4635ffc33a08
Fixes: 111798412
2018-08-09 16:51:10 +02: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