Distinguish between unencrypted and unencryptable
Set ro.crypto.state flag to unencrypted and unsupported accordingly
Bug: 18002358
Change-Id: I1f88ce9704c5505d7b63256e2ebe5f8441c79ad0
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 229487f..2e72832 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -501,9 +501,9 @@
property_set("vold.decrypt", "trigger_default_encryption");
} else if (ret == FS_MGR_MNTALL_DEV_NOT_ENCRYPTED) {
property_set("ro.crypto.state", "unencrypted");
- /* If fs_mgr determined this is an unencrypted device, then trigger
- * that action.
- */
+ ActionManager::GetInstance().QueueEventTrigger("nonencrypted");
+ } else if (ret == FS_MGR_MNTALL_DEV_NOT_ENCRYPTABLE) {
+ property_set("ro.crypto.state", "unsupported");
ActionManager::GetInstance().QueueEventTrigger("nonencrypted");
} else if (ret == FS_MGR_MNTALL_DEV_NEEDS_RECOVERY) {
/* Setup a wipe via recovery, and reboot into recovery */