Revert "Reset SIM state if the subscription/slot is no longer active."

This reverts commit 3e7c7ca8e4.

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
This commit is contained in:
Richard Chou
2018-04-23 03:40:05 +00:00
parent 3e7c7ca8e4
commit 700dd5c659

View 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);
}