Fix NPE in InteractionJankMonitor.

- KeyguardSecurityViewFlipper.getSecurityView() can return null.

Bug: 178711695
Test: atest CarDevicePolicyManagerTest
Change-Id: I7b1759437f00a901195c6c2a9028b7ca5f1c0b07
This commit is contained in:
Yuncheol Heo
2021-01-28 09:42:33 -08:00
parent ecb4816ed5
commit b373cd0103

View File

@@ -395,7 +395,9 @@ public class KeyguardSecurityContainer extends FrameLayout {
}
private void beginJankInstrument(int cuj) {
InteractionJankMonitor.getInstance().begin(mSecurityViewFlipper.getSecurityView(), cuj);
KeyguardInputView securityView = mSecurityViewFlipper.getSecurityView();
if (securityView == null) return;
InteractionJankMonitor.getInstance().begin(securityView, cuj);
}
private void endJankInstrument(int cuj) {