Ignore user serial numbers in core-only mode.

When booting in core-only mode, our data partition is a tmpfs which
doesn't support xattrs, so we can't set/enforce user serial numbers.

Bug: 28254840
Change-Id: Id83c551c7c603a4cd5043e06f7161441b2dfaa8b
This commit is contained in:
Jeff Sharkey
2016-04-19 11:39:42 -06:00
parent fed6c65f2a
commit 214bea1b59

View File

@@ -18679,11 +18679,11 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
try {
storage.prepareUserStorage(volumeUuid, userId, userSerial, flags);
if ((flags & StorageManager.FLAG_STORAGE_DE) != 0) {
if ((flags & StorageManager.FLAG_STORAGE_DE) != 0 && !mOnlyCore) {
UserManagerService.enforceSerialNumber(
Environment.getDataUserDeDirectory(volumeUuid, userId), userSerial);
}
if ((flags & StorageManager.FLAG_STORAGE_CE) != 0) {
if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && !mOnlyCore) {
UserManagerService.enforceSerialNumber(
Environment.getDataUserCeDirectory(volumeUuid, userId), userSerial);
}
@@ -18771,7 +18771,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
logCriticalInfo(Log.WARN, "Destroying user directory " + file
+ " because no matching user was found");
destroyUser = true;
} else {
} else if (!mOnlyCore) {
try {
UserManagerService.enforceSerialNumber(file, info.serialNumber);
} catch (IOException e) {