mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Port ID is always 0 for HIDL HAL.
Bug: 203699028 Test: Build and boot Cuttlefish Change-Id: Ie948537d63a68e1c9e6c99422b4868e86dee9de9
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
#include "debug.h"
|
||||
#include "structs.h"
|
||||
|
||||
#include "collections.h"
|
||||
|
||||
#define RADIO_MODULE "Config"
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
@@ -24,14 +24,11 @@ namespace android::hardware::radio::compat {
|
||||
|
||||
namespace aidl = ::aidl::android::hardware::radio::config;
|
||||
|
||||
hidl_vec<uint32_t> toHidl(const std::vector<aidl::SlotPortMapping>& slotMap) {
|
||||
hidl_vec<uint32_t> out(slotMap.size());
|
||||
for (const auto& el : slotMap) {
|
||||
CHECK_GE(el.portId, 0);
|
||||
CHECK_LT(static_cast<size_t>(el.portId), out.size());
|
||||
out[el.portId] = el.physicalSlotId;
|
||||
uint32_t toHidl(const aidl::SlotPortMapping& slotPortMapping) {
|
||||
if (slotPortMapping.portId != 0) {
|
||||
LOG(ERROR) << "Port ID " << slotPortMapping.portId << " != 0 not supported by HIDL HAL";
|
||||
}
|
||||
return out;
|
||||
return slotPortMapping.physicalSlotId;
|
||||
}
|
||||
|
||||
aidl::SimSlotStatus toAidl(const config::V1_0::SimSlotStatus& sst) {
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
hidl_vec<uint32_t> //
|
||||
toHidl(const std::vector<aidl::android::hardware::radio::config::SlotPortMapping>& slotMap);
|
||||
uint32_t toHidl(const aidl::android::hardware::radio::config::SlotPortMapping& slotPortMapping);
|
||||
|
||||
aidl::android::hardware::radio::config::SimSlotStatus //
|
||||
toAidl(const config::V1_0::SimSlotStatus& sst);
|
||||
|
||||
@@ -173,7 +173,6 @@ aidl::CardStatus toAidl(const V1_5::CardStatus& status) {
|
||||
.atr = status.base.base.atr,
|
||||
.iccid = status.base.base.iccid,
|
||||
.eid = status.base.eid,
|
||||
// TODO(b/203699028): we don't know portId here (but we can get it from RadioConfig)
|
||||
.slotMap = {static_cast<int32_t>(status.base.base.physicalSlotId), 0},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user