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

Commit f7a9a31b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Fix bouncer race condition" into rvc-dev am: 837f5ea6 am: 08b56009

Change-Id: Ie769f68bf1eb2846f1735407512a227bd93aa1e2
parents 4b2a47bd 08b56009
Loading
Loading
Loading
Loading
+6 −8
Original line number Original line Diff line number Diff line
@@ -19,7 +19,9 @@ import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL;
import static android.view.ViewRootImpl.sNewInsetsMode;
import static android.view.ViewRootImpl.sNewInsetsMode;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowInsets.Type.ime;
import static android.view.WindowInsets.Type.systemBars;
import static android.view.WindowInsets.Type.systemBars;

import static com.android.systemui.DejankUtils.whitelistIpcs;
import static com.android.systemui.DejankUtils.whitelistIpcs;

import static java.lang.Integer.max;
import static java.lang.Integer.max;


import android.app.Activity;
import android.app.Activity;
@@ -28,7 +30,6 @@ import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.ColorStateList;
import android.graphics.Rect;
import android.metrics.LogMaker;
import android.metrics.LogMaker;
import android.os.Handler;
import android.os.Handler;
import android.os.Looper;
import android.os.Looper;
@@ -511,6 +512,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
        boolean finish = false;
        boolean finish = false;
        boolean strongAuth = false;
        boolean strongAuth = false;
        int eventSubtype = -1;
        int eventSubtype = -1;
        mCurrentSecuritySelection = whitelistIpcs(() ->
                mSecurityModel.getSecurityMode(targetUserId));
        if (mUpdateMonitor.getUserHasTrust(targetUserId)) {
        if (mUpdateMonitor.getUserHasTrust(targetUserId)) {
            finish = true;
            finish = true;
            eventSubtype = BOUNCER_DISMISS_EXTENDED_ACCESS;
            eventSubtype = BOUNCER_DISMISS_EXTENDED_ACCESS;
@@ -518,13 +521,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
            finish = true;
            finish = true;
            eventSubtype = BOUNCER_DISMISS_BIOMETRIC;
            eventSubtype = BOUNCER_DISMISS_BIOMETRIC;
        } else if (SecurityMode.None == mCurrentSecuritySelection) {
        } else if (SecurityMode.None == mCurrentSecuritySelection) {
            SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId);
            if (SecurityMode.None == securityMode) {
            finish = true; // no security required
            finish = true; // no security required
            eventSubtype = BOUNCER_DISMISS_NONE_SECURITY;
            eventSubtype = BOUNCER_DISMISS_NONE_SECURITY;
            } else {
                showSecurityScreen(securityMode); // switch to the alternate security view
            }
        } else if (authenticated) {
        } else if (authenticated) {
            switch (mCurrentSecuritySelection) {
            switch (mCurrentSecuritySelection) {
                case Pattern:
                case Pattern: