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

Commit 93891686 authored by Adrian Roos's avatar Adrian Roos Committed by Android (Google) Code Review
Browse files

Merge "Remove leftover code causing trust agent issues"

parents e71a2be2 a4da9f6b
Loading
Loading
Loading
Loading
+5 −18
Original line number Original line Diff line number Diff line
@@ -371,24 +371,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    }
    }


    private boolean isTrustDisabled(int userId) {
    private boolean isTrustDisabled(int userId) {
        final DevicePolicyManager dpm =
                (DevicePolicyManager) mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
        if (dpm != null) {
                // TODO once UI is finalized
                final boolean disabledByGlobalActions = false;
                final boolean disabledBySettings = false;

        // Don't allow trust agent if device is secured with a SIM PIN. This is here
        // Don't allow trust agent if device is secured with a SIM PIN. This is here
        // mainly because there's no other way to prompt the user to enter their SIM PIN
        // mainly because there's no other way to prompt the user to enter their SIM PIN
        // once they get past the keyguard screen.
        // once they get past the keyguard screen.
        final boolean disabledBySimPin = isSimPinSecure();
        final boolean disabledBySimPin = isSimPinSecure();

        return disabledBySimPin;
                final boolean disabledByDpm = (dpm.getKeyguardDisabledFeatures(null, userId)
                        & DevicePolicyManager.KEYGUARD_DISABLE_TRUST_AGENTS) != 0;
                return disabledByDpm || disabledByGlobalActions || disabledBySettings
                        || disabledBySimPin;
        }
        return false;
    }
    }


    private boolean isFingerprintDisabled(int userId) {
    private boolean isFingerprintDisabled(int userId) {