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

Commit d60e4dad authored by Beverly's avatar Beverly
Browse files

Add extra logs for debugging unexpected persistent unlock msg

Test: manual, builds
Flag: none
Bug: 304000950
Change-Id: I669dcf7fb7ad1a70a302280d9d927f406ff1aaf8
parent b5fe0125
Loading
Loading
Loading
Loading
+20 −0
Original line number 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(
        powerIndication: String,
        pluggedIn: Boolean,
+4 −2
Original line number Diff line number Diff line
@@ -591,8 +591,10 @@ public class KeyguardIndicationController {
    }

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