Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25451088 authored by Michael W's avatar Michael W
Browse files

Telephony: Fix "Keep preferred SMS Sim"

* Instead of checking the size of an array which is still populating (and
  on registering the first sim will obviously return a size of 1), check
  the actual sim count before resetting the user preference
* This fixes the problem that the default SIM for SMS is set to sim1 after
  each reboot

Change-Id: Ia065f2dbbd9d1b824c921fd5d2052b5eb6313aff
parent cc70a318
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -838,7 +838,7 @@ public class SubscriptionController extends ISub.Stub {
            }

            // Reset user choice for defaultSmsSubId in case only one Sim is inserted
            if (sSlotIdxToSubId.size() == 1) {
            if (getActiveSubInfoCountMax() == 1) {
                Rlog.i(LOG_TAG, "Only one SIM found, resetting user preferred SMS sub");
                mUserPreferredSmsSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
            }