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

Commit 107d9935 authored by cretin45's avatar cretin45 Committed by Gerrit Code Review
Browse files

Settings: Don't allow disabling slot 1

If config_disableAltAlwaysSmsCallSimPref is true, remove the pref to turn off slot 1.

Change-Id: Ic45f2b0ddfbcb528ccc9fe266fa22ea0b2bf8c8e
parent 6d8cc2c6
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -237,9 +237,14 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
        for (int i = 0; i < mNumSlots; ++i) {
            final SubInfoRecord sir = findRecordBySlotId(i);
            if (mNumSlots > 1) {
                mSimEnablers.add(i, new MultiSimEnablerPreference(
                        getActivity(), sir, mHandler, i));
                simEnablers.addPreference(mSimEnablers.get(i));
                MultiSimEnablerPreference multiSimEnablerPreference =
                        new MultiSimEnablerPreference(getActivity(), sir, mHandler, sir.slotId);
                if (!getResources()
                        .getBoolean(R.bool.config_disableAltAlwaysSmsCallSimPref)
                        || sir.slotId > 0) {
                    mSimEnablers.add(multiSimEnablerPreference);
                    simEnablers.addPreference(multiSimEnablerPreference);
                }
            } else {
                removePreference(SIM_ENABLER_CATEGORY);
            }