crypto: only set crypto state and type if not already set

Move setting crypto state and type to functions and call those
functions rather than arbitrarily setting those props in every
case. This cleans up all the log spam from trying to set
read-only props, since they will now only get set if
they aren't already.

Change-Id: I392bee060d71c6ee50d0d92bf1b118d9049be41a
diff --git a/partitions.hpp b/partitions.hpp
index 4840566..637471b 100755
--- a/partitions.hpp
+++ b/partitions.hpp
@@ -382,7 +382,8 @@
 	void close_uevent();                                                      // Closes the uevent netlink socket
 	void Add_Partition(TWPartition* Part);                                    // Adds a new partition to the Partitions vector
 	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)
+	void Set_Crypto_State();                                                  // Sets encryption state for devices (ro.crypto.state)
+	int Set_Crypto_Type(const char* crypto_type);                             // Sets encryption type for FDE (block) and FBE (file) devices (ro.crypto.type)
 
 private:
 	void Setup_Settings_Storage_Partition(TWPartition* Part);                 // Sets up settings storage