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 6b9f375..564004e 100755
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -391,6 +391,7 @@
 	bool Prepare_Repack(const std::string& Source_Path, const std::string& Temp_Folder_Destination, const bool Copy_Source, const bool Create_Destination = true); // Prepares an image for repacking by unpacking it to the temp folder destination
 	bool Repack_Images(const std::string& Target_Image, const struct Repack_Options_struct& Repack_Options); // Repacks the boot image with a new kernel or a new ramdisk
 	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