Merge "e4crypt_is_native has been moved into system/extras." into nyc-dev
am: cfa03d4a4c

* commit 'cfa03d4a4c53acf41dca2c41a2efd00de06043bb':
  e4crypt_is_native has been moved into system/extras.

Change-Id: I345475c44fb2d8812a25c9f2195c748cddc55bfe
diff --git a/Ext4Crypt.cpp b/Ext4Crypt.cpp
index eaac26a..8786c09 100644
--- a/Ext4Crypt.cpp
+++ b/Ext4Crypt.cpp
@@ -25,7 +25,6 @@
 #include <sstream>
 #include <string>
 
-#include <cutils/properties.h>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -59,7 +58,7 @@
 static constexpr int FLAG_STORAGE_CE = 1 << 1;
 
 namespace {
-const std::string device_key_dir = std::string() + DATA_MNT_POINT + "/unencrypted";
+const std::string device_key_dir = std::string() + DATA_MNT_POINT + e4crypt_unencrypted_folder;
 const std::string device_key_path = device_key_dir + "/key";
 const std::string device_key_temp = device_key_dir + "/temp";
 
@@ -93,13 +92,6 @@
 };
 }
 
-// TODO replace with proper function to test for file encryption
-bool e4crypt_is_native() {
-    char value[PROPERTY_VALUE_MAX];
-    property_get("ro.crypto.type", value, "none");
-    return !strcmp(value, "file");
-}
-
 static bool e4crypt_is_emulated() {
     return property_get_bool("persist.sys.emulate_fbe", false);
 }