log storage: change AB device log storage to /data/recovery

This patchset is now exlcuding /data/cache from backup, and removing it
from the wipe exclusion list to prevent errors on restore and wiping
/data.

This patchset changes the directory from /data/cache to /data/recovery for TWRP
to store logs and other file information. This will help with AB
devices that don't want recovery to mess with /data/cache.

This patchset will make ORS use /data/cache for AB devices.

Remove policy code because we don't need to set a policy for the
recovery directory.

Change-Id: I1d140276314fd34804a72297d6e25a52e58210a0
diff --git a/twrp-functions.hpp b/twrp-functions.hpp
index 5fad92a..b793d3f 100755
--- a/twrp-functions.hpp
+++ b/twrp-functions.hpp
@@ -30,9 +30,9 @@
 
 using namespace std;
 
-#define NON_AB_CACHE_DIR "/cache/"
-#define AB_CACHE_DIR "/data/cache/"
-#define PERSIST_CACHE_DIR "/persist/cache/"
+#define CACHE_LOGS_DIR "/cache/"		// For devices with a dedicated cache partition
+#define DATA_LOGS_DIR "/data/"			// For devices that do not have a dedicated cache partition
+#define PERSIST_LOGS_DIR "/persist/"	// For devices with neither cache or dedicated data partition
 
 typedef enum
 {
@@ -110,13 +110,12 @@
 	static void copy_kernel_log(string curr_storage); // Copy Kernel Log to Current Storage (PSTORE/KMSG)
 	static bool isNumber(string strtocheck); // return true if number, false if not a number
 	static int stream_adb_backup(string &Restore_Name); // Tell ADB Backup to Stream to TWRP from GUI selection
-	static std::string get_cache_dir(); // return the cache partition existence
+	static std::string get_log_dir(); // return recovery log storage directory
 	static void check_selinux_support(); // print whether selinux support is enabled to console
 	static bool Is_TWRP_App_In_System(); // Check if the TWRP app is installed in the system partition
 	static int Property_Override(string Prop_Name, string Prop_Value); // Override properties (including ro. properties)
 	static bool Get_Encryption_Policy(fscrypt_encryption_policy &policy, std::string path); // return encryption policy for path
 	static bool Set_Encryption_Policy(std::string path, const fscrypt_encryption_policy &policy); // set encryption policy for path
-	static bool Is_Mount_Wiped(std::string path); // check if directory has been wiped
 	static void List_Mounts();
 
 private: