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

Commit 1ffd4a9b authored by Ethan Chen's avatar Ethan Chen
Browse files

Use default subscription's slot ID when showing SIM status

* Don't default to slot 0 all the time, on multi-SIM devices, it is
  possible there is a single SIM in slot 1 instead.

REF: CYNGNOS-932
Change-Id: I6fe828411a593f699a375f485665f920d2cddbc5
parent d87a8d6e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -138,7 +138,12 @@ public class SimStatus extends PreferenceActivity {
        // Note - missing in zaku build, be careful later...
        mSignalStrength = findPreference(KEY_SIGNAL_STRENGTH);

        int slotId = getIntent().getIntExtra(EXTRA_SLOT_ID, 0);
        int defaultSlotId = SubscriptionManager.getSlotId(SubscriptionManager.getDefaultSubId());
        if (!SubscriptionManager.isValidSlotId(defaultSlotId)) {
            defaultSlotId = 0;
        }

        int slotId = getIntent().getIntExtra(EXTRA_SLOT_ID, defaultSlotId);
        mSir = Utils.findRecordBySlotId(this, slotId);

        updatePhoneInfos();