Merge "Check if storage app data and obb directories exist in vold"

This commit is contained in:
rickywai
2020-12-14 14:24:36 +00:00
committed by Gerrit Code Review

View File

@@ -4612,14 +4612,7 @@ class StorageManagerService extends IStorageManager.Stub
// Create package obb and data dir if it doesn't exist. // Create package obb and data dir if it doesn't exist.
int appUid = UserHandle.getUid(userId, mPmInternal.getPackage(pkg).getUid()); int appUid = UserHandle.getUid(userId, mPmInternal.getPackage(pkg).getUid());
File file = new File(packageObbDir); vold.ensureAppDirsCreated(new String[] {packageObbDir, packageDataDir}, appUid);
if (!file.exists()) {
vold.setupAppDir(packageObbDir, appUid);
}
file = new File(packageDataDir);
if (!file.exists()) {
vold.setupAppDir(packageDataDir, appUid);
}
} }
} catch (ServiceManager.ServiceNotFoundException | RemoteException e) { } catch (ServiceManager.ServiceNotFoundException | RemoteException e) {
Slog.e(TAG, "Unable to create obb and data directories for " + processName,e); Slog.e(TAG, "Unable to create obb and data directories for " + processName,e);