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

Commit 9c8625ea authored by Kenny Root's avatar Kenny Root
Browse files

Change user 0 directory back for compatibility

The PackageManagerTests aren't designed for multiple users yet, so they
fail. Since multiple users aren't supported yet, just change the default
data directory for user 0 back to how it was previously. This fixes the
existing tests and doesn't get anyone's hopes up since they won't see
/data/user/0/pacakge when we don't support multiple users yet.

Bug: 4380006
Change-Id: Iedcc3115b000759c0013ba6878e13cd2358897da
parent e432a000
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2860,9 +2860,18 @@ public class PackageManagerService extends IPackageManager.Stub {
    }

    private File getDataPathForPackage(String packageName, int userId) {
        /*
         * Until we fully support multiple users, return the directory we
         * previously would have. The PackageManagerTests will need to be
         * revised when this is changed back..
         */
        if (userId == 0) {
            return new File(mAppDataDir, packageName);
        } else {
            return new File(mUserAppDataDir.getAbsolutePath() + File.separator + userId
                + File.separator + packageName);
        }
    }

    private PackageParser.Package scanPackageLI(PackageParser.Package pkg,
            int parseFlags, int scanMode, long currentTime) {