summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kenny Root <kroot@google.com> 2011-08-02 15:47:08 -0700
committer Kenny Root <kroot@google.com> 2011-08-02 15:49:39 -0700
commit5832ead89a6cfab83d4ed07e7ca20bc52eea923c (patch)
tree42549ffac985b7fac65f0442161a940273a63e9e
parentc8909501b1ec52e7f2e7e052b277f83d8693dbeb (diff)
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
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 88e0fa88e5b1..3d977d0b97c3 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -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