Unmount all asec apps before encrypting

Now that forward locked apps are stored on /data as asec image files
that are mounted, they need to be unmounted before /data can be unmounted
so it can be encrypted.

Change-Id: I7c87deb52aaed21c8ad8ce8aceb7c15c2338620a
diff --git a/cryptfs.c b/cryptfs.c
index cc7797a..e1c177d 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -1214,6 +1214,13 @@
     property_set("vold.decrypt", "trigger_shutdown_framework");
     SLOGD("Just asked init to shut down class main\n");
 
+    if (vold_unmountAllAsecs()) {
+        /* Just report the error.  If any are left mounted,
+         * umounting /data below will fail and handle the error.
+         */
+        SLOGE("Error unmounting internal asecs");
+    }
+
     property_get("ro.crypto.fuse_sdcard", fuse_sdcard, "");
     if (!strcmp(fuse_sdcard, "true")) {
         /* This is a device using the fuse layer to emulate the sdcard semantics