Merge "Add additonal logging around user switching in KeyguardUpdateMonitor" into udc-qpr-dev
This commit is contained in:
@@ -3563,6 +3563,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void handleUserSwitching(int userId, CountDownLatch latch) {
|
void handleUserSwitching(int userId, CountDownLatch latch) {
|
||||||
|
mLogger.logUserSwitching(userId, "from UserTracker");
|
||||||
Assert.isMainThread();
|
Assert.isMainThread();
|
||||||
clearBiometricRecognized();
|
clearBiometricRecognized();
|
||||||
boolean trustUsuallyManaged = mTrustManager.isTrustUsuallyManaged(userId);
|
boolean trustUsuallyManaged = mTrustManager.isTrustUsuallyManaged(userId);
|
||||||
@@ -3583,6 +3584,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
*/
|
*/
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
void handleUserSwitchComplete(int userId) {
|
void handleUserSwitchComplete(int userId) {
|
||||||
|
mLogger.logUserSwitchComplete(userId, "from UserTracker");
|
||||||
Assert.isMainThread();
|
Assert.isMainThread();
|
||||||
for (int i = 0; i < mCallbacks.size(); i++) {
|
for (int i = 0; i < mCallbacks.size(); i++) {
|
||||||
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
|
||||||
@@ -4036,6 +4038,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
|
|||||||
|
|
||||||
@AnyThread
|
@AnyThread
|
||||||
public void setSwitchingUser(boolean switching) {
|
public void setSwitchingUser(boolean switching) {
|
||||||
|
if (switching) {
|
||||||
|
mLogger.logUserSwitching(getCurrentUser(), "from setSwitchingUser");
|
||||||
|
} else {
|
||||||
|
mLogger.logUserSwitchComplete(getCurrentUser(), "from setSwitchingUser");
|
||||||
|
}
|
||||||
mSwitchingUser = switching;
|
mSwitchingUser = switching;
|
||||||
// Since this comes in on a binder thread, we need to post it first
|
// Since this comes in on a binder thread, we need to post it first
|
||||||
mHandler.post(() -> updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE,
|
mHandler.post(() -> updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE,
|
||||||
|
|||||||
@@ -602,10 +602,10 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) {
|
|||||||
|
|
||||||
fun allowFingerprintOnCurrentOccludingActivityChanged(allow: Boolean) {
|
fun allowFingerprintOnCurrentOccludingActivityChanged(allow: Boolean) {
|
||||||
logBuffer.log(
|
logBuffer.log(
|
||||||
TAG,
|
TAG,
|
||||||
VERBOSE,
|
VERBOSE,
|
||||||
{ bool1 = allow },
|
{ bool1 = allow },
|
||||||
{ "allowFingerprintOnCurrentOccludingActivityChanged: $bool1" }
|
{ "allowFingerprintOnCurrentOccludingActivityChanged: $bool1" }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -727,4 +727,28 @@ constructor(@KeyguardUpdateMonitorLog private val logBuffer: LogBuffer) {
|
|||||||
{ "notifying about enrollments changed: $str1" }
|
{ "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" }
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user