mirror of
https://github.com/openharmony/telephony_ril_adapter.git
synced 2026-07-01 00:08:15 -04:00
@@ -194,6 +194,7 @@ inline constexpr const char *HRIL_VIRTUAL_MODEM_SWITCH = "const.booster.virtual_
|
||||
inline constexpr const char *HRIL_VIRTUAL_MODEM_DEFAULT_SWITCH = "false";
|
||||
inline constexpr const char *HRIL_DEFAULT_VSIM_MODEM_COUNT = "0";
|
||||
inline constexpr const char *HRIL_VSIM_MODEM_COUNT_STR = "const.telephony.vsimModemCount";
|
||||
inline constexpr const char *DISTRIBUTE_MODEM_MULTIDEVICE_ENABLE = "persist.distributedmodem.multidevice.enable";
|
||||
|
||||
/** Interface token */
|
||||
inline const std::u16string HRIL_INTERFACE_TOKEN = u"ohos.telephony.hril";
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace OHOS {
|
||||
namespace Telephony {
|
||||
inline const int32_t DUAL_SLOT_COUNT = 2;
|
||||
inline const int32_t MAX_SLOT_COUNT = 3;
|
||||
inline const int32_t DC_MD_MAX_SLOT_COUNT = 8;
|
||||
|
||||
typedef enum : int32_t {
|
||||
RIL_REGISTER_IS_NONE = 0,
|
||||
|
||||
@@ -1137,6 +1137,13 @@ int32_t GetSimSlotCount()
|
||||
(vSimModemCountNumber == MAX_SLOT_COUNT || vSimModemCountNumber == DUAL_SLOT_COUNT)) {
|
||||
simSlotCountNumber = MAX_SLOT_COUNT;
|
||||
}
|
||||
|
||||
char multiDeviceEnable[HRIL_SYSPARA_SIZE] = {0};
|
||||
GetParameter(DISTRIBUTE_MODEM_MULTIDEVICE_ENABLE, "false", multiDeviceEnable, HRIL_SYSPARA_SIZE);
|
||||
if (strcmp(multiDeviceEnable, "true") == 0) {
|
||||
simSlotCountNumber = DC_MD_MAX_SLOT_COUNT;
|
||||
}
|
||||
|
||||
TELEPHONY_LOGI("GetSimSlotCount, %{public}d", simSlotCountNumber);
|
||||
return simSlotCountNumber;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user