Record use of metadata encryption in property

Bug: 152150018
Test: Cuttlefish with and without keydirectory option
Change-Id: I400873ec207cb63f0407fefc83962bb3a927e294
diff --git a/MetadataCrypt.cpp b/MetadataCrypt.cpp
index 8227e74..8bc8beb 100644
--- a/MetadataCrypt.cpp
+++ b/MetadataCrypt.cpp
@@ -336,6 +336,11 @@
 
     LOG(DEBUG) << "Mounting metadata-encrypted filesystem:" << mount_point;
     mount_via_fs_mgr(mount_point.c_str(), crypto_blkdev.c_str());
+
+    // Record that there's at least one fstab entry with metadata encryption
+    if (!android::base::SetProperty("ro.crypto.metadata.enabled", "true")) {
+        LOG(WARNING) << "failed to set ro.crypto.metadata.enabled";  // This isn't fatal
+    }
     return true;
 }