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

Commit 55fe056d authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Don't apply encryption password requirements for secondary users" into klp-dev

parents 239c79c8 12411fba
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.UserInfo;
import android.os.Bundle;
import android.os.Process;
import android.os.UserHandle;
import android.os.UserManager;
import android.preference.Preference;
import android.preference.PreferenceActivity;
@@ -255,6 +257,8 @@ public class ChooseLockGeneric extends PreferenceActivity {
         * appropriately.)
         */
        private int upgradeQualityForEncryption(int quality) {
            // Don't upgrade quality for secondary users. Encryption requirements don't apply.
            if (Process.myUserHandle() != UserHandle.OWNER) return quality;
            int encryptionStatus = mDPM.getStorageEncryptionStatus();
            boolean encrypted = (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE)
                    || (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING);