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

Commit 3aa61a29 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10722735 from 9a619fcc to udc-qpr1-release

Change-Id: Ie46643b769a1ca3c5c617a118f9acc66d4e22e66
parents 0979cee2 9a619fcc
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3181,7 +3181,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
     *                        visible
     */
    public void exitKeyguardAndFinishSurfaceBehindRemoteAnimation(boolean showKeyguard) {
        Log.d(TAG, "onKeyguardExitRemoteAnimationFinished");
        Log.d(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation");
        if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
            Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished showKeyguard=" + showKeyguard
                    + " surfaceAnimationRunning=" + mSurfaceBehindRemoteAnimationRunning
@@ -3196,6 +3196,13 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,

        // Post layout changes to the next frame, so we don't hang at the end of the animation.
        DejankUtils.postAfterTraversal(() -> {
            if (!mPM.isInteractive()) {
                Log.e(TAG, "exitKeyguardAndFinishSurfaceBehindRemoteAnimation#postAfterTraversal" +
                        "Not interactive after traversal. Don't hide the keyguard. This means we " +
                        "re-locked the device during unlock.");
                return;
            }

            onKeyguardExitFinished();

            if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) {
+1 −2
Original line number Diff line number Diff line
@@ -207,6 +207,7 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
        mSystemClock = new FakeSystemClock();
        when(mLockPatternUtils.getDevicePolicyManager()).thenReturn(mDevicePolicyManager);
        when(mPowerManager.newWakeLock(anyInt(), any())).thenReturn(mock(WakeLock.class));
        when(mPowerManager.isInteractive()).thenReturn(true);
        when(mInteractionJankMonitor.begin(any(), anyInt())).thenReturn(true);
        when(mInteractionJankMonitor.end(anyInt())).thenReturn(true);
        mContext.addMockSystemService(Context.ALARM_SERVICE, mAlarmManager);
@@ -821,8 +822,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase {
        when(mKeyguardStateController.isShowing()).thenReturn(true);
        TestableLooper.get(this).processAllMessages();

        when(mPowerManager.isInteractive()).thenReturn(true);

        mViewMediator.onSystemReady();
        TestableLooper.get(this).processAllMessages();

+5 −0
Original line number Diff line number Diff line
@@ -90,6 +90,11 @@ public class AuthenticationStats {
        mRejectedAttempts = 0;
    }

    /** Update enrollment notification counter after sending a notification. */
    public void updateNotificationCounter() {
        mEnrollmentNotifications++;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
+4 −1
Original line number Diff line number Diff line
@@ -121,10 +121,11 @@ public class AuthenticationStatsCollector {

        authenticationStats.authenticate(authenticated);

        sendNotificationIfNeeded(userId);

        if (mPersisterInitialized) {
            persistDataIfNeeded(userId);
        }
        sendNotificationIfNeeded(userId);
    }

    /** Check if a notification should be sent after a calculation cycle. */
@@ -164,8 +165,10 @@ public class AuthenticationStatsCollector {
        }
        if (hasEnrolledFace && !hasEnrolledFingerprint) {
            mBiometricNotification.sendFpEnrollNotification(mContext);
            authenticationStats.updateNotificationCounter();
        } else if (!hasEnrolledFace && hasEnrolledFingerprint) {
            mBiometricNotification.sendFaceEnrollNotification(mContext);
            authenticationStats.updateNotificationCounter();
        }
    }

+0 −4
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ public class BiometricNotificationUtils {

        final Intent intent = new Intent(FACE_ENROLL_ACTION);
        intent.setPackage(SETTINGS_PACKAGE);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);

        final PendingIntent pendingIntent = PendingIntent.getActivityAsUser(context,
                0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE /* flags */,
@@ -120,8 +118,6 @@ public class BiometricNotificationUtils {

        final Intent intent = new Intent(FINGERPRINT_ENROLL_ACTION);
        intent.setPackage(SETTINGS_PACKAGE);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);

        final PendingIntent pendingIntent = PendingIntent.getActivityAsUser(context,
                0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE /* flags */,
Loading