Files
frameworks_base/tests/BackgroundDexOptServiceIntegrationTests/AndroidManifest.xml
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

43 lines
1.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.frameworks.bgdexopttest">
<!-- Uses API introduced in O (26) -->
<uses-sdk
android:minSdkVersion="1"
android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.DUMP" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<uses-permission android:name="android.permission.SET_TIME" />
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_DEVICE_CONFIG" />
<uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.frameworks.bgdexopttest"
android:label="Integration test for BackgroundDexOptService" />
</manifest>