Encrypt phone even if pattern or no keyguard
Add option to enablecrypto to take type, allowing us to set type
when encrypting.
Bug: 13749169
Change-Id: If22fcfa93f1ebd1a5bd3b0077bb3bd8ae71fe819
diff --git a/cryptfs.c b/cryptfs.c
index 3d0f30b..40a473f 100644
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -2408,13 +2408,9 @@
return -1;
}
-int cryptfs_enable(char *howarg, char *passwd, int allow_reboot)
+int cryptfs_enable(char *howarg, int type, char *passwd, int allow_reboot)
{
- /** @todo If we keep this route (user selected encryption)
- * need to take a type in and pass it to here.
- */
- return cryptfs_enable_internal(howarg, CRYPT_TYPE_PASSWORD,
- passwd, allow_reboot);
+ return cryptfs_enable_internal(howarg, type, passwd, allow_reboot);
}
int cryptfs_enable_default(char *howarg, int allow_reboot)