OSDN Git Service

Revert "Reset SIM state if the subscription/slot is no longer active."
authorRichard Chou <richardchou@google.com>
Mon, 23 Apr 2018 03:40:05 +0000 (03:40 +0000)
committerRichard Chou <richardchou@google.com>
Tue, 24 Apr 2018 04:05:15 +0000 (04:05 +0000)
This reverts commit 3e7c7ca8e4faed7d0377258ec1fdd43e07083316.

Reason for revert: This commit will cause side effects with Project Fi. It'd be too risky to solve this issue at the current stage of Android P. Revert first.

Bug: 77579824
Bug: 77702165
Change-Id: I404cd5b4413ba95a26aabb5da55c565a37f06e7e

packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java

index c826aaa..1bab36b 100644 (file)
@@ -1850,7 +1850,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
         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 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
             }
 
             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);
             }