Loading services/core/java/com/android/server/pm/UserDataPreparer.java +16 −2 Original line number Diff line number Diff line Loading @@ -70,12 +70,19 @@ class UserDataPreparer { void prepareUserData(int userId, int userSerial, int flags) { synchronized (mInstallLock) { final StorageManager storage = mContext.getSystemService(StorageManager.class); /* * Internal storage must be prepared before adoptable storage, since the user's volume * keys are stored in their internal storage. */ prepareUserDataLI(null /* internal storage */, userId, userSerial, flags, true); for (VolumeInfo vol : storage.getWritablePrivateVolumes()) { final String volumeUuid = vol.getFsUuid(); if (volumeUuid != null) { prepareUserDataLI(volumeUuid, userId, userSerial, flags, true); } } } } private void prepareUserDataLI(String volumeUuid, int userId, int userSerial, int flags, boolean allowRecover) { Loading Loading @@ -133,11 +140,18 @@ class UserDataPreparer { void destroyUserData(int userId, int flags) { synchronized (mInstallLock) { final StorageManager storage = mContext.getSystemService(StorageManager.class); /* * Volume destruction order isn't really important, but to avoid any weird issues we * process internal storage last, the opposite of prepareUserData. */ for (VolumeInfo vol : storage.getWritablePrivateVolumes()) { final String volumeUuid = vol.getFsUuid(); if (volumeUuid != null) { destroyUserDataLI(volumeUuid, userId, flags); } } destroyUserDataLI(null /* internal storage */, userId, flags); } } void destroyUserDataLI(String volumeUuid, int userId, int flags) { Loading Loading
services/core/java/com/android/server/pm/UserDataPreparer.java +16 −2 Original line number Diff line number Diff line Loading @@ -70,12 +70,19 @@ class UserDataPreparer { void prepareUserData(int userId, int userSerial, int flags) { synchronized (mInstallLock) { final StorageManager storage = mContext.getSystemService(StorageManager.class); /* * Internal storage must be prepared before adoptable storage, since the user's volume * keys are stored in their internal storage. */ prepareUserDataLI(null /* internal storage */, userId, userSerial, flags, true); for (VolumeInfo vol : storage.getWritablePrivateVolumes()) { final String volumeUuid = vol.getFsUuid(); if (volumeUuid != null) { prepareUserDataLI(volumeUuid, userId, userSerial, flags, true); } } } } private void prepareUserDataLI(String volumeUuid, int userId, int userSerial, int flags, boolean allowRecover) { Loading Loading @@ -133,11 +140,18 @@ class UserDataPreparer { void destroyUserData(int userId, int flags) { synchronized (mInstallLock) { final StorageManager storage = mContext.getSystemService(StorageManager.class); /* * Volume destruction order isn't really important, but to avoid any weird issues we * process internal storage last, the opposite of prepareUserData. */ for (VolumeInfo vol : storage.getWritablePrivateVolumes()) { final String volumeUuid = vol.getFsUuid(); if (volumeUuid != null) { destroyUserDataLI(volumeUuid, userId, flags); } } destroyUserDataLI(null /* internal storage */, userId, flags); } } void destroyUserDataLI(String volumeUuid, int userId, int flags) { Loading