vold: Ensure we cleanup secure containers on card removal.

Fixes bug: http://b/issue?id=2567572

Note: The framework will still likely restart since the system_server
is holding references to assets on the card which are mmaped, but
at least now storage will be available when a new card is re-inserted.

Change-Id: I4e195c0c666426b93da47198fa826a6f58d855a9
Signed-off-by: San Mehat <san@google.com>
diff --git a/VolumeManager.h b/VolumeManager.h
index a675646..2ec9eb3 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -71,6 +71,8 @@
 
     // XXX: This should be moved private once switch uevents are working
     void notifyUmsConnected(bool connected);
+    // XXX: Post froyo this should be moved and cleaned up
+    int cleanupAsec(Volume *v, bool force);
 
     void setBroadcaster(SocketListener *sl) { mBroadcaster = sl; }
     SocketListener *getBroadcaster() { return mBroadcaster; }
@@ -78,6 +80,7 @@
     static VolumeManager *Instance();
 
     static char *asecHash(const char *id, char *buffer, size_t len);
+
 private:
     VolumeManager();
     Volume *lookupVolume(const char *label);