Fix issue #8768456: Settings > App Info under reports...

...app storage size for apps w/ .so files

The lib directories are tagged with the apk install number,
so must be explicitly passed down to installd.

Change-Id: Iae8815afd6ba964f5b2ed86a0d04a91827391ed6
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index e544be7..8e14a2c 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -421,7 +421,7 @@
 }
 
 int get_size(const char *pkgname, int persona, const char *apkpath,
-             const char *fwdlock_apkpath, const char *asecpath,
+             const char *libdirpath, const char *fwdlock_apkpath, const char *asecpath,
              int64_t *_codesize, int64_t *_datasize, int64_t *_cachesize,
              int64_t* _asecsize)
 {
@@ -460,8 +460,8 @@
     }
 
         /* add in size of any libraries */
-    if (!create_pkg_path_in_dir(path, &android_app_lib_dir, pkgname, PKG_DIR_POSTFIX)) {
-        d = opendir(path);
+    if (libdirpath != NULL && libdirpath[0] != '!') {
+        d = opendir(libdirpath);
         if (d != NULL) {
             dfd = dirfd(d);
             codesize += calculate_dir_size(dfd);