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

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

Merge "DOn't save encryption settings when not encrypted" into mnc-dev

parents ce27996c 688af6c5
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -1097,9 +1097,12 @@ public class LockPatternUtils {
            Log.w(TAG, "Only device owner may call setCredentialRequiredForDecrypt()");
            Log.w(TAG, "Only device owner may call setCredentialRequiredForDecrypt()");
            return;
            return;
        }
        }

        if (isDeviceEncryptionEnabled()){
            Settings.Global.putInt(mContext.getContentResolver(),
            Settings.Global.putInt(mContext.getContentResolver(),
               Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0);
               Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0);
        }
        }
    }


    private boolean isDoNotAskCredentialsOnBootSet() {
    private boolean isDoNotAskCredentialsOnBootSet() {
        return mDevicePolicyManager.getDoNotAskCredentialsOnBoot();
        return mDevicePolicyManager.getDoNotAskCredentialsOnBoot();