Temporarily bg-whitelist the default container package-cleaning service

Bug 35968513
Test: manual

Change-Id: Iac3e831631d279f68dec3a49d50393a4abf03088
This commit is contained in:
Christopher Tate
2017-03-28 16:13:51 -07:00
parent 474662da39
commit f16e7423c7

View File

@@ -1181,6 +1181,7 @@ public class PackageManagerService extends IPackageManager.Stub {
// Stores a list of users whose package restrictions file needs to be updated
private ArraySet<Integer> mDirtyUsers = new ArraySet<Integer>();
static final long DEFAULT_CONTAINER_WHITELIST_DURATION = 10 * 60 * 1000;
final private DefaultContainerConnection mDefContainerConn =
new DefaultContainerConnection();
class DefaultContainerConnection implements ServiceConnection {
@@ -12914,6 +12915,9 @@ public class PackageManagerService extends IPackageManager.Stub {
IActivityManager am = ActivityManager.getService();
if (am != null) {
try {
getDeviceIdleController().addPowerSaveTempWhitelistApp(Process.SYSTEM_UID,
DEFAULT_CONTAINER_PACKAGE, DEFAULT_CONTAINER_WHITELIST_DURATION,
UserHandle.USER_SYSTEM, false, "cleaning packages");
am.startService(null, intent, null, -1, null, false, mContext.getOpPackageName(),
UserHandle.USER_SYSTEM);
} catch (RemoteException e) {