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

Commit e4482156 authored by Chandru S's avatar Chandru S Committed by Automerger Merge Worker
Browse files

Merge "Add additonal logging around user switching in KeyguardUpdateMonitor"...

Merge "Add additonal logging around user switching in KeyguardUpdateMonitor" into udc-qpr-dev am: 9ed6c4f9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24200569



Change-Id: I21178e61802731c9920459ad750b222a29b29c38
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6ef2008a 9ed6c4f9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3563,6 +3563,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
     */
    @VisibleForTesting
    void handleUserSwitching(int userId, CountDownLatch latch) {
        mLogger.logUserSwitching(userId, "from UserTracker");
        Assert.isMainThread();
        clearBiometricRecognized();
        boolean trustUsuallyManaged = mTrustManager.isTrustUsuallyManaged(userId);
@@ -3583,6 +3584,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
     */
    @VisibleForTesting
    void handleUserSwitchComplete(int userId) {
        mLogger.logUserSwitchComplete(userId, "from UserTracker");
        Assert.isMainThread();
        for (int i = 0; i < mCallbacks.size(); i++) {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
@@ -4036,6 +4038,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab

    @AnyThread
    public void setSwitchingUser(boolean switching) {
        if (switching) {
            mLogger.logUserSwitching(getCurrentUser(), "from setSwitchingUser");
        } else {
            mLogger.logUserSwitchComplete(getCurrentUser(), "from setSwitchingUser");
        }
        mSwitchingUser = switching;
        // Since this comes in on a binder thread, we need to post it first
        mHandler.post(() -> updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE,
+28 −4
Original line number Diff line number Diff line
@@ -727,4 +727,28 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) {
            { "notifying about enrollments changed: $str1" }
        )
    }

    fun logUserSwitching(userId: Int, context: String) {
        logBuffer.log(
            TAG,
            DEBUG,
            {
                int1 = userId
                str1 = context
            },
            { "userCurrentlySwitching: $str1, userId: $int1" }
        )
    }

    fun logUserSwitchComplete(userId: Int, context: String) {
        logBuffer.log(
            TAG,
            DEBUG,
            {
                int1 = userId
                str1 = context
            },
            { "userSwitchComplete: $str1, userId: $int1" }
        )
    }
}