Merge "Installd: Clean up code related to foreign dex use" am: 62b34b57c4 am: 9d4819ff2e
am: 9181bdb57f

Change-Id: I2257654b3b73e74a92a179e1068f771e2b6af186
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index a84b051..fbb30db 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -1252,7 +1252,7 @@
             calculate_tree_size(create_data_dalvik_cache_path(), &stats.codeSize,
                     sharedGid, -1);
         }
-        calculate_tree_size(create_data_misc_foreign_dex_path(userId), &stats.dataSize,
+        calculate_tree_size(create_data_user_profile_path(userId), &stats.dataSize,
                 multiuser_get_uid(userId, appId), -1);
         ATRACE_END();
     }
@@ -1350,7 +1350,7 @@
         ATRACE_BEGIN("dalvik");
         calculate_tree_size(create_data_dalvik_cache_path(), &stats.codeSize,
                 -1, -1, true);
-        calculate_tree_size(create_data_misc_foreign_dex_path(userId), &stats.dataSize,
+        calculate_tree_size(create_data_user_profile_path(userId), &stats.dataSize,
                 -1, -1, true);
         ATRACE_END();
 
@@ -1400,7 +1400,7 @@
 
         ATRACE_BEGIN("dalvik");
         calculate_tree_size(create_data_dalvik_cache_path(), &stats.codeSize);
-        calculate_tree_size(create_data_misc_foreign_dex_path(userId), &stats.dataSize);
+        calculate_tree_size(create_data_user_profile_path(userId), &stats.dataSize);
         ATRACE_END();
     }
 
diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp
index 6d50f55..2bf0171 100644
--- a/cmds/installd/utils.cpp
+++ b/cmds/installd/utils.cpp
@@ -239,10 +239,6 @@
     return "/data/dalvik-cache";
 }
 
-std::string create_data_misc_foreign_dex_path(userid_t userid) {
-    return StringPrintf("/data/misc/profiles/cur/%d/foreign-dex", userid);
-}
-
 // Keep profile paths in sync with ActivityThread.
 constexpr const char* PRIMARY_PROFILE_NAME = "primary.prof";
 
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index aa83dc2..d99b445 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -103,7 +103,6 @@
 std::string create_data_ref_profile_package_path(const char* package_name);
 
 std::string create_data_dalvik_cache_path();
-std::string create_data_misc_foreign_dex_path(userid_t userid);
 
 std::string create_primary_profile(const std::string& profile_dir);