diff options
author | Suchi Amalapurapu <asuchitra@google.com> | 2010-03-10 14:19:21 -0800 |
---|---|---|
committer | Suchi Amalapurapu <asuchitra@google.com> | 2010-03-10 16:08:51 -0800 |
commit | 089262dc022d87e31eefc536025be6c015c7ebde (patch) | |
tree | 2c4706dc952c2c3a4407427579a01057564fab52 /cmds | |
parent | e182a92ae408f27f46d15de01c8a263cfe6f9246 (diff) | |
download | frameworks_base-089262dc022d87e31eefc536025be6c015c7ebde.zip frameworks_base-089262dc022d87e31eefc536025be6c015c7ebde.tar.gz frameworks_base-089262dc022d87e31eefc536025be6c015c7ebde.tar.bz2 |
Dont include code size for apps on sdcard.
Use constants defined in PackageHelper for user preferences
to install auto, internal, external.
Set default install location to external.
Update settings db version number
Change-Id: Ib5110c9377990e20a48cee923e55898dfddfd1e6
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index c8d1397..654ee68 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -404,6 +404,15 @@ int get_size(const char *pkgname, const char *apkpath, } } + /* count the source apk as code -- but only if it's not + * installed on the sdcard + */ + if (strncmp(apkpath, SDCARD_DIR_PREFIX, 7) != 0) { + if (stat(apkpath, &s) == 0) { + codesize += stat_size(&s); + } + } + /* count the cached dexfile as code */ if (!create_cache_path(path, apkpath)) { |