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

Commit 5832ead8 authored by Kenny Root's avatar Kenny Root
Browse files

Parent's canonical path; not parent of canonical

When moving from SD card to internal, the PackageManager should check if
the native library directory parent's canonical path matches the
canonical data directory.

However, it was checking the canonical native library directory's
parent matches the data directory which makes tests concerning moving
from SD card to internal storage fail.

Change-Id: I16420efbb6f52fd6877a8f62ad060f8a1b8b0033
parent c8909501
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3326,7 +3326,7 @@ public class PackageManagerService extends IPackageManager.Stub {
        if (pkg.applicationInfo.nativeLibraryDir != null) {
            try {
                final File nativeLibraryDir = new File(pkg.applicationInfo.nativeLibraryDir);
                final String dataPathString = dataPath.getCanonicalFile().getPath();
                final String dataPathString = dataPath.getCanonicalPath();

                if (isSystemApp(pkg) && !isUpdatedSystemApp(pkg)) {
                    /*
@@ -3340,7 +3340,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                        Log.i(TAG, "removed obsolete native libraries for system package "
                                + path);
                    }
                } else if (nativeLibraryDir.getCanonicalFile().getParent()
                } else if (nativeLibraryDir.getParentFile().getCanonicalPath()
                        .equals(dataPathString)) {
                    /*
                     * Make sure the native library dir isn't a symlink to