Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ca47e2c authored by Paul Lawrence's avatar Paul Lawrence Committed by Android (Google) Code Review
Browse files

Merge "Don't show secure startup options and strings when file encrypted" into nyc-dev

parents 856e72d3 23c2acfd
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.os.Bundle;
import android.os.Process;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
import android.security.KeyStore;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
@@ -481,7 +482,13 @@ public class ChooseLockGeneric extends SettingsActivity {
        }

        private void updatePreferenceSummaryIfNeeded() {
            if (LockPatternUtils.isDeviceEncrypted()) {
            // On a default block encrypted device with accessibility, add a warning
            // that your data is not credential encrypted
            if (!StorageManager.isBlockEncrypted()) {
                return;
            }

            if (StorageManager.isNonDefaultBlockEncrypted()) {
                return;
            }

+2 −1
Original line number Diff line number Diff line
@@ -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();
        }