Revert "Revert "Encrypt phone even if pattern or no keyguard""
Don't block based on keyguard type, and pass type to encryption function.
Requires:
https://googleplex-android-review.git.corp.google.com/#/c/444201/
or encryption will no longer work.
This reverts commit efec3f2927c45979db2b78e7a6228d08aafb5e42.
Change-Id: I431589a56eb11118027e0a5a84f55e973b1084aa
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)