Fix malformed trace section
In some scenarios, the trace section
KeyguardViewMediator#handleKeyguardDone would never close.
Test: Capture perfetto trace, inspect trace to verify all slices end
Flag: EXEMPT system tracing only
Change-Id: Ic75a0bbf8efb0f2b045a96a7b4a0896a2451fc90
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 1ea5d1c..fe81b20c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -2722,13 +2722,13 @@
if (mGoingToSleep) {
mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
Log.i(TAG, "Device is going to sleep, aborting keyguardDone");
- return;
- }
- setPendingLock(false); // user may have authenticated during the screen off animation
+ } else {
+ setPendingLock(false); // user may have authenticated during the screen off animation
- handleHide();
- mKeyguardInteractor.keyguardDoneAnimationsFinished();
- mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
+ handleHide();
+ mKeyguardInteractor.keyguardDoneAnimationsFinished();
+ mUpdateMonitor.clearFingerprintRecognizedWhenKeyguardDone(currentUser);
+ }
Trace.endSection();
}