Use StorageManager.isFileEncrypted() instead of deprecated methods
Since emulated FBE is no longer supported, isFileEncryptedNativeOnly() and isFileEncryptedNativeOrEmulated() are the same as the new method isFileEncrypted(). Replace all calls to these deprecated methods in this repository with isFileEncrypted(). Bug: 232458753 Change-Id: I95beea86ef771396c2e08f2d6a643fdc629ad89f
This commit is contained in:
@@ -131,7 +131,7 @@ public class BiometricUtils {
|
||||
if (WizardManagerHelper.isAnySetupWizard(activityIntent)) {
|
||||
// Default to PIN lock in setup wizard
|
||||
Intent intent = new Intent(context, SetupChooseLockGeneric.class);
|
||||
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
|
||||
if (StorageManager.isFileEncrypted()) {
|
||||
intent.putExtra(
|
||||
LockPatternUtils.PASSWORD_TYPE_KEY,
|
||||
DevicePolicyManager.PASSWORD_QUALITY_NUMERIC);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class StorageWizardMigrateConfirm extends StorageWizardBase {
|
||||
@Override
|
||||
public void onNavigateNext(View view) {
|
||||
// Ensure that all users are unlocked so that we can move their data
|
||||
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
|
||||
if (StorageManager.isFileEncrypted()) {
|
||||
for (UserInfo user : getSystemService(UserManager.class).getUsers()) {
|
||||
if (!StorageManager.isUserKeyUnlocked(user.id)) {
|
||||
Log.d(TAG, "User " + user.id + " is currently locked; requesting unlock");
|
||||
|
||||
@@ -79,7 +79,7 @@ public class StorageWizardMoveConfirm extends StorageWizardBase {
|
||||
@Override
|
||||
public void onNavigateNext(View view) {
|
||||
// Ensure that all users are unlocked so that we can move their data
|
||||
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
|
||||
if (StorageManager.isFileEncrypted()) {
|
||||
for (UserInfo user : getSystemService(UserManager.class).getUsers()) {
|
||||
if (!StorageManager.isUserKeyUnlocked(user.id)) {
|
||||
Log.d(TAG, "User " + user.id + " is currently locked; requesting unlock");
|
||||
|
||||
@@ -587,7 +587,7 @@ public class ChooseLockGeneric extends SettingsActivity {
|
||||
void updatePreferencesOrFinish(boolean isRecreatingActivity) {
|
||||
Intent intent = getActivity().getIntent();
|
||||
int quality = -1;
|
||||
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
|
||||
if (StorageManager.isFileEncrypted()) {
|
||||
quality = intent.getIntExtra(LockPatternUtils.PASSWORD_TYPE_KEY, -1);
|
||||
} else {
|
||||
// For non-file encrypted devices we need to show encryption interstitial, so always
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ScreenLockPreferenceDetailsUtils {
|
||||
// able to complete the operation due to the lack of (old) encryption key.
|
||||
if (mProfileChallengeUserId != UserHandle.USER_NULL
|
||||
&& !mLockPatternUtils.isSeparateProfileChallengeEnabled(mProfileChallengeUserId)
|
||||
&& StorageManager.isFileEncryptedNativeOnly()) {
|
||||
&& StorageManager.isFileEncrypted()) {
|
||||
if (mUm.isQuietModeEnabled(UserHandle.of(mProfileChallengeUserId))) {
|
||||
return UnlaunchableAppActivity.createInQuietModeDialogIntent(
|
||||
mProfileChallengeUserId);
|
||||
|
||||
Reference in New Issue
Block a user