HIDL change for Android O RIL update

1. Added two new API for screen state replacement.
2. Data call API refactoring work.

bug: 20125037, 32224135, 32223897, 32249926, 30282096, 30173958,
33653220
Test: Telephony sanity tests and unit tests

Change-Id: I6b266637914a85bd57c6a055c52c8ff4ced17e1f
diff --git a/radio/1.0/vts/Radio.vts b/radio/1.0/vts/Radio.vts
index c3d998a..05fa462 100644
--- a/radio/1.0/vts/Radio.vts
+++ b/radio/1.0/vts/Radio.vts
@@ -315,28 +315,20 @@
             scalar_type: "int32_t"
         }
         arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
             type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
+            predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
         }
         arg: {
-            type: TYPE_STRING
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
         }
     }
 
@@ -1198,20 +1190,12 @@
             scalar_type: "int32_t"
         }
         arg: {
-            type: TYPE_STRING
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
         }
         arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
         }
     }
 
@@ -1491,6 +1475,35 @@
     }
 
     api: {
+        name: "sendDeviceState"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        arg: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::radio::V1_0::DeviceStateType"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    api: {
+        name: "setIndicationFilter"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        arg: {
+            type: TYPE_MASK
+            scalar_type: "int32_t"
+            predefined_type: "::android::hardware::radio::V1_0::IndicationFilter"
+        }
+    }
+
+    api: {
         name: "responseAcknowledgement"
     }
 
diff --git a/radio/1.0/vts/RadioIndication.vts b/radio/1.0/vts/RadioIndication.vts
index fac73a9..74a52c6 100644
--- a/radio/1.0/vts/RadioIndication.vts
+++ b/radio/1.0/vts/RadioIndication.vts
@@ -28,7 +28,7 @@
     }
 
     api: {
-        name: "voiceNetworkStateChanged"
+        name: "networkStateChanged"
         arg: {
             type: TYPE_ENUM
             predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
diff --git a/radio/1.0/vts/RadioResponse.vts b/radio/1.0/vts/RadioResponse.vts
index 2884d30..9aed63e 100644
--- a/radio/1.0/vts/RadioResponse.vts
+++ b/radio/1.0/vts/RadioResponse.vts
@@ -1372,6 +1372,22 @@
     }
 
     api: {
+        name: "sendDeviceStateResponse"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
+        }
+    }
+
+    api: {
+        name: "setIndicationFilterResponse"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
+        }
+    }
+
+    api: {
         name: "acknowledgeRequest"
         arg: {
             type: TYPE_SCALAR
diff --git a/radio/1.0/vts/types.vts b/radio/1.0/vts/types.vts
index c11db63..6d42016 100644
--- a/radio/1.0/vts/types.vts
+++ b/radio/1.0/vts/types.vts
@@ -1817,7 +1817,7 @@
 }
 
 attribute: {
-    name: "::android::hardware::radio::V1_0::DataProfile"
+    name: "::android::hardware::radio::V1_0::DataProfileId"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "int32_t"
@@ -1859,7 +1859,7 @@
     enum_value: {
         scalar_type: "int32_t"
 
-        enumerator: "MEMORY_CAPAPCITY_EXCEEDED"
+        enumerator: "MEMORY_CAPACITY_EXCEEDED"
         scalar_value: {
             int32_t: 211
         }
@@ -1913,7 +1913,7 @@
         scalar_value: {
             int32_t: 1
         }
-        enumerator: "UNKOWN"
+        enumerator: "UNKNOWN"
         scalar_value: {
             int32_t: 2
         }
@@ -2406,7 +2406,7 @@
         scalar_value: {
             int32_t: 1
         }
-        enumerator: "FACORY_RESET"
+        enumerator: "FACTORY_RESET"
         scalar_value: {
             int32_t: 2
         }
@@ -3551,6 +3551,138 @@
 }
 
 attribute: {
+    name: "::android::hardware::radio::V1_0::ApnTypes"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "DEFAULT"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "MMS"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "SUPL"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "DUN"
+        scalar_value: {
+            int32_t: 8
+        }
+        enumerator: "HIPRI"
+        scalar_value: {
+            int32_t: 16
+        }
+        enumerator: "FOTA"
+        scalar_value: {
+            int32_t: 32
+        }
+        enumerator: "IMS"
+        scalar_value: {
+            int32_t: 64
+        }
+        enumerator: "CBS"
+        scalar_value: {
+            int32_t: 128
+        }
+        enumerator: "IA"
+        scalar_value: {
+            int32_t: 256
+        }
+        enumerator: "EMERGENCY"
+        scalar_value: {
+            int32_t: 512
+        }
+        enumerator: "ALL"
+        scalar_value: {
+            int32_t: 1023
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::IndicationFilter"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "SIGNAL_STRENGTH"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "FULL_NETWORK_STATE"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "DATA_CALL_DORMANCY_CHANGED"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "ALL"
+        scalar_value: {
+            int32_t: 7
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::MvnoType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "IMSI"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "GID"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "SPN"
+        scalar_value: {
+            int32_t: 3
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::DeviceStateType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "POWER_SAVE_MODE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "CHARGING_STATE"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "LOW_DATA_EXPECTED"
+        scalar_value: {
+            int32_t: 2
+        }
+    }
+}
+
+attribute: {
     name: "::android::hardware::radio::V1_0::RadioResponseInfo"
     type: TYPE_STRUCT
     struct_value: {
@@ -4528,7 +4660,7 @@
         scalar_type: "int32_t"
     }
     struct_value: {
-        name: "basestationId"
+        name: "baseStationId"
         type: TYPE_SCALAR
         scalar_type: "int32_t"
     }
@@ -4956,8 +5088,8 @@
     type: TYPE_STRUCT
     struct_value: {
         name: "profileId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::radio::V1_0::DataProfileId"
     }
     struct_value: {
         name: "apn"
@@ -4968,6 +5100,10 @@
         type: TYPE_STRING
     }
     struct_value: {
+        name: "roamingProtocol"
+        type: TYPE_STRING
+    }
+    struct_value: {
         name: "authType"
         type: TYPE_ENUM
         predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
@@ -5005,6 +5141,32 @@
         type: TYPE_SCALAR
         scalar_type: "bool_t"
     }
+    struct_value: {
+        name: "supportedApnTypesBitmap"
+        type: TYPE_MASK
+        scalar_type: "int32_t"
+        predefined_type: "::android::hardware::radio::V1_0::ApnTypes"
+    }
+    struct_value: {
+        name: "bearerBitmap"
+        type: TYPE_MASK
+        scalar_type: "int32_t"
+        predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
+    }
+    struct_value: {
+        name: "mtu"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "mvnoType"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::radio::V1_0::MvnoType"
+    }
+    struct_value: {
+        name: "mvnoMatchData"
+        type: TYPE_STRING
+    }
 }
 
 attribute: {
@@ -5022,7 +5184,8 @@
     }
     struct_value: {
         name: "raf"
-        type: TYPE_ENUM
+        type: TYPE_MASK
+        scalar_type: "int32_t"
         predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
     }
     struct_value: {
@@ -5087,8 +5250,8 @@
     struct_value: {
         name: "txmModetimeMs"
         type: TYPE_ARRAY
+        vector_size: 5
         vector_value: {
-            vector_size: 5
             type: TYPE_SCALAR
             scalar_type: "uint32_t"
         }
@@ -5238,7 +5401,7 @@
         predefined_type: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
     }
     struct_value: {
-        name: "numbertype"
+        name: "numberType"
         type: TYPE_ENUM
         predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberType"
     }
@@ -5477,7 +5640,8 @@
     }
     struct_value: {
         name: "serviceClass"
-        type: TYPE_ENUM
+        type: TYPE_MASK
+        scalar_type: "int32_t"
         predefined_type: "::android::hardware::radio::V1_0::SuppServiceClass"
     }
     struct_value: {