summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-07-25 09:42:22 -0700
committerKenny Root <kroot@google.com>2011-07-25 09:42:22 -0700
commit9c8625ead8acd695909d14e3cbda659622848873 (patch)
treec78359bf786ac5f1c1f95366b7e4d3fe3e16348d
parente432a0005180ba9ac2c1d7822c4761b475fddc51 (diff)
downloadframeworks_base-9c8625ead8acd695909d14e3cbda659622848873.zip
frameworks_base-9c8625ead8acd695909d14e3cbda659622848873.tar.gz
frameworks_base-9c8625ead8acd695909d14e3cbda659622848873.tar.bz2
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
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index d6a15e6..9eb1179 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -2860,8 +2860,17 @@ public class PackageManagerService extends IPackageManager.Stub {
}
private File getDataPathForPackage(String packageName, int userId) {
- return new File(mUserAppDataDir.getAbsolutePath() + File.separator + 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,