Skip to content
Snippets Groups Projects
Commit 34a64515 authored by Chun-Wei Wang's avatar Chun-Wei Wang Committed by Eric Biggers
Browse files

Fix system process crash

verifyKnownUsers() might fail due to database error
in low storage which will crash the system process
and cause boot loop.

Bug: 300568641
Test: 1. put large files under /data/local/tmp
         to cause low storage
      2. device can reboot successfully
Change-Id: If1a3ac06b2c02b273afa47e6b0a90bf08408fb6b
Merged-In: If1a3ac06b2c02b273afa47e6b0a90bf08408fb6b
(cherry picked from commit 9ff12f33)
parent 70330bc2
No related branches found
No related tags found
No related merge requests found
......@@ -195,8 +195,12 @@ public class RecoverableKeyStoreManager {
mApplicationKeyStorage = applicationKeyStorage;
mTestCertHelper = testOnlyInsecureCertificateHelper;
mCleanupManager = cleanupManager;
// Clears data for removed users.
mCleanupManager.verifyKnownUsers();
try {
// Clears data for removed users.
mCleanupManager.verifyKnownUsers();
} catch (Exception e) {
Log.e(TAG, "Failed to verify known users", e);
}
try {
mRecoverableKeyGenerator = RecoverableKeyGenerator.newInstance(mDatabase);
} catch (NoSuchAlgorithmException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment