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 Merged-In: I65a6ce1a682687702f4c8b5c2e054eaaf91c389b
This commit is contained in:
@@ -19,8 +19,8 @@ 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.sysprop.CryptoProperties;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import android.text.TextUtils;
|
||||
@@ -35,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) {
|
||||
@@ -66,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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user