[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 50946dd15f)
Merged-In: I9a38ab5cca1ae9c9ebff81fca04615fd83ebe4b2
This commit is contained in:
Eric Biggers
2021-08-13 13:37:55 -07:00
parent d06ee6d79d
commit ecffe3ecbf

View File

@@ -3380,8 +3380,12 @@ class StorageManagerService extends IStorageManager.Stub
mInstaller.tryMountDataMirror(volumeUuid); mInstaller.tryMountDataMirror(volumeUuid);
} }
} }
} catch (Exception e) { } catch (RemoteException | Installer.InstallerException 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);
} }
} }