diff options
author | Eric Biggers <ebiggers@google.com> | 2022-06-22 18:24:38 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-06-22 18:24:38 +0000 |
commit | 67f0d3d69f054a0184efec5a554957886874f793 (patch) | |
tree | d6b8787229f4d90a75afdb43fcb935ef986c1120 | |
parent | e5f8cda1df69c5f9c429a7960e793ac24235dee9 (diff) | |
parent | b12e16054623b5a01b31d169480712d57e589e12 (diff) | |
download | extras-67f0d3d69f054a0184efec5a554957886874f793.tar.gz |
Merge "Rename fscrypt_is_native() to IsFbeEnabled()"
-rw-r--r-- | libfscrypt/fscrypt.cpp | 3 | ||||
-rw-r--r-- | libfscrypt/include/fscrypt/fscrypt.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libfscrypt/fscrypt.cpp b/libfscrypt/fscrypt.cpp index f6e97f11..f8a912fe 100644 --- a/libfscrypt/fscrypt.cpp +++ b/libfscrypt/fscrypt.cpp @@ -85,7 +85,8 @@ static bool LookupModeById(const std::vector<struct ModeLookupEntry>& modes, int return false; } -bool fscrypt_is_native() { +// Returns true if FBE (File Based Encryption) is enabled. +bool IsFbeEnabled() { char value[PROPERTY_VALUE_MAX]; property_get("ro.crypto.type", value, "none"); return !strcmp(value, "file"); diff --git a/libfscrypt/include/fscrypt/fscrypt.h b/libfscrypt/include/fscrypt/fscrypt.h index f3779d00..11f37119 100644 --- a/libfscrypt/include/fscrypt/fscrypt.h +++ b/libfscrypt/include/fscrypt/fscrypt.h @@ -19,7 +19,7 @@ #include <string> -bool fscrypt_is_native(); +bool IsFbeEnabled(); static const char* fscrypt_unencrypted_folder = "/unencrypted"; static const char* fscrypt_key_ref = "/unencrypted/ref"; |