Merge "Ignore mkdirs requests while storage is locked." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-27 05:18:47 +00:00
committed by Android (Google) Code Review

View File

@@ -2668,6 +2668,9 @@ class StorageManagerService extends IStorageManager.Stub
final int userId = UserHandle.getUserId(Binder.getCallingUid());
final UserEnvironment userEnv = new UserEnvironment(userId);
// Ignore requests to create directories while storage is locked
if (!isUserKeyUnlocked(userId)) return;
// Validate that reported package name belongs to caller
final AppOpsManager appOps = (AppOpsManager) mContext.getSystemService(
Context.APP_OPS_SERVICE);