From 089262dc022d87e31eefc536025be6c015c7ebde Mon Sep 17 00:00:00 2001 From: Suchi Amalapurapu Date: Wed, 10 Mar 2010 14:19:21 -0800 Subject: 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 --- cmds/installd/commands.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cmds') 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)) { -- cgit v1.1