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

Commit 09c12dd3 authored by Sandeep Gutta's avatar Sandeep Gutta Committed by Amit Mahajan
Browse files

Use System property to get the slot count

Use below System property to get the number of physical
SIM slots supported on device.

"ro.telephony.sim_slots.count"

Test: basic sanity
Bug: 111106008
Merged-in: Id0e286aa9327991f13adf36d95dd8a9c5227c53b
Change-Id: Id0e286aa9327991f13adf36d95dd8a9c5227c53b
(cherry picked from commit 4f0acfde)
parent c5957f33
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ import android.os.Message;
import android.os.Registrant;
import android.os.Registrant;
import android.os.RegistrantList;
import android.os.RegistrantList;
import android.preference.PreferenceManager;
import android.preference.PreferenceManager;
import android.sysprop.TelephonyProperties;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierConfigManager;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;
import android.telephony.UiccCardInfo;
import android.telephony.UiccCardInfo;
@@ -210,6 +211,7 @@ public class UiccController extends Handler {
        mCis = PhoneFactory.getCommandsInterfaces();
        mCis = PhoneFactory.getCommandsInterfaces();
        int numPhysicalSlots = c.getResources().getInteger(
        int numPhysicalSlots = c.getResources().getInteger(
                com.android.internal.R.integer.config_num_physical_slots);
                com.android.internal.R.integer.config_num_physical_slots);
        numPhysicalSlots = TelephonyProperties.sim_slots_count().orElse(numPhysicalSlots);
        if (DBG) {
        if (DBG) {
            logWithLocalLog("config_num_physical_slots = " + numPhysicalSlots);
            logWithLocalLog("config_num_physical_slots = " + numPhysicalSlots);
        }
        }