framework: SystemUI: add tracing to Keyguard
Helps trace the phone unlock path.
Bug: 29693568
Bug: 30279403
Change-Id: I290864f525e3d08f1efc6b9fc603172a5d139ea0
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
index a91cd51..7e92edf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockMethodCache.java
@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.phone;
import android.content.Context;
+import android.os.Trace;
import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
@@ -85,6 +86,7 @@
}
private void update(boolean updateAlways) {
+ Trace.beginSection("UnlockMethodCache#update");
int user = KeyguardUpdateMonitor.getCurrentUser();
boolean secure = mLockPatternUtils.isSecure(user);
boolean canSkipBouncer = !secure || mKeyguardUpdateMonitor.getUserCanSkipBouncer(user);
@@ -102,6 +104,7 @@
mFaceUnlockRunning = faceUnlockRunning;
notifyListeners();
}
+ Trace.endSection();
}
private void notifyListeners() {
@@ -133,10 +136,13 @@
@Override
public void onFingerprintAuthenticated(int userId) {
+ Trace.beginSection("KeyguardUpdateMonitorCallback#onFingerprintAuthenticated");
if (!mKeyguardUpdateMonitor.isUnlockingWithFingerprintAllowed()) {
+ Trace.endSection();
return;
}
update(false /* updateAlways */);
+ Trace.endSection();
}
@Override