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

Commit 14f93277 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Add extra logs for debugging unexpected persistent unlock msg" into main

parents 3cec4a19 d60e4dad
Loading
Loading
Loading
Loading
+20 −0
Original line number Original line Diff line number Diff line
@@ -97,6 +97,26 @@ constructor(
        )
        )
    }
    }


    fun logUpdateLockScreenUserLockedMsg(
        userId: Int,
        userUnlocked: Boolean,
        encryptedOrLockdown: Boolean,
    ) {
        buffer.log(
            KeyguardIndicationController.TAG,
            LogLevel.DEBUG,
            {
                int1 = userId
                bool1 = userUnlocked
                bool2 = encryptedOrLockdown
            },
            {
                "updateLockScreenUserLockedMsg userId=$int1 " +
                    "userUnlocked:$bool1 encryptedOrLockdown:$bool2"
            }
        )
    }

    fun logUpdateBatteryIndication(
    fun logUpdateBatteryIndication(
        powerIndication: String,
        powerIndication: String,
        pluggedIn: Boolean,
        pluggedIn: Boolean,
+4 −2
Original line number Original line Diff line number Diff line
@@ -591,8 +591,10 @@ public class KeyguardIndicationController {
    }
    }


    private void updateLockScreenUserLockedMsg(int userId) {
    private void updateLockScreenUserLockedMsg(int userId) {
        if (!mKeyguardUpdateMonitor.isUserUnlocked(userId)
        boolean userUnlocked = mKeyguardUpdateMonitor.isUserUnlocked(userId);
                || mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId)) {
        boolean encryptedOrLockdown = mKeyguardUpdateMonitor.isEncryptedOrLockdown(userId);
        mKeyguardLogger.logUpdateLockScreenUserLockedMsg(userId, userUnlocked, encryptedOrLockdown);
        if (!userUnlocked || encryptedOrLockdown) {
            mRotateTextViewController.updateIndication(
            mRotateTextViewController.updateIndication(
                    INDICATION_TYPE_USER_LOCKED,
                    INDICATION_TYPE_USER_LOCKED,
                    new KeyguardIndication.Builder()
                    new KeyguardIndication.Builder()