summaryrefslogtreecommitdiff
path: root/src/com/android/settings/development/FileEncryptionPreferenceController.java
diff options
context:
space:
mode:
authorKiyoung Kim <kiyoungkim@google.com>2019-01-22 10:19:29 +0900
committerKiyoung Kim <kiyoungkim@google.com>2019-01-22 11:15:42 +0900
commit3737da3ae6a3bbc045d86c44bf54f24eb7d08a10 (patch)
tree83a270bf0a9c6e3286a297ccd59b5559a9e0d534 /src/com/android/settings/development/FileEncryptionPreferenceController.java
parentdef4fd900d21dc14015866cd8d14fcd61b715b69 (diff)
Schematize Crypto system properties
Properties accessed across partitions are now schematized and will become APIs to make explicit interfaces among partitions. Bug: 117924132 Test: m -j Change-Id: I65a6ce1a682687702f4c8b5c2e054eaaf91c389b
Diffstat (limited to 'src/com/android/settings/development/FileEncryptionPreferenceController.java')
-rw-r--r--src/com/android/settings/development/FileEncryptionPreferenceController.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/settings/development/FileEncryptionPreferenceController.java b/src/com/android/settings/development/FileEncryptionPreferenceController.java
index a0628b0f63..8aadfb95e4 100644
--- a/src/com/android/settings/development/FileEncryptionPreferenceController.java
+++ b/src/com/android/settings/development/FileEncryptionPreferenceController.java
@@ -19,10 +19,9 @@ package com.android.settings.development;
import android.content.Context;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.SystemProperties;
import android.os.storage.IStorageManager;
import android.text.TextUtils;
-
+import android.sysprop.CryptoProperties;
import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
@@ -36,9 +35,6 @@ public class FileEncryptionPreferenceController extends DeveloperOptionsPreferen
private static final String KEY_CONVERT_FBE = "convert_to_file_encryption";
private static final String KEY_STORAGE_MANAGER = "mount";
- @VisibleForTesting
- static final String FILE_ENCRYPTION_PROPERTY_KEY = "ro.crypto.type";
-
private final IStorageManager mStorageManager;
public FileEncryptionPreferenceController(Context context) {
@@ -67,8 +63,7 @@ public class FileEncryptionPreferenceController extends DeveloperOptionsPreferen
@Override
public void updateState(Preference preference) {
- if (!TextUtils.equals("file",
- SystemProperties.get(FILE_ENCRYPTION_PROPERTY_KEY, "none" /* default */))) {
+ if (!TextUtils.equals("file", CryptoProperties.type().orElse("none"))) {
return;
}