Fixes Decryption prompt asking when not needed
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: Ic366a50f02f283864cf44d7b36f40ff6432d4970
diff --git a/twrp.cpp b/twrp.cpp
index 9973536..584245b 100755
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -74,7 +74,7 @@
if (DataManager::GetIntValue(TW_IS_ENCRYPTED) != 0) {
if (SkipDecryption) {
LOGINFO("Skipping decryption\n");
- } else {
+ } else if (DataManager::GetIntValue(TW_CRYPTO_PWTYPE) != 0) {
LOGINFO("Is encrypted, do decrypt page first\n");
if (DataManager::GetIntValue(TW_IS_FBE))
DataManager::SetValue("tw_crypto_user_id", "0");