diff options
author | Suchi Amalapurapu <asuchitra@google.com> | 2010-03-10 16:15:35 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-03-10 16:15:35 -0800 |
commit | 5e1573601b1c216ac647d7f590fa57496db74adb (patch) | |
tree | 32e69652e99a7fc9df7c56e9da1a07ab2a152f01 /cmds | |
parent | 8af295af91d491876a816f489d4cad2cd89054ec (diff) | |
parent | 089262dc022d87e31eefc536025be6c015c7ebde (diff) | |
download | frameworks_base-5e1573601b1c216ac647d7f590fa57496db74adb.zip frameworks_base-5e1573601b1c216ac647d7f590fa57496db74adb.tar.gz frameworks_base-5e1573601b1c216ac647d7f590fa57496db74adb.tar.bz2 |
Merge "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"
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)) { |