Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b0b9a5e authored by Zim's avatar Zim Committed by Zimuzo Ezeozue
Browse files

Skip post install app data preparation for /data/preloads

/data/preloads/media is a read-only synthetic volume without a
corresponding VolumeInfo, hence vold is not aware of the volume.

We should therefore skip calling into vold for such paths.

Test: Manual
Bug: 161702661
Change-Id: I3da69acf6f1da4863b600972a98ee310e15a5540
parent 55643e3a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4634,6 +4634,11 @@ class StorageManagerService extends IStorageManager.Stub
            // make sure the OBB dir for the application is setup correctly, if it exists.
            File[] packageObbDirs = userEnv.buildExternalStorageAppObbDirs(packageName);
            for (File packageObbDir : packageObbDirs) {
                if (packageObbDir.getPath().startsWith(
                                Environment.getDataPreloadsMediaDirectory().getPath())) {
                    Slog.i(TAG, "Skipping app data preparation for " + packageObbDir);
                    continue;
                }
                try {
                    mVold.fixupAppDir(packageObbDir.getCanonicalPath() + "/", uid);
                } catch (IOException e) {