Only reinflate if primary auth.
Do not reinflate for sim in on userswitched. When phone is restarted,
for whatever reason, this onuserSwitched callback is invoked causing the
view to be reinflated. This is causing the simpincontroller to use the
subid -1 as its primary subid. We asynchronously get the subid when the
sim state changes.
Fixes: 302024939
Test: Open sim screen and auth locked sim card
Change-Id: Ic5974668fe15149b432525b325bf02ff06871028
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
index e9dd08c..af46801 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
@@ -163,7 +163,10 @@
}
mCurrentUser = KeyguardUpdateMonitor.getCurrentUser();
showPrimarySecurityScreen(false);
- reinflateViewFlipper((l) -> {});
+ if (mCurrentSecurityMode != SecurityMode.SimPin
+ && mCurrentSecurityMode != SecurityMode.SimPuk) {
+ reinflateViewFlipper((l) -> {});
+ }
}
};