Revert "With native FBE, lock user directories when framework is started"
This reverts commit 171217cb37.
Somehow, users may be started before this runs. Revert it for now.
Bug: 129956131
Test: none (clean revert)
Change-Id: I609162d0c449376e2026c8db18ffb39152e10027
This commit is contained in:
@@ -929,20 +929,13 @@ class StorageManagerService extends IStorageManager.Stub
|
|||||||
private void initIfBootedAndConnected() {
|
private void initIfBootedAndConnected() {
|
||||||
Slog.d(TAG, "Thinking about init, mBootCompleted=" + mBootCompleted
|
Slog.d(TAG, "Thinking about init, mBootCompleted=" + mBootCompleted
|
||||||
+ ", mDaemonConnected=" + mDaemonConnected);
|
+ ", mDaemonConnected=" + mDaemonConnected);
|
||||||
if (mBootCompleted && mDaemonConnected) {
|
if (mBootCompleted && mDaemonConnected
|
||||||
// Tell vold to lock or unlock the user directories based on the
|
&& !StorageManager.isFileEncryptedNativeOnly()) {
|
||||||
// current file-based encryption status.
|
// When booting a device without native support, make sure that our
|
||||||
final boolean initLocked;
|
// user directories are locked or unlocked based on the current
|
||||||
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
|
// emulation status.
|
||||||
// For native FBE this is a no-op after reboot, but this is
|
final boolean initLocked = StorageManager.isFileEncryptedEmulatedOnly();
|
||||||
// still needed in case of framework restarts.
|
Slog.d(TAG, "Setting up emulation state, initlocked=" + initLocked);
|
||||||
Slog.d(TAG, "FBE is enabled; ensuring all user directories are locked.");
|
|
||||||
initLocked = true;
|
|
||||||
} else {
|
|
||||||
// This is in case FBE emulation was turned off.
|
|
||||||
Slog.d(TAG, "FBE is disabled; ensuring the FBE emulation state is cleared.");
|
|
||||||
initLocked = false;
|
|
||||||
}
|
|
||||||
final List<UserInfo> users = mContext.getSystemService(UserManager.class).getUsers();
|
final List<UserInfo> users = mContext.getSystemService(UserManager.class).getUsers();
|
||||||
for (UserInfo user : users) {
|
for (UserInfo user : users) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user