Merge "Run user sensitive 60 seconds after boot" into rvc-qpr-dev am: a88d221014

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12361256

Change-Id: Ia65a7937d00cd1e56a6cf57e09105f7789d5a094
This commit is contained in:
TreeHugger Robot
2020-08-12 17:26:54 +00:00
committed by Automerger Merge Worker

View File

@@ -88,7 +88,7 @@ import java.util.concurrent.ExecutionException;
public final class PermissionPolicyService extends SystemService { public final class PermissionPolicyService extends SystemService {
private static final String LOG_TAG = PermissionPolicyService.class.getSimpleName(); private static final String LOG_TAG = PermissionPolicyService.class.getSimpleName();
private static final boolean DEBUG = false; private static final boolean DEBUG = false;
private static final long USER_SENSITIVE_UPDATE_DELAY_MS = 10000; private static final long USER_SENSITIVE_UPDATE_DELAY_MS = 60000;
private final Object mLock = new Object(); private final Object mLock = new Object();
@@ -282,6 +282,11 @@ public final class PermissionPolicyService extends SystemService {
manager.updateUserSensitiveForApp(uid); manager.updateUserSensitiveForApp(uid);
} }
}, UserHandle.ALL, intentFilter, null, null); }, UserHandle.ALL, intentFilter, null, null);
PermissionControllerManager manager = new PermissionControllerManager(
getUserContext(getContext(), Process.myUserHandle()), FgThread.getHandler());
FgThread.getHandler().postDelayed(manager::updateUserSensitive,
USER_SENSITIVE_UPDATE_DELAY_MS);
} }
/** /**
@@ -420,8 +425,7 @@ public final class PermissionPolicyService extends SystemService {
throw new IllegalStateException(e); throw new IllegalStateException(e);
} }
FgThread.getHandler().postDelayed(permissionControllerManager::updateUserSensitive, permissionControllerManager.updateUserSensitive();
USER_SENSITIVE_UPDATE_DELAY_MS);
packageManagerInternal.updateRuntimePermissionsFingerprint(userId); packageManagerInternal.updateRuntimePermissionsFingerprint(userId);
} }