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

Commit 9596f217 authored by Eric Biggers's avatar Eric Biggers Committed by Android Build Coastguard Worker
Browse files

[RESTRICT AUTOMERGE] StorageManagerService: don't ignore failures to prepare user storage

We must never leave directories unencrypted.

Bug: 164488924
Bug: 224585613
Change-Id: I9a38ab5cca1ae9c9ebff81fca04615fd83ebe4b2
(cherry picked from commit 50946dd1)
Merged-In: I9a38ab5cca1ae9c9ebff81fca04615fd83ebe4b2
(cherry picked from commit f80dd3ec)
Merged-In: I9a38ab5cca1ae9c9ebff81fca04615fd83ebe4b2
parent 3cdddcef
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -2847,8 +2847,12 @@ class StorageManagerService extends IStorageManager.Stub


        try {
        try {
            mVold.prepareUserStorage(volumeUuid, userId, serialNumber, flags);
            mVold.prepareUserStorage(volumeUuid, userId, serialNumber, flags);
        } catch (Exception e) {
        } catch (RemoteException e) {
            Slog.wtf(TAG, e);
            Slog.wtf(TAG, e);
            // Make sure to re-throw this exception; we must not ignore failure
            // to prepare the user storage as it could indicate that encryption
            // wasn't successfully set up.
            throw new RuntimeException(e);
        }
        }
    }
    }