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

Commit 0d80797d authored by Eric Biggers's avatar Eric Biggers Committed by Automerger Merge Worker
Browse files

UserDataPreparer: reboot to recovery for system user only am: fd31f740

parents 4bf1a4ac fd31f740
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -118,8 +118,11 @@ class UserDataPreparer {
                    flags | StorageManager.FLAG_STORAGE_DE, false);
            } else {
                try {
                    Log.e(TAG, "prepareUserData failed", e);
                    RecoverySystem.rebootPromptAndWipeUserData(mContext, "prepareUserData failed");
                    Log.wtf(TAG, "prepareUserData failed for user " + userId, e);
                    if (userId == UserHandle.USER_SYSTEM) {
                        RecoverySystem.rebootPromptAndWipeUserData(mContext,
                                "prepareUserData failed for system user");
                    }
                } catch (IOException e2) {
                    throw new RuntimeException("error rebooting into recovery", e2);
                }