Merge "Add ozip decryption for Oppo/Realme device" into android-9.0
diff --git a/partition.cpp b/partition.cpp
index 78c68db..1471bd6 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -723,10 +723,10 @@
 
 bool TWPartition::Decrypt_FBE_DE() {
 if (TWFunc::Path_Exists("/data/unencrypted/key/version")) {
+		DataManager::SetValue(TW_IS_FBE, 1);
 		LOGINFO("File Based Encryption is present\n");
 #ifdef TW_INCLUDE_FBE
 	Is_FBE = true;
-	DataManager::SetValue(TW_IS_FBE, 1);
 	ExcludeAll(Mount_Point + "/convert_fbe");
 	ExcludeAll(Mount_Point + "/unencrypted");
 	ExcludeAll(Mount_Point + "/misc/vold/user_keys");
@@ -777,6 +777,7 @@
 		LOGERR("FBE found but FBE support not present in TWRP\n");
 #endif
 	}
+	DataManager::SetValue(TW_IS_FBE, 0);
 	return false;
 }