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

Commit 57571848 authored by cretin45's avatar cretin45
Browse files

Settings: Add config for not allowing calls/sms being set to > slot 1

This is a requirement of a vendor. The default is false.

Change-Id: If3e0755c4ba3d33e3ac2d331182bc740688b8a23
parent d19418ec
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -87,4 +87,7 @@
    <!-- Display ro.product.name above Device model -->
    <bool name="config_displayDeviceName">false</bool>

    <!-- Some vendors don't want to allow non slot 0 to be set to default for calls/sms -->
    <bool name="config_disableAltAlwaysSmsCallSimPref">false</bool>

</resources>
+4 −0
Original line number Diff line number Diff line
@@ -449,6 +449,10 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
        for (int i = 0; i < subAvailableSize; ++i) {
            final SubInfoRecord sir = mAvailableSubInfos.get(i);
            if(sir != null){
                if (i > 0 && (keyPref.equals(KEY_CALLS) || keyPref.equals(KEY_SMS)) &&
                        getResources().getBoolean(R.bool.config_disableAltAlwaysSmsCallSimPref)) {
                    continue;
                }
                simPref.addItem(sir.displayName + " - " + Integer.toString(i+1), sir);
            }
        }