Receive forwarded number from Modem

Adds forwarded number to Call information

Update 1.6 HAL:
- Added Call
- Added getCurrentCalls_1_6
- Added getCurrentCallsResponse_1_6

Test: Build pass.
Bug: 29063067

Change-Id: I8e43439e5638b7820d156d8fc6fe963cf1edf6f0
diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal
index 2c8ac5e..929c624 100644
--- a/radio/1.6/IRadio.hal
+++ b/radio/1.6/IRadio.hal
@@ -406,4 +406,13 @@
      * Response function is IRadioResponse.getDataRegistrationStateResponse_1_6()
      */
     oneway getDataRegistrationState_1_6(int32_t serial);
+
+    /**
+     * Requests current call list
+     *
+     * @param serial Serial number of request.
+     *
+     * Response function is IRadioResponse.getCurrentCallsResponse_1_6()
+     */
+    oneway getCurrentCalls_1_6(int32_t serial);
 };
diff --git a/radio/1.6/IRadioResponse.hal b/radio/1.6/IRadioResponse.hal
index 3b2061f..0d27479 100644
--- a/radio/1.6/IRadioResponse.hal
+++ b/radio/1.6/IRadioResponse.hal
@@ -18,6 +18,7 @@
 
 import @1.0::SendSmsResult;
 import @1.5::IRadioResponse;
+import @1.6::Call;
 import @1.6::CellInfo;
 import @1.6::RegStateResult;
 import @1.6::RadioResponseInfo;
@@ -383,4 +384,16 @@
      */
     oneway getDataRegistrationStateResponse_1_6(RadioResponseInfo info,
             RegStateResult dataRegResponse);
+
+    /**
+     * @param calls Current call list
+     *   RadioError:NO_MEMORY
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:SYSTEM_ERR
+     *   RadioError:INVALID_ARGUMENTS
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:NO_RESOURCES
+     *   RadioError:CANCELLED
+     */
+    oneway getCurrentCallsResponse_1_6(RadioResponseInfo info, vec<Call> calls);
 };
diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal
index 20dc612..f4dc0bd 100644
--- a/radio/1.6/types.hal
+++ b/radio/1.6/types.hal
@@ -24,6 +24,7 @@
 import @1.0::RadioResponseType;
 import @1.0::RegState;
 import @1.1::ScanStatus;
+import @1.2::Call;
 import @1.2::CellInfoCdma;
 import @1.2::CellConnectionStatus;
 import @1.2::TdscdmaSignalStrength;
@@ -723,3 +724,12 @@
         } ngranInfo;
     } accessTechnologySpecificInfo;
 };
+
+struct Call {
+    @1.2::Call base;
+    /**
+     * Forwarded number. It can set only one forwarded number based on 3GPP rule of the CS.
+     * Reference: 3GPP TS 24.008 section 10.5.4.21b
+     */
+    string forwardedNumber;
+};
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
index 75772cd..47babed 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp
@@ -406,3 +406,15 @@
         EXPECT_EQ(CardState::PRESENT, cardStatus.base.base.base.cardState);
     }
 }
+
+/*
+ * Test IRadio.getCurrentCalls_1_6() for the response returned.
+ */
+TEST_P(RadioHidlTest_v1_6, getCurrentCalls_1_6) {
+    serial = GetRandomSerialNumber();
+    radio_v1_6->getCurrentCalls_1_6(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
+    EXPECT_EQ(::android::hardware::radio::V1_6::RadioError::NONE, radioRsp_v1_6->rspInfo.error);
+}
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
index 111fcd1..dc7bad3 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
+++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
@@ -815,6 +815,10 @@
     Return<void> getDataRegistrationStateResponse_1_6(
             const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
             const ::android::hardware::radio::V1_6::RegStateResult& regResponse);
+
+    Return<void> getCurrentCallsResponse_1_6(
+            const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+            const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& calls);
 };
 
 /* Callback class for radio indication */
diff --git a/radio/1.6/vts/functional/radio_response.cpp b/radio/1.6/vts/functional/radio_response.cpp
index 68d1f20..4a78f2b 100644
--- a/radio/1.6/vts/functional/radio_response.cpp
+++ b/radio/1.6/vts/functional/radio_response.cpp
@@ -1199,3 +1199,11 @@
     parent_v1_6.notify(info.serial);
     return Void();
 }
+
+Return<void> RadioResponse_v1_6::getCurrentCallsResponse_1_6(
+        const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
+        const ::android::hardware::hidl_vec<::android::hardware::radio::V1_6::Call>& /*calls*/) {
+    rspInfo = info;
+    parent_v1_6.notify(info.serial);
+    return Void();
+}