Added CellIdentity struct in types.hal
authorCassie <xih@google.com>
Thu, 26 Oct 2017 22:51:48 +0000 (15:51 -0700)
committerCassie <xih@google.com>
Wed, 1 Nov 2017 17:25:36 +0000 (10:25 -0700)
This change was made because the new scan API needs to include the human
readable operator name other than PLMN in the scan results.
In order to let teh operator name used by other structures and APIS, we added
the operator name alphaLong and alphaShort, which were actually included
in the OperatorInfo, into the CellIdentity.

Bug: 63984327
Test: Basic telephony sanity
Change-Id: I498b7f190b739c92975fe797e1c74e96d90ee823

radio/1.2/Android.bp
radio/1.2/IRadioIndication.hal [new file with mode: 0644]
radio/1.2/IRadioResponse.hal [new file with mode: 0644]
radio/1.2/types.hal

index d6535f5cae8c3331697a27f1cd6a6f8b13591c5d..dc787496d4b4e301a17d32825d5c2a7439d2187f 100644 (file)
@@ -5,6 +5,8 @@ filegroup {
     srcs: [
         "types.hal",
         "IRadio.hal",
+        "IRadioIndication.hal",
+        "IRadioResponse.hal",
         "ISap.hal",
     ],
 }
@@ -19,6 +21,8 @@ genrule {
     out: [
         "android/hardware/radio/1.2/types.cpp",
         "android/hardware/radio/1.2/RadioAll.cpp",
+        "android/hardware/radio/1.2/RadioIndicationAll.cpp",
+        "android/hardware/radio/1.2/RadioResponseAll.cpp",
         "android/hardware/radio/1.2/SapAll.cpp",
     ],
 }
@@ -38,6 +42,16 @@ genrule {
         "android/hardware/radio/1.2/BnHwRadio.h",
         "android/hardware/radio/1.2/BpHwRadio.h",
         "android/hardware/radio/1.2/BsRadio.h",
+        "android/hardware/radio/1.2/IRadioIndication.h",
+        "android/hardware/radio/1.2/IHwRadioIndication.h",
+        "android/hardware/radio/1.2/BnHwRadioIndication.h",
+        "android/hardware/radio/1.2/BpHwRadioIndication.h",
+        "android/hardware/radio/1.2/BsRadioIndication.h",
+        "android/hardware/radio/1.2/IRadioResponse.h",
+        "android/hardware/radio/1.2/IHwRadioResponse.h",
+        "android/hardware/radio/1.2/BnHwRadioResponse.h",
+        "android/hardware/radio/1.2/BpHwRadioResponse.h",
+        "android/hardware/radio/1.2/BsRadioResponse.h",
         "android/hardware/radio/1.2/ISap.h",
         "android/hardware/radio/1.2/IHwSap.h",
         "android/hardware/radio/1.2/BnHwSap.h",
@@ -84,12 +98,25 @@ genrule {
         ":android.hardware.radio@1.2_hal",
     ],
     out: [
+        "android/hardware/radio/V1_2/CellIdentityCdma.java",
+        "android/hardware/radio/V1_2/CellIdentityGsm.java",
+        "android/hardware/radio/V1_2/CellIdentityLte.java",
+        "android/hardware/radio/V1_2/CellIdentityOperatorNames.java",
+        "android/hardware/radio/V1_2/CellIdentityWcdma.java",
+        "android/hardware/radio/V1_2/CellInfo.java",
+        "android/hardware/radio/V1_2/CellInfoCdma.java",
+        "android/hardware/radio/V1_2/CellInfoGsm.java",
+        "android/hardware/radio/V1_2/CellInfoLte.java",
+        "android/hardware/radio/V1_2/CellInfoWcdma.java",
         "android/hardware/radio/V1_2/IncrementalResultsPeriodicityRange.java",
         "android/hardware/radio/V1_2/MaxSearchTimeRange.java",
         "android/hardware/radio/V1_2/NetworkScanRequest.java",
+        "android/hardware/radio/V1_2/NetworkScanResult.java",
         "android/hardware/radio/V1_2/RadioConst.java",
         "android/hardware/radio/V1_2/ScanIntervalRange.java",
         "android/hardware/radio/V1_2/IRadio.java",
+        "android/hardware/radio/V1_2/IRadioIndication.java",
+        "android/hardware/radio/V1_2/IRadioResponse.java",
         "android/hardware/radio/V1_2/ISap.java",
     ],
 }
@@ -119,6 +146,8 @@ genrule {
     ],
     out: [
         "android/hardware/radio/1.2/ARadio.cpp",
+        "android/hardware/radio/1.2/ARadioIndication.cpp",
+        "android/hardware/radio/1.2/ARadioResponse.cpp",
         "android/hardware/radio/1.2/ASap.cpp",
     ],
 }
@@ -132,6 +161,8 @@ genrule {
     ],
     out: [
         "android/hardware/radio/1.2/ARadio.h",
+        "android/hardware/radio/1.2/ARadioIndication.h",
+        "android/hardware/radio/1.2/ARadioResponse.h",
         "android/hardware/radio/1.2/ASap.h",
     ],
 }
diff --git a/radio/1.2/IRadioIndication.hal b/radio/1.2/IRadioIndication.hal
new file mode 100644 (file)
index 0000000..5d3efcf
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio@1.2;
+
+import @1.0::RadioIndicationType;
+import @1.1::IRadioIndication;
+
+/**
+ * Interface declaring unsolicited radio indications.
+ */
+interface IRadioIndication extends @1.1::IRadioIndication {
+
+    /**
+     * Incremental network scan results
+     */
+    oneway networkScanResult_1_2(RadioIndicationType type, NetworkScanResult result);
+};
\ No newline at end of file
diff --git a/radio/1.2/IRadioResponse.hal b/radio/1.2/IRadioResponse.hal
new file mode 100644 (file)
index 0000000..5bfbbae
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio@1.2;
+
+import @1.0::RadioResponseInfo;
+import @1.1::IRadioResponse;
+
+/**
+ * Interface declaring response functions to solicited radio requests.
+ */
+interface IRadioResponse extends @1.1::IRadioResponse {
+
+    /**
+     * @param info Response info struct containing response type, serial no. and error
+     * @param cellInfo List of current cell information known to radio
+     *
+     * Valid errors returned:
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:NO_MEMORY
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:SYSTEM_ERR
+     *   RadioError:MODEM_ERR
+     *   RadioError:NO_NETWORK_FOUND
+     *   RadioError:REQUEST_NOT_SUPPORTED
+     *   RadioError:NO_RESOURCES
+     *   RadioError:CANCELLED
+     */
+    oneway getCellInfoListResponse_1_2(RadioResponseInfo info, vec<CellInfo> cellInfo);
+};
index 381eb858ba83c1671aa981cb7771e07a089bd97e..6b57ae3f46514b8fdf11b65f194c3c530b0764d7 100644 (file)
 
 package android.hardware.radio@1.2;
 
+import @1.0::CdmaSignalStrength;
+import @1.0::CellIdentityCdma;
+import @1.0::CellIdentityGsm;
+import @1.0::CellIdentityLte;
+import @1.0::CellIdentityWcdma;
+import @1.0::CellInfoTdscdma;
+import @1.0::CellInfoType;
+import @1.0::EvdoSignalStrength;
+import @1.0::GsmSignalStrength;
+import @1.0::LteSignalStrength;
 import @1.0::RadioConst;
+import @1.0::TimeStampType;
+import @1.0::WcdmaSignalStrength;
 import @1.1::RadioAccessSpecifier;
+import @1.0::RadioError;
+import @1.1::ScanStatus;
 import @1.1::ScanType;
 
 enum RadioConst : @1.0::RadioConst {
@@ -97,3 +111,113 @@ struct NetworkScanRequest {
      */
     vec<string> mccMncs;
 };
+
+struct NetworkScanResult {
+    /**
+     * The status of the scan.
+     */
+    ScanStatus status;
+
+    /**
+     * The error code of the incremental result.
+     */
+    RadioError error;
+
+    /**
+     * List of network information as CellInfo.
+     */
+    vec<CellInfo> networkInfos;
+};
+
+struct CellIdentityOperatorNames {
+    /**
+     * Long alpha Operator Name String or Enhanced Operator Name String.
+     */
+    string alphaLong;
+
+    /**
+     * Short alpha Operator Name String or Enhanced Operator Name String
+     */
+    string alphaShort;
+};
+
+struct CellIdentityCdma {
+    @1.0::CellIdentityCdma base;
+    CellIdentityOperatorNames operatorNames;
+};
+
+struct CellIdentityGsm {
+    @1.0::CellIdentityGsm base;
+    CellIdentityOperatorNames operatorNames;
+};
+
+struct CellIdentityLte {
+    @1.0::CellIdentityLte base;
+    CellIdentityOperatorNames operatorNames;
+};
+
+struct CellIdentityWcdma {
+    @1.0::CellIdentityWcdma base;
+    CellIdentityOperatorNames operatorNames;
+};
+
+struct CellInfoGsm {
+    CellIdentityGsm cellIdentityGsm;
+    GsmSignalStrength signalStrengthGsm;
+};
+
+struct CellInfoWcdma {
+    CellIdentityWcdma cellIdentityWcdma;
+    WcdmaSignalStrength signalStrengthWcdma;
+};
+
+struct CellInfoCdma {
+    CellIdentityCdma cellIdentityCdma;
+    CdmaSignalStrength signalStrengthCdma;
+    EvdoSignalStrength signalStrengthEvdo;
+};
+
+struct CellInfoLte {
+    CellIdentityLte cellIdentityLte;
+    LteSignalStrength signalStrengthLte;
+};
+
+struct CellInfo {
+    /**
+     * Cell type for selecting from union CellInfo.
+     */
+    CellInfoType cellInfoType;
+    /*
+     * True if this cell is registered false if not registered.
+     */
+    bool registered;
+    /*
+     * Type of time stamp represented by timeStamp.
+     */
+    TimeStampType timeStampType;
+    /*
+     * Time in nanos as returned by ril_nano_time.
+     */
+    uint64_t timeStamp;
+    /*
+     * Only one of the below vectors must be of size 1 based on the CellInfoType and others must be
+     * of size 0.
+     */
+    vec<CellInfoGsm> gsm;
+    /*
+     * Valid only if type = cdma and size = 1 else must be empty.
+     */
+    vec<CellInfoCdma> cdma;
+    /*
+     * Valid only if type = lte and size = 1 else must be empty.
+     */
+    vec<CellInfoLte> lte;
+    /*
+     * Valid only if type = wcdma and size = 1 else must be empty.
+     */
+    vec<CellInfoWcdma> wcdma;
+    /*
+     * Valid only if type = tdscdma and size = 1 else must be empty.
+     */
+    vec<CellInfoTdscdma> tdscdma;
+};
\ No newline at end of file