diff options
| author | 2023-07-27 04:35:47 +0000 | |
|---|---|---|
| committer | 2023-07-27 04:35:47 +0000 | |
| commit | 9ed6c4f9a406844ecef8753972f9babf03af8dcb (patch) | |
| tree | 082733e162d83f4ca942f143dbf5c708fb697dd4 | |
| parent | c31978655df7d1025ca58c3b7447949acf7a35cd (diff) | |
| parent | be484fd5a98e0f8c8c3b884b4645ac5acf23b496 (diff) | |
Merge "Add additonal logging around user switching in KeyguardUpdateMonitor" into udc-qpr-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java | 7 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt | 32 |
2 files changed, 35 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index f1cb37c0ae76..53229b9945a5 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -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, diff --git a/packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt b/packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt index eec5b3ed8ef4..c26e546769e3 100644 --- a/packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt +++ b/packages/SystemUI/src/com/android/keyguard/logging/KeyguardUpdateMonitorLogger.kt @@ -602,10 +602,10 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) { fun allowFingerprintOnCurrentOccludingActivityChanged(allow: Boolean) { logBuffer.log( - TAG, - VERBOSE, - { bool1 = allow }, - { "allowFingerprintOnCurrentOccludingActivityChanged: $bool1" } + TAG, + VERBOSE, + { bool1 = allow }, + { "allowFingerprintOnCurrentOccludingActivityChanged: $bool1" } ) } @@ -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" } + ) + } } |