fde: move crypto state & type setting to function

In order to make sure the crypto state and type is set
properly if the device is encrypted, move this check to
a function and call it in cases where the default password
is being used and in cases where it isn't. This will ensure that
an unencrypted device isn't set as encrypted by mistake.

Change-Id: I736f9cbee0e95d7390a09c8235b9914feddaceaf
diff --git a/partitions.hpp b/partitions.hpp
index c0c9d25..284baeb 100755
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -390,6 +390,7 @@
 	void Setup_Super_Partition();											  // Setup the super partition for backup and restore
 	bool Recreate_Logs_Dir();                                                 // Recreate TWRP_AB_LOGS_DIR after wipe
 	std::vector<users_struct>* Get_Users_List();                              // Returns pointer to list of users
+	int Set_FDE_Encrypt_Status();                                             // Sets encryption state for FDE devices (ro.crypto.state and ro.crypto.type)
 
 private:
 	void Setup_Settings_Storage_Partition(TWPartition* Part);                 // Sets up settings storage