Merge "vold: add coldboot back and make sure it won't block booting"
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index 0063bef..969ab0b 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -685,7 +685,6 @@
         auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id);
         auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id);
         auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id);
-        auto foreign_de_path = android::vold::BuildDataProfilesForeignDexDePath(user_id);
 
         // DE_n key
         auto system_de_path = android::vold::BuildDataSystemDePath(user_id);
@@ -698,7 +697,6 @@
                 multiuser_get_uid(user_id, AID_EVERYBODY))) return false;
 #endif
         if (!prepare_dir(profiles_de_path, 0771, AID_SYSTEM, AID_SYSTEM)) return false;
-        if (!prepare_dir(foreign_de_path, 0773, AID_SYSTEM, AID_SYSTEM)) return false;
 
         if (!prepare_dir(system_de_path, 0770, AID_SYSTEM, AID_SYSTEM)) return false;
         if (!prepare_dir(misc_de_path, 01771, AID_SYSTEM, AID_MISC)) return false;
@@ -756,7 +754,6 @@
         auto system_legacy_path = android::vold::BuildDataSystemLegacyPath(user_id);
         auto misc_legacy_path = android::vold::BuildDataMiscLegacyPath(user_id);
         auto profiles_de_path = android::vold::BuildDataProfilesDePath(user_id);
-        auto foreign_de_path = android::vold::BuildDataProfilesForeignDexDePath(user_id);
 
         // DE_n key
         auto system_de_path = android::vold::BuildDataSystemDePath(user_id);
@@ -769,7 +766,6 @@
             res &= destroy_dir(misc_legacy_path);
 #endif
             res &= destroy_dir(profiles_de_path);
-            res &= destroy_dir(foreign_de_path);
             res &= destroy_dir(system_de_path);
             res &= destroy_dir(misc_de_path);
         }
diff --git a/Utils.cpp b/Utils.cpp
index 17e9ffd..b4fc208 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -589,11 +589,6 @@
     return StringPrintf("%s/misc/profiles/cur/%u", BuildDataPath(nullptr).c_str(), userId);
 }
 
-std::string BuildDataProfilesForeignDexDePath(userid_t userId) {
-    std::string profiles_path = BuildDataProfilesDePath(userId);
-    return StringPrintf("%s/foreign-dex", profiles_path.c_str());
-}
-
 std::string BuildDataPath(const char* volumeUuid) {
     // TODO: unify with installd path generation logic
     if (volumeUuid == nullptr) {
diff --git a/Utils.h b/Utils.h
index 4bfd8e9..ddabace 100644
--- a/Utils.h
+++ b/Utils.h
@@ -103,7 +103,6 @@
 std::string BuildDataMiscCePath(userid_t userid);
 std::string BuildDataMiscDePath(userid_t userid);
 std::string BuildDataProfilesDePath(userid_t userid);
-std::string BuildDataProfilesForeignDexDePath(userid_t userid);
 
 std::string BuildDataPath(const char* volumeUuid);
 std::string BuildDataMediaCePath(const char* volumeUuid, userid_t userid);