Merge "Revert "Reset SIM state if the subscription/slot is no longer active."" into pi-dev
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index c826aaa..1bab36b 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -1850,7 +1850,6 @@
         final TelephonyManager tele = TelephonyManager.from(mContext);
         ArrayList<Integer> changedSubscriptionIds = new ArrayList<>();
         HashSet<Integer> activeSubIds = new HashSet<>();
-        HashSet<Integer> activeSlotIds = new HashSet<>();
 
         for (SubscriptionInfo info : activeSubscriptionInfos) {
             int subId = info.getSubscriptionId();
@@ -1879,15 +1878,11 @@
             }
 
             activeSubIds.add(subId);
-            activeSlotIds.add(slotId);
         }
 
         for (SimData data : mSimDatas.values()) {
-            if (!activeSubIds.contains(data.subId)
-                && !activeSlotIds.contains(data.slotId)
-                && data.simState != State.ABSENT) {
+            if (!activeSubIds.contains(data.subId) && data.simState != State.ABSENT) {
                 // for the inactive subscriptions, reset state to ABSENT
-                if (DEBUG_SIM_STATES) Log.d(TAG, "reset state to ABSENT for subId:" + data.subId);
                 data.simState = State.ABSENT;
                 changedSubscriptionIds.add(data.subId);
             }