扩展slotId

Signed-off-by: wangmengyao (I) <wangmengyao17@huawei.com>
This commit is contained in:
wangmengyao (I)
2026-05-25 22:45:16 +08:00
parent bd1ad3df77
commit ce490e73c2
3 changed files with 9 additions and 0 deletions
@@ -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";
+1
View File
@@ -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,
+7
View File
@@ -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;
}