Improve getModemActivityInfo API

Add optional fields to allow modem to report activity information
of different technologies

Bug: 202413770
Test: m android.hardware.radio.modem-update-api

Change-Id: I3bb76c030222868ce881487fb17692a476c5f846
diff --git a/radio/aidl/compat/libradiocompat/modem/structs.cpp b/radio/aidl/compat/libradiocompat/modem/structs.cpp
index c1cd64c..53d5753 100644
--- a/radio/aidl/compat/libradiocompat/modem/structs.cpp
+++ b/radio/aidl/compat/libradiocompat/modem/structs.cpp
@@ -24,6 +24,7 @@
 
 namespace android::hardware::radio::compat {
 
+using ::aidl::android::hardware::radio::AccessNetwork;
 using ::aidl::android::hardware::radio::RadioAccessFamily;
 using ::aidl::android::hardware::radio::RadioTechnology;
 namespace aidl = ::aidl::android::hardware::radio::modem;
@@ -82,11 +83,18 @@
 }
 
 aidl::ActivityStatsInfo toAidl(const V1_0::ActivityStatsInfo& info) {
+    const aidl::ActivityStatsTechSpecificInfo techSpecificInfo = {
+            .rat = AccessNetwork(AccessNetwork::UNKNOWN),
+            .frequencyRange = static_cast<int32_t>(
+                    aidl::ActivityStatsTechSpecificInfo::FREQUENCY_RANGE_UNKNOWN),
+            .txmModetimeMs = toAidl(info.txmModetimeMs),
+            .rxModeTimeMs = static_cast<int32_t>(info.rxModeTimeMs),
+    };
+
     return {
             .sleepModeTimeMs = static_cast<int32_t>(info.sleepModeTimeMs),
             .idleModeTimeMs = static_cast<int32_t>(info.idleModeTimeMs),
-            .txmModetimeMs = toAidl(info.txmModetimeMs),
-            .rxModeTimeMs = static_cast<int32_t>(info.rxModeTimeMs),
+            .techSpecificInfo = {techSpecificInfo},
     };
 }
 
diff --git a/radio/aidl/compat/libradiocompat/modem/structs.h b/radio/aidl/compat/libradiocompat/modem/structs.h
index 3ac1edb..af714c7 100644
--- a/radio/aidl/compat/libradiocompat/modem/structs.h
+++ b/radio/aidl/compat/libradiocompat/modem/structs.h
@@ -16,6 +16,7 @@
 #pragma once
 
 #include <aidl/android/hardware/radio/modem/ActivityStatsInfo.h>
+#include <aidl/android/hardware/radio/modem/ActivityStatsTechSpecificInfo.h>
 #include <aidl/android/hardware/radio/modem/HardwareConfig.h>
 #include <aidl/android/hardware/radio/modem/HardwareConfigModem.h>
 #include <aidl/android/hardware/radio/modem/HardwareConfigSim.h>