Communicate if we have adoptable disks.

Bug: 19993667
Change-Id: I3c3dddab157a11038f7160d24d53e728bde2194f
diff --git a/main.cpp b/main.cpp
index ed2a88a..df2e0a8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -194,6 +194,7 @@
 }
 
 static int process_config(VolumeManager *vm) {
+    bool has_adoptable = false;
     char hardware[PROPERTY_VALUE_MAX];
     property_get("ro.hardware", hardware, "");
     std::string fstab_filename(StringPrintf("/fstab.%s", hardware));
@@ -225,6 +226,7 @@
 
             if (fs_mgr_is_encryptable(&fstab->recs[i])) {
                 flags |= android::vold::Disk::Flags::kAdoptable;
+                has_adoptable = true;
             }
             if (fs_mgr_is_noemulatedsd(&fstab->recs[i])) {
                 flags |= android::vold::Disk::Flags::kDefaultPrimary;
@@ -234,6 +236,6 @@
                     new VolumeManager::DiskSource(sysPattern, nickname, flags)));
         }
     }
-
+    property_set("vold.has_adoptable", has_adoptable ? "1" : "0");
     return 0;
 }