Don't show secure startup options and strings when file encrypted
File encryption is secure by default, so we don't need to warn. Bug: 27433949 Bug: 27435082 Change-Id: I3e856256188e6a7dcd58cabbde043395c314999e
This commit is contained in:
@@ -36,6 +36,7 @@ import android.os.Bundle;
|
||||
import android.os.PersistableBundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
import android.security.KeyStore;
|
||||
@@ -1054,7 +1055,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
DevicePolicyManager dpm = context.getSystemService(DevicePolicyManager.class);
|
||||
return UserManager.get(context).isAdminUser()
|
||||
&& UserManager.get(context).isPrimaryUser()
|
||||
&& LockPatternUtils.isDeviceEncryptionEnabled()
|
||||
&& StorageManager.isBlockEncrypted()
|
||||
&& !dpm.getDoNotAskCredentialsOnBoot();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user