diff options
author | Suchi Amalapurapu <asuchitra@google.com> | 2010-03-11 16:49:16 -0800 |
---|---|---|
committer | Suchi Amalapurapu <asuchitra@google.com> | 2010-03-16 16:36:26 -0700 |
commit | 8a9ab24a5c9b595ac0268fcade4b5bbfe7c45c2d (patch) | |
tree | f445dbf1504f02783b550a80a01ee06d45fbcb4a /cmds | |
parent | 50fdbef2fbcd390035517090bc54220c265f5c75 (diff) | |
download | frameworks_base-8a9ab24a5c9b595ac0268fcade4b5bbfe7c45c2d.zip frameworks_base-8a9ab24a5c9b595ac0268fcade4b5bbfe7c45c2d.tar.gz frameworks_base-8a9ab24a5c9b595ac0268fcade4b5bbfe7c45c2d.tar.bz2 |
Do storage checks before initiating a move.
Add new remote method to check for insufficient error conditions.
Some fixes in MountService when updating media status on PackageManagerService
Fix size calculation condition in installd.
Add new error code if media is unavailable.
New tests for testing error codes.
Some additional debugging statements in MountService.
Change-Id: Ibfe90d5ed6c71d57f9c1c67806f38b5ae9ecdfbf
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/installd/commands.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 654ee68..b8ba3f6 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -389,9 +389,10 @@ int get_size(const char *pkgname, const char *apkpath, int cachesize = 0; /* count the source apk as code -- but only if it's not - * on the /system partition + * on the /system partition and its not on the sdcard. */ - if (strncmp(apkpath, "/system", 7) != 0) { + if (strncmp(apkpath, "/system", 7) != 0 && + strncmp(apkpath, SDCARD_DIR_PREFIX, 7) != 0) { if (stat(apkpath, &s) == 0) { codesize += stat_size(&s); } @@ -403,17 +404,6 @@ int get_size(const char *pkgname, const char *apkpath, codesize += stat_size(&s); } } - - /* 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)) { if (stat(path, &s) == 0) { |