summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-08-20 17:23:30 -0700
committerDianne Hackborn <hackbod@google.com>2012-08-21 10:34:20 -0700
commit0c3804950236fe170ebf6cc7a5f1e3e305b8f315 (patch)
tree832ea4ab2c17fe568df894aa3ed7438a01d97533 /cmds
parenta5d5d608ccd885d8328879dde782a8cc93b7cf4f (diff)
downloadframeworks_base-0c3804950236fe170ebf6cc7a5f1e3e305b8f315.zip
frameworks_base-0c3804950236fe170ebf6cc7a5f1e3e305b8f315.tar.gz
frameworks_base-0c3804950236fe170ebf6cc7a5f1e3e305b8f315.tar.bz2
Improve multi-user app management.
Introduce API to get per-user storage information, keep track of services associated with users, and various small cleanup. Change-Id: I5d4e784e7ff3cccfed627d66a090d2f464202634
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c4
-rw-r--r--cmds/installd/installd.c7
-rw-r--r--cmds/installd/installd.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 0a7cb2d..c16e6fb 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -432,7 +432,7 @@ int protect(char *pkgname, gid_t gid)
return 0;
}
-int get_size(const char *pkgname, const char *apkpath,
+int get_size(const char *pkgname, int persona, const char *apkpath,
const char *fwdlock_apkpath, const char *asecpath,
int64_t *_codesize, int64_t *_datasize, int64_t *_cachesize,
int64_t* _asecsize)
@@ -479,7 +479,7 @@ int get_size(const char *pkgname, const char *apkpath,
}
}
- if (create_pkg_path(path, pkgname, PKG_DIR_POSTFIX, 0)) {
+ if (create_pkg_path(path, pkgname, PKG_DIR_POSTFIX, persona)) {
goto done;
}
diff --git a/cmds/installd/installd.c b/cmds/installd/installd.c
index b8d0bd7..7108d68 100644
--- a/cmds/installd/installd.c
+++ b/cmds/installd/installd.c
@@ -85,8 +85,9 @@ static int do_get_size(char **arg, char reply[REPLY_MAX])
int64_t asecsize = 0;
int res = 0;
- /* pkgdir, apkpath */
- res = get_size(arg[0], arg[1], arg[2], arg[3], &codesize, &datasize, &cachesize, &asecsize);
+ /* pkgdir, persona, apkpath */
+ res = get_size(arg[0], atoi(arg[1]), arg[2], arg[3], arg[4],
+ &codesize, &datasize, &cachesize, &asecsize);
/*
* Each int64_t can take up 22 characters printed out. Make sure it
@@ -150,7 +151,7 @@ struct cmdinfo cmds[] = {
{ "freecache", 1, do_free_cache },
{ "rmcache", 1, do_rm_cache },
{ "protect", 2, do_protect },
- { "getsize", 4, do_get_size },
+ { "getsize", 5, do_get_size },
{ "rmuserdata", 2, do_rm_user_data },
{ "movefiles", 0, do_movefiles },
{ "linklib", 2, do_linklib },
diff --git a/cmds/installd/installd.h b/cmds/installd/installd.h
index f5485d2..3201427 100644
--- a/cmds/installd/installd.h
+++ b/cmds/installd/installd.h
@@ -199,7 +199,7 @@ int delete_cache(const char *pkgname);
int move_dex(const char *src, const char *dst);
int rm_dex(const char *path);
int protect(char *pkgname, gid_t gid);
-int get_size(const char *pkgname, const char *apkpath, const char *fwdlock_apkpath,
+int get_size(const char *pkgname, int persona, const char *apkpath, const char *fwdlock_apkpath,
const char *asecpath, int64_t *codesize, int64_t *datasize, int64_t *cachesize,
int64_t *asecsize);
int free_cache(int64_t free_size);