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

Commit f53f45e0 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "AOD: Block when fingerprint is already authenticated but waiting for...

Merge "AOD: Block when fingerprint is already authenticated but waiting for goingToSleep to complete" into oc-dr1-dev
am: eacef7a0

Change-Id: I8e29473caf7c1cbef065909b0b40212b82648a95
parents f627f51b eacef7a0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ public interface DozeHost {
    boolean isPowerSaveActive();
    boolean isPulsingBlocked();
    boolean isProvisioned();
    boolean isBlockingDoze();

    void startPendingIntentDismissingKeyguard(PendingIntent intent);
    void abortPulsing();
+1 −0
Original line number Diff line number Diff line
@@ -209,6 +209,7 @@ public class DozeTriggers implements DozeMachine.Part {
    private void checkTriggersAtInit() {
        if (mUiModeManager.getCurrentModeType() == Configuration.UI_MODE_TYPE_CAR
                || mDozeHost.isPowerSaveActive()
                || mDozeHost.isBlockingDoze()
                || !mDozeHost.isProvisioned()) {
            mMachine.requestState(DozeMachine.State.FINISH);
        }
+6 −0
Original line number Diff line number Diff line
@@ -269,6 +269,12 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
        Trace.endSection();
    }

    public boolean hasPendingAuthentication() {
        return mPendingAuthenticatedUserId != -1
                && mUpdateMonitor.isUnlockingWithFingerprintAllowed()
                && mPendingAuthenticatedUserId == KeyguardUpdateMonitor.getCurrentUser();
    }

    public int getMode() {
        return mMode;
    }
+9 −0
Original line number Diff line number Diff line
@@ -5400,6 +5400,15 @@ public class StatusBar extends SystemUI implements DemoMode,
                    && mDeviceProvisionedController.isCurrentUserSetup();
        }

        @Override
        public boolean isBlockingDoze() {
            if (mFingerprintUnlockController.hasPendingAuthentication()) {
                Log.i(TAG, "Blocking AOD because fingerprint has authenticated");
                return true;
            }
            return false;
        }

        @Override
        public void startPendingIntentDismissingKeyguard(PendingIntent intent) {
            StatusBar.this.startPendingIntentDismissingKeyguard(intent);
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,11 @@ class DozeHostFake implements DozeHost {
        return false;
    }

    @Override
    public boolean isBlockingDoze() {
        return false;
    }

    @Override
    public void startPendingIntentDismissingKeyguard(PendingIntent intent) {
        throw new RuntimeException("not implemented");