Merge "Revert "Reset SIM state if the subscription/slot is no longer active."" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d60e8836f3
@@ -1850,7 +1850,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
final TelephonyManager tele = TelephonyManager.from(mContext);
|
final TelephonyManager tele = TelephonyManager.from(mContext);
|
||||||
ArrayList<Integer> changedSubscriptionIds = new ArrayList<>();
|
ArrayList<Integer> changedSubscriptionIds = new ArrayList<>();
|
||||||
HashSet<Integer> activeSubIds = new HashSet<>();
|
HashSet<Integer> activeSubIds = new HashSet<>();
|
||||||
HashSet<Integer> activeSlotIds = new HashSet<>();
|
|
||||||
|
|
||||||
for (SubscriptionInfo info : activeSubscriptionInfos) {
|
for (SubscriptionInfo info : activeSubscriptionInfos) {
|
||||||
int subId = info.getSubscriptionId();
|
int subId = info.getSubscriptionId();
|
||||||
@@ -1879,15 +1878,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
activeSubIds.add(subId);
|
activeSubIds.add(subId);
|
||||||
activeSlotIds.add(slotId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (SimData data : mSimDatas.values()) {
|
for (SimData data : mSimDatas.values()) {
|
||||||
if (!activeSubIds.contains(data.subId)
|
if (!activeSubIds.contains(data.subId) && data.simState != State.ABSENT) {
|
||||||
&& !activeSlotIds.contains(data.slotId)
|
|
||||||
&& data.simState != State.ABSENT) {
|
|
||||||
// for the inactive subscriptions, reset state to 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;
|
data.simState = State.ABSENT;
|
||||||
changedSubscriptionIds.add(data.subId);
|
changedSubscriptionIds.add(data.subId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user