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:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.settings.development;
|
||||
|
||||
import static com.android.settings.development.FileEncryptionPreferenceController.FILE_ENCRYPTION_PROPERTY_KEY;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.mockito.ArgumentMatchers.anyBoolean;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
@@ -26,8 +25,8 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.storage.IStorageManager;
|
||||
import android.sysprop.CryptoProperties;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
@@ -92,7 +91,7 @@ public class FileEncryptionPreferenceControllerTest {
|
||||
ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager);
|
||||
when(mStorageManager.isConvertibleToFBE()).thenReturn(true);
|
||||
mController.displayPreference(mPreferenceScreen);
|
||||
SystemProperties.set(FILE_ENCRYPTION_PROPERTY_KEY, "foobar");
|
||||
CryptoProperties.type("foobar");
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
@@ -106,7 +105,7 @@ public class FileEncryptionPreferenceControllerTest {
|
||||
ReflectionHelpers.setField(mController, "mStorageManager", mStorageManager);
|
||||
when(mStorageManager.isConvertibleToFBE()).thenReturn(true);
|
||||
mController.displayPreference(mPreferenceScreen);
|
||||
SystemProperties.set(FILE_ENCRYPTION_PROPERTY_KEY, "file");
|
||||
CryptoProperties.type("file");
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
|
Reference in New Issue
Block a user