Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ff12f33 authored by Chun-Wei Wang's avatar Chun-Wei Wang
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
parent bae52482
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -194,8 +194,12 @@ public class RecoverableKeyStoreManager {
        mApplicationKeyStorage = applicationKeyStorage;
        mTestCertHelper = testOnlyInsecureCertificateHelper;
        mCleanupManager = cleanupManager;
        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) {