Merge "Remove/rename IRadio version-specific commands"
diff --git a/guest/hals/ril/cuttlefish_ril.cpp b/guest/hals/ril/cuttlefish_ril.cpp
index 40fc393..27559da 100644
--- a/guest/hals/ril/cuttlefish_ril.cpp
+++ b/guest/hals/ril/cuttlefish_ril.cpp
@@ -1214,33 +1214,6 @@
                                  sizeof(gCdmaSubscriptionType));
 }
 
-static void request_enable_uicc_applications(int /*request*/, void* data,
-                                             size_t datalen,
-                                             RIL_Token t) {
-  ALOGV("Enable uicc applications.");
-
-  if (data == NULL || datalen != sizeof(int)) {
-    gce_ril_env->OnRequestComplete(t, RIL_E_INTERNAL_ERR, NULL, 0);
-    return;
-  }
-
-  bool enable = *(int *)(data) != 0;
-
-  ALOGV("areUiccApplicationsEnabled change from %d to %d", areUiccApplicationsEnabled, enable);
-
-  areUiccApplicationsEnabled = enable;
-
-  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
-}
-
-static void request_are_uicc_applications_enabled(int /*request*/, void* /*data*/,
-                                                  size_t /*datalen*/,
-                                                  RIL_Token t) {
-  ALOGV("Getting whether uicc applications are enabled.");
-
-  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, &areUiccApplicationsEnabled, sizeof(bool));
-}
-
 static void request_cdma_set_subscription_source(int /*request*/, void* data,
                                                  size_t /*datalen*/,
                                                  RIL_Token t) {
@@ -1385,20 +1358,6 @@
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
 }
 
-static void request_set_carrier_restrictions4(void* /*data*/,
-                                              size_t /*datalen*/,
-                                              RIL_Token t) {
-  ALOGV("Set carrier restrictions is not supported");
-  // Carrier restrictions are not supported on cuttlefish, as they are specific for locked devices
-  gce_ril_env->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
-}
-
-static void request_get_carrier_restrictions4(RIL_Token t) {
-  ALOGV("Get carrier restrictions is not supported");
-  // Carrier restrictions are not supported on cuttlefish, as they are specific for locked devices
-  gce_ril_env->OnRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
-}
-
 static RIL_RadioState gce_ril_current_state() {
   ALOGV("Reporting radio state %d", gRadioPowerState);
   return gRadioPowerState;
@@ -2207,12 +2166,6 @@
   return;
 }
 
-static void request_start_network_scan4(RIL_Token t) {
-  ALOGV("Scanning network 1.4");
-  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
-  return;
-}
-
 static void request_set_preferred_network_type_bitmap(int /*request*/, void* data,
                                                size_t /*datalen*/,
                                                RIL_Token t) {
@@ -2270,27 +2223,54 @@
 }
 
 // New functions after Q.
-static void request_set_signal_strength_reporting_criteria_1_5(int /*request*/, void* /*data*/,
-                                                               size_t /*datalen*/, RIL_Token t) {
-  ALOGV("request_set_signal_strength_reporting_criteria_1_5 - void");
+static void request_set_signal_strength_reporting_criteria(int /*request*/, void* /*data*/,
+                                                           size_t /*datalen*/, RIL_Token t) {
+    ALOGV("request_set_signal_strength_reporting_criteria - void");
+    gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
+    return;
+}
+
+static void request_enable_uicc_applications(int /*request*/, void* data,
+                                             size_t datalen,
+                                             RIL_Token t) {
+  ALOGV("Enable uicc applications.");
+
+  if (data == NULL || datalen != sizeof(int)) {
+    gce_ril_env->OnRequestComplete(t, RIL_E_INTERNAL_ERR, NULL, 0);
+    return;
+  }
+
+  bool enable = *(int *)(data) != 0;
+
+  ALOGV("areUiccApplicationsEnabled change from %d to %d", areUiccApplicationsEnabled, enable);
+
+  areUiccApplicationsEnabled = enable;
+
+  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
+}
+
+static void request_are_uicc_applications_enabled(int /*request*/, void* /*data*/,
+                                                  size_t /*datalen*/,
+                                                  RIL_Token t) {
+  ALOGV("Getting whether uicc applications are enabled.");
+
+  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, &areUiccApplicationsEnabled, sizeof(bool));
+}
+
+static void request_set_radio_power(RIL_Token t) {
+  ALOGV("request_set_radio_power - void");
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
   return;
 }
 
-static void request_set_system_selection_channels_1_5(int /*request*/, RIL_Token t) {
-  ALOGV("request_set_system_selection_channels_1_5 - void");
+static void request_enter_sim_depersonalization(RIL_Token t) {
+  ALOGV("request_enter_sim_depersonalization - void");
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
   return;
 }
 
-static void request_start_network_scan_1_5(RIL_Token t) {
-  ALOGV("request_start_network_scan_1_5");
-  gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
-  return;
-}
-
-static void request_set_radio_power_1_5(RIL_Token t) {
-  ALOGV("request_set_radio_power_1_5");
+static void request_cdma_send_sms_expect_more(RIL_Token t) {
+  ALOGV("request_cdma_send_sms_expect_more - void");
   gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
   return;
 }
@@ -2523,9 +2503,6 @@
     case RIL_REQUEST_START_NETWORK_SCAN:
       request_start_network_scan(t);
       break;
-    case RIL_REQUEST_START_NETWORK_SCAN4:
-      request_start_network_scan4(t);
-      break;
     case RIL_REQUEST_GET_MODEM_STACK_STATUS:
       request_get_modem_stack_status(request, t);
       break;
@@ -2547,12 +2524,6 @@
     case RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS:
       request_set_system_selection_channels(request, t);
       break;
-    case RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4:
-      request_set_carrier_restrictions4(data, datalen, t);
-      break;
-    case RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4:
-      request_get_carrier_restrictions4(t);
-      break;
     case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING:
       gce_ril_env->OnRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
       break;
@@ -2579,8 +2550,8 @@
       break;
 
 // New requests after Q.
-    case RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA_1_5:
-      request_set_signal_strength_reporting_criteria_1_5(request, data, datalen, t);
+    case RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA:
+      request_set_signal_strength_reporting_criteria(request, data, datalen, t);
       break;
     case RIL_REQUEST_ENABLE_UICC_APPLICATIONS:
       request_enable_uicc_applications(request, data, datalen, t);
@@ -2588,14 +2559,14 @@
     case RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED:
       request_are_uicc_applications_enabled(request, data, datalen, t);
       break;
-    case RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS_1_5:
-      request_set_system_selection_channels_1_5(request, t);
+    case RIL_REQUEST_SET_RADIO_POWER:
+      request_set_radio_power(t);
       break;
-    case RIL_REQUEST_START_NETWORK_SCAN_1_5:
-      request_start_network_scan_1_5(t);
+    case RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION:
+      request_enter_sim_depersonalization(t);
       break;
-    case RIL_REQUEST_SET_RADIO_POWER_1_5:
-      request_set_radio_power_1_5(t);
+    case RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE:
+      request_cdma_send_sms_expect_more(t);
       break;
     default:
       ALOGE("Request %d not supported.", request);
diff --git a/guest/hals/ril/libril/ril.cpp b/guest/hals/ril/libril/ril.cpp
index 4bb6b74..0660089 100644
--- a/guest/hals/ril/libril/ril.cpp
+++ b/guest/hals/ril/libril/ril.cpp
@@ -1073,10 +1073,7 @@
         case RIL_REQUEST_CHANGE_BARRING_PASSWORD: return "CHANGE_BARRING_PASSWORD";
         case RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE: return "QUERY_NETWORK_SELECTION_MODE";
         case RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS: return "RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS";
-        case RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS_1_5: return "RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS5";
         case RIL_REQUEST_START_NETWORK_SCAN: return "RIL_REQUEST_START_NETWORK_SCAN";
-        case RIL_REQUEST_START_NETWORK_SCAN4: return "RIL_REQUEST_START_NETWORK_SCAN4";
-        case RIL_REQUEST_START_NETWORK_SCAN_1_5: return "RIL_REQUEST_START_NETWORK_SCAN5";
         case RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC: return "SET_NETWORK_SELECTION_AUTOMATIC";
         case RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL: return "SET_NETWORK_SELECTION_MANUAL";
         case RIL_REQUEST_QUERY_AVAILABLE_NETWORKS: return "QUERY_AVAILABLE_NETWORKS";
@@ -1168,12 +1165,10 @@
         case RIL_REQUEST_PULL_LCEDATA: return "PULL_LCEDATA";
         case RIL_REQUEST_GET_ACTIVITY_INFO: return "GET_ACTIVITY_INFO";
         case RIL_REQUEST_SET_CARRIER_RESTRICTIONS: return "SET_CARRIER_RESTRICTIONS";
-        case RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4: return "SET_CARRIER_RESTRICTIONS_1_4";
         case RIL_REQUEST_GET_CARRIER_RESTRICTIONS: return "GET_CARRIER_RESTRICTIONS";
-        case RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4: return "GET_CARRIER_RESTRICTIONS_1_4";
         case RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION: return "SET_CARRIER_INFO_IMSI_ENCRYPTION";
-        case RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA_1_5: return "SET_SIGNAL_STRENGTH_REPORTING_CRITERIA_1_5";
-        case RIL_REQUEST_SET_RADIO_POWER_1_5: return "SET_RADIO_POWER_1_5";
+        case RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA: return "SET_SIGNAL_STRENGTH_REPORTING_CRITERIA";
+        case RIL_REQUEST_SET_RADIO_POWER: return "SET_RADIO_POWER";
         case RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION: return "ENTER_SIM_DEPERSONALIZATION";
         case RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE: return "CDMA_SEND_SMS_EXPECT_MORE";
         case RIL_RESPONSE_ACKNOWLEDGEMENT: return "RESPONSE_ACKNOWLEDGEMENT";
diff --git a/guest/hals/ril/libril/ril.h b/guest/hals/ril/libril/ril.h
index 33da5ca..72700d5 100644
--- a/guest/hals/ril/libril/ril.h
+++ b/guest/hals/ril/libril/ril.h
@@ -80,13 +80,6 @@
  *                    RIL_REQUEST_SET_SIM_CARD_POWER,
  *                    RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION,
  *                    RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION
- *                    The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
- *                    Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
- *                    New data structure RIL_DataRegistrationStateResponse,
- *                    RIL_VoiceRegistrationStateResponse same is
- *                    used in RIL_REQUEST_DATA_REGISTRATION_STATE and
- *                    RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
- *                    New data structure RIL_OpenChannelParams.
  *                    RIL_REQUEST_START_NETWORK_SCAN
  *                    RIL_REQUEST_STOP_NETWORK_SCAN
  *                    RIL_UNSOL_NETWORK_SCAN_RESULT
@@ -94,8 +87,18 @@
  *                    RIL_REQUEST_ENABLE_MODEM
  *                    RIL_REQUEST_EMERGENCY_DIAL
  *                    RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS
+ *                    RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA
  *                    RIL_REQUEST_ENABLE_UICC_APPLICATIONS
  *                    RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED
+ *                    RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION
+ *                    RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE
+ *                    The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
+ *                    Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15,
+ *                    RIL_Data_Call_Response_v12.
+ *                    New data structure RIL_DataRegistrationStateResponse, RIL_OpenChannelParams,
+ *                    RIL_VoiceRegistrationStateResponse same is
+ *                    used in RIL_REQUEST_DATA_REGISTRATION_STATE and
+ *                    RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
  */
 #define RIL_VERSION 12
 #define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
@@ -6451,28 +6454,6 @@
 #define RIL_REQUEST_STOP_KEEPALIVE 145
 
 /**
- * RIL_REQUEST_START_NETWORK_SCAN4
- *
- * Starts a new network scan
- *
- * Request to start a network scan with specified radio access networks with frequency bands and/or
- * channels.
- *
- * "data" is a const RIL_NetworkScanRequest *.
- * "response" is NULL
- *
- * Valid errors:
- *  SUCCESS
- *  RADIO_NOT_AVAILABLE
- *  DEVICE_IN_USE
- *  INTERNAL_ERR
- *  MODEM_ERR
- *  INVALID_ARGUMENTS
- *
- */
-#define RIL_REQUEST_START_NETWORK_SCAN4 146
-
-/**
  * RIL_REQUEST_GET_MODEM_STACK_STATUS
  *
  * Request status of a logical modem
@@ -6483,7 +6464,7 @@
  *  MODEM_ERR
  *
  */
-#define RIL_REQUEST_GET_MODEM_STACK_STATUS 147
+#define RIL_REQUEST_GET_MODEM_STACK_STATUS 146
 
 /**
  * @param info Response info struct containing response type, serial no. and error
@@ -6498,7 +6479,7 @@
  *   RadioError:REQUEST_NOT_SUPPORTED
  *   RadioError:NO_RESOURCES
  */
-#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP 148
+#define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP 147
 
 /**
  * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
@@ -6516,7 +6497,7 @@
  *   RadioError:REQUEST_NOT_SUPPORTED
  *   RadioError:NO_RESOURCES
  */
-#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP 149
+#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP 148
 
 /**
  * RIL_REQUEST_EMERGENCY_DIAL
@@ -6568,7 +6549,7 @@
  *  ABORTED
  *  INVALID_MODEM_STATE
  */
-#define RIL_REQUEST_EMERGENCY_DIAL 150
+#define RIL_REQUEST_EMERGENCY_DIAL 149
 
 /**
  * Specify which bands modem's background scan must act on.
@@ -6584,7 +6565,7 @@
  *  INTERNAL_ERR
  *
  */
-#define RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS 151
+#define RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS 150
 
 /**
  * RIL_REQUEST_ENABLE_MODEM
@@ -6597,58 +6578,11 @@
  *  MODEM_ERR
  *
  */
-#define RIL_REQUEST_ENABLE_MODEM 152
+#define RIL_REQUEST_ENABLE_MODEM 151
 
 /**
- * RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4
+ * RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA
  *
- * Set carrier restrictions. Expected modem behavior:
- *  If never receives this command:
- *  - Must allow all carriers
- *  Receives this command:
- *  - Only allow carriers specified in carriers. The restriction persists across power cycles
- *    and FDR. If a present SIM is allowed, modem must not reload the SIM. If a present SIM is
- *    *not* allowed, modem must detach from the registered network and only keep emergency
- *    service, and notify Android SIM refresh reset with new SIM state being
- *    CardState:RESTRICTED. Emergency service must be enabled.
- *
- * "data" is const RIL_CarrierRestrictionsWithPriority *
- * A list of allowed carriers and possibly a list of excluded carriers with the priority and
- * multisim policy.
- *
- * Valid errors:
- *  RIL_E_SUCCESS
- *  RIL_E_INVALID_ARGUMENTS
- *  RIL_E_RADIO_NOT_AVAILABLE
- *  RIL_E_REQUEST_NOT_SUPPORTED
- *  INTERNAL_ERR
- *  NO_MEMORY
- *  NO_RESOURCES
- *  CANCELLED
- */
-#define RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4 153
-
-/**
- * RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4
- *
- * Gets the carrier restrictions.
- *
- * "data" is NULL
- *
- * "response" is const RIL_CarrierRestrictionsWithPriority *.
- *
- * Valid errors:
- *  RIL_E_SUCCESS
- *  RIL_E_RADIO_NOT_AVAILABLE
- *  RIL_E_REQUEST_NOT_SUPPORTED
- *  INTERNAL_ERR
- *  NO_MEMORY
- *  NO_RESOURCES
- *  CANCELLED
- */
-#define RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4 154
-
-/**
  * Sets the signal strength reporting criteria.
  *
  * The resulting reporting rules are the AND of all the supplied criteria. For each RAN
@@ -6681,7 +6615,7 @@
  *   RadioError:INVALID_ARGUMENTS
  *   RadioError:RADIO_NOT_AVAILABLE
  */
-#define RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA_1_5 155
+#define RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA 152
 
 /**
  * RIL_REQUEST_ENABLE_UICC_APPLICATIONS
@@ -6695,7 +6629,7 @@
  *  INTERNAL_ERR
  *  REQUEST_NOT_SUPPORTED
  */
-#define RIL_REQUEST_ENABLE_UICC_APPLICATIONS 156
+#define RIL_REQUEST_ENABLE_UICC_APPLICATIONS 153
 
 /**
  * RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED
@@ -6711,50 +6645,10 @@
  *  INTERNAL_ERR
  *  REQUEST_NOT_SUPPORTED
  */
-#define RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 157
+#define RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 154
 
 /**
- * Specify which bands modem's background scan must act on.
- * If specifyChannels is true, it only scans bands specified in specifiers.
- * If specifyChannels is false, it scans all bands.
- *
- * For example, CBRS is only on LTE band 48. By specifying this band,
- * modem saves more power.
- *
- * Valid errors:
- *  SUCCESS
- *  RADIO_NOT_AVAILABLE
- *  INTERNAL_ERR
- *  INVALID_ARGUMENTS
- *
- */
-#define RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS_1_5 158
-
-/**
- * RIL_REQUEST_START_NETWORK_SCAN5
- *
- * Starts a new network scan
- *
- * Request to start a network scan with specified radio access networks with frequency bands and/or
- * channels.
- *
- * "data" is a const RIL_NetworkScanRequest *.
- * "response" is NULL
- *
- * Valid errors:
- *  SUCCESS
- *  RADIO_NOT_AVAILABLE
- *  DEVICE_IN_USE
- *  INTERNAL_ERR
- *  MODEM_ERR
- *  INVALID_ARGUMENTS
- *
- */
-#define RIL_REQUEST_START_NETWORK_SCAN_1_5 159
-
-
-/**
- * RIL_REQUEST_SET_RADIO_POWER_1_5
+ * RIL_REQUEST_SET_RADIO_POWER
  *
  * Turn on or off radio power. It can also specify whether turning on radio power is to place an
  * emergency call and whether the call will be placed on this logical modem.
@@ -6765,8 +6659,7 @@
  *  INVALID_ARGUMENTS
  *
  */
-#define RIL_REQUEST_SET_RADIO_POWER_1_5 160
-
+#define RIL_REQUEST_SET_RADIO_POWER 155
 
 /**
  * RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION
@@ -6793,8 +6686,7 @@
  *  REQUEST_NOT_SUPPORTED
  */
 
-#define RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 161
-
+#define RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 156
 
 /**
  * RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE
@@ -6832,10 +6724,8 @@
  *  REQUEST_NOT_SUPPORTED
  *  MODE_NOT_SUPPORTED
  *  SIM_ABSENT
- *
  */
-#define RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 162
-
+#define RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 157
 
 /***********************************************************************/
 
diff --git a/guest/hals/ril/libril/ril_commands.h b/guest/hals/ril/libril/ril_commands.h
index 36c1fd0..852e28e 100644
--- a/guest/hals/ril/libril/ril_commands.h
+++ b/guest/hals/ril/libril/ril_commands.h
@@ -160,20 +160,15 @@
     {RIL_REQUEST_STOP_NETWORK_SCAN, radio_1_5::stopNetworkScanResponse},
     {RIL_REQUEST_START_KEEPALIVE, radio_1_5::startKeepaliveResponse},
     {RIL_REQUEST_STOP_KEEPALIVE, radio_1_5::stopKeepaliveResponse},
-    {RIL_REQUEST_START_NETWORK_SCAN4, radio_1_5::startNetworkScanResponse4},
     {RIL_REQUEST_GET_MODEM_STACK_STATUS, radio_1_5::getModemStackStatusResponse},
     {RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_5::getPreferredNetworkTypeBitmapResponse},
     {RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP, radio_1_5::setPreferredNetworkTypeBitmapResponse},
     {RIL_REQUEST_EMERGENCY_DIAL, radio_1_5::emergencyDialResponse},
     {RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS, radio_1_5::setSystemSelectionChannelsResponse},
     {RIL_REQUEST_ENABLE_MODEM, radio_1_5::enableModemResponse},
-    {RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4, radio_1_5::setAllowedCarriersResponse4},
-    {RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4, radio_1_5::getAllowedCarriersResponse4},
-    {RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA_1_5, radio_1_5::setSignalStrengthReportingCriteriaResponse_1_5},
+    {RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA, radio_1_5::setSignalStrengthReportingCriteriaResponse},
     {RIL_REQUEST_ENABLE_UICC_APPLICATIONS, radio_1_5::enableUiccApplicationsResponse},
     {RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED, radio_1_5::areUiccApplicationsEnabledResponse},
-    {RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS_1_5, radio_1_5::setSystemSelectionChannelsResponse_1_5},
-    {RIL_REQUEST_START_NETWORK_SCAN_1_5, radio_1_5::startNetworkScanResponse_1_5},
-    {RIL_REQUEST_SET_RADIO_POWER_1_5, radio_1_5::setRadioPowerResponse_1_5},
+    {RIL_REQUEST_SET_RADIO_POWER, radio_1_5::setRadioPowerResponse},
     {RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION, radio_1_5::supplySimDepersonalizationResponse},
     {RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE, radio_1_5::sendCdmaSmsExpectMoreResponse}
diff --git a/guest/hals/ril/libril/ril_service.cpp b/guest/hals/ril/libril/ril_service.cpp
index edef964..7092037 100644
--- a/guest/hals/ril/libril/ril_service.cpp
+++ b/guest/hals/ril/libril/ril_service.cpp
@@ -170,10 +170,6 @@
 
     Return<void> supplyNetworkDepersonalization(int32_t serial, const hidl_string& netPin);
 
-    Return<void> supplySimDepersonalization(int32_t serial,
-                                            ::android::hardware::radio::V1_5::PersoSubstate persoType,
-                                            const hidl_string& controlKey);
-
     Return<void> getCurrentCalls(int32_t serial);
 
     Return<void> dial(int32_t serial, const Dial& dialInfo);
@@ -351,8 +347,6 @@
 
     Return<void> sendCdmaSms(int32_t serial, const CdmaSmsMessage& sms);
 
-    Return<void> sendCdmaSmsExpectMore(int32_t serial, const CdmaSmsMessage& sms);
-
     Return<void> acknowledgeLastIncomingCdmaSms(int32_t serial,
             const CdmaSmsAck& smsAck);
 
@@ -569,6 +563,9 @@
     Return<void> getDataRegistrationState_1_5(int32_t serial);
     Return<void> setNetworkSelectionModeManual_1_5(int32_t serial,
             const hidl_string& operatorNumeric, V1_5::RadioAccessNetworks ran);
+    Return<void> sendCdmaSmsExpectMore(int32_t serial, const CdmaSmsMessage& sms);
+    Return<void> supplySimDepersonalization(int32_t serial, V1_5::PersoSubstate persoType,
+                                            const hidl_string& controlKey);
 };
 
 struct OemHookImpl : public IOemHook {
@@ -1043,17 +1040,6 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::supplySimDepersonalization(int32_t serial,
-                                                       ::android::hardware::radio::V1_5::PersoSubstate persoType,
-                                                       const hidl_string& controlKey) {
-#if VDBG
-    RLOGD("supplySimDepersonalization: serial %d", serial);
-#endif
-    dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION, true,
-            1, controlKey.c_str());
-    return Void();
-}
-
 Return<void> RadioImpl_1_5::getCurrentCalls(int32_t serial) {
 #if VDBG
     RLOGD("getCurrentCalls: serial %d", serial);
@@ -1193,22 +1179,6 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::getVoiceRegistrationState_1_5(int32_t serial) {
-#if VDBG
-    RLOGD("getVoiceRegistrationState: serial %d", serial);
-#endif
-    dispatchVoid(serial, mSlotId, RIL_REQUEST_VOICE_REGISTRATION_STATE);
-    return Void();
-}
-
-Return<void> RadioImpl_1_5::getDataRegistrationState_1_5(int32_t serial) {
-#if VDBG
-    RLOGD("getDataRegistrationState: serial %d", serial);
-#endif
-    dispatchVoid(serial, mSlotId, RIL_REQUEST_DATA_REGISTRATION_STATE);
-    return Void();
-}
-
 Return<void> RadioImpl_1_5::getOperator(int32_t serial) {
 #if VDBG
     RLOGD("getOperator: serial %d", serial);
@@ -1218,7 +1188,9 @@
 }
 
 Return<void> RadioImpl_1_5::setRadioPower(int32_t serial, bool on) {
+#if VDBG
     RLOGD("setRadioPower: serial %d on %d", serial, on);
+#endif
     dispatchInts(serial, mSlotId, RIL_REQUEST_RADIO_POWER, 1, BOOL_TO_INT(on));
     return Void();
 }
@@ -1921,22 +1893,6 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::sendCdmaSmsExpectMore(int32_t serial, const CdmaSmsMessage& sms) {
-#if VDBG
-    RLOGD("sendCdmaSms: serial %d", serial);
-#endif
-    RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE);
-    if (pRI == NULL) {
-        return Void();
-    }
-
-    RIL_CDMA_SMS_Message rcsm = {};
-    constructCdmaSms(rcsm, sms);
-
-    CALL_ONREQUEST(pRI->pCI->requestNumber, &rcsm, sizeof(rcsm), pRI, mSlotId);
-    return Void();
-}
-
 Return<void> RadioImpl_1_5::acknowledgeLastIncomingCdmaSms(int32_t serial, const CdmaSmsAck& smsAck) {
 #if VDBG
     RLOGD("acknowledgeLastIncomingCdmaSms: serial %d", serial);
@@ -2923,7 +2879,6 @@
     }
 }
 
-
 Return<void> RadioImpl_1_5::setAllowedCarriers(int32_t serial, bool allAllowed,
                                            const CarrierRestrictions& carriers) {
 #if VDBG
@@ -2948,42 +2903,6 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::setAllowedCarriers_1_4(int32_t  serial,
-        const ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority& carriers,
-        ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicy) {
-#if VDBG
-    RLOGD("setAllowedCarriers_1_4: serial %d", serial);
-#endif
-
-    RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
-            RIL_REQUEST_SET_CARRIER_RESTRICTIONS_1_4);
-    if (pRI == NULL) {
-        return Void();
-    }
-
-    // Prepare legacy structure (defined in IRadio 1.0) to re-use existing code.
-    RIL_CarrierRestrictions cr = {};
-    if (prepareCarrierRestrictions(cr, false, carriers.allowedCarriers,
-                                   carriers.excludedCarriers, pRI) < 0) {
-        return Void();
-    }
-    // Copy the legacy structure into the new structure (defined in IRadio 1.4)
-    RIL_CarrierRestrictionsWithPriority crExt = {};
-    crExt.len_allowed_carriers = cr.len_allowed_carriers;
-    crExt.allowed_carriers = cr.allowed_carriers;
-    crExt.len_excluded_carriers = cr.len_excluded_carriers;
-    crExt.excluded_carriers = cr.excluded_carriers;
-    crExt.allowedCarriersPrioritized = BOOL_TO_INT(carriers.allowedCarriersPrioritized);
-    crExt.multiSimPolicy = (RIL_SimLockMultiSimPolicy)multiSimPolicy;
-
-    CALL_ONREQUEST(pRI->pCI->requestNumber, &crExt,
-                   sizeof(RIL_CarrierRestrictionsWithPriority), pRI, mSlotId);
-
-    freeCarrierRestrictions(cr);
-
-    return Void();
-}
-
 Return<void> RadioImpl_1_5::getAllowedCarriers(int32_t serial) {
 #if VDBG
     RLOGD("getAllowedCarriers: serial %d", serial);
@@ -2992,14 +2911,6 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::getAllowedCarriers_1_4(int32_t serial) {
-#if VDBG
-    RLOGD("getAllowedCarriers_1_4: serial %d", serial);
-#endif
-    dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CARRIER_RESTRICTIONS_1_4);
-    return Void();
-}
-
 Return<void> RadioImpl_1_5::sendDeviceState(int32_t serial, DeviceStateType deviceStateType,
                                         bool state) {
 #if VDBG
@@ -3152,6 +3063,7 @@
     return Void();
 }
 
+// Methods from ::android::hardware::radio::V1_2::IRadio follow.
 int prepareNetworkScanRequest_1_2(RIL_NetworkScanRequest &scan_request,
     const ::android::hardware::radio::V1_2::NetworkScanRequest& request,
     RequestInfo *pRI) {
@@ -3240,99 +3152,6 @@
     return 0;
 }
 
-int prepareNetworkScanRequest_1_5(RIL_NetworkScanRequest &scan_request,
-    const ::android::hardware::radio::V1_5::NetworkScanRequest& request,
-    RequestInfo *pRI) {
-
-    scan_request.type = (RIL_ScanType) request.type;
-    scan_request.interval = request.interval;
-    scan_request.specifiers_length = request.specifiers.size();
-
-    int intervalLow = static_cast<int>(::android::hardware::radio::V1_2::ScanIntervalRange::MIN);
-    int intervalHigh = static_cast<int>(::android::hardware::radio::V1_2::ScanIntervalRange::MAX);
-    int maxSearchTimeLow =
-        static_cast<int>(::android::hardware::radio::V1_2::MaxSearchTimeRange::MIN);
-    int maxSearchTimeHigh =
-        static_cast<int>(::android::hardware::radio::V1_2::MaxSearchTimeRange::MAX);
-    int incrementalResultsPeriodicityRangeLow =
-        static_cast<int>(::android::hardware::radio::V1_2::IncrementalResultsPeriodicityRange::MIN);
-    int incrementalResultsPeriodicityRangeHigh =
-        static_cast<int>(::android::hardware::radio::V1_2::IncrementalResultsPeriodicityRange::MAX);
-    uint maxSpecifierSize =
-        static_cast<uint>(::android::hardware::radio::V1_2::RadioConst
-            ::RADIO_ACCESS_SPECIFIER_MAX_SIZE);
-
-    if (request.interval < intervalLow || request.interval > intervalHigh) {
-        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-        return -1;
-    }
-    // If defined, must fall in correct range.
-    if (request.maxSearchTime != 0
-        && (request.maxSearchTime < maxSearchTimeLow
-            || request.maxSearchTime > maxSearchTimeHigh)) {
-        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-        return -1;
-    }
-    if (request.maxSearchTime != 0
-        && (request.incrementalResultsPeriodicity < incrementalResultsPeriodicityRangeLow
-            || request.incrementalResultsPeriodicity > incrementalResultsPeriodicityRangeHigh
-            || request.incrementalResultsPeriodicity > request.maxSearchTime)) {
-        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-        return -1;
-    }
-    if (request.specifiers.size() == 0 || request.specifiers.size() > maxSpecifierSize) {
-        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-        return -1;
-    }
-
-    for (size_t i = 0; i < request.specifiers.size(); ++i) {
-        if (request.specifiers[i].bands.geranBands().size() > MAX_BANDS ||
-            request.specifiers[i].bands.utranBands().size() > MAX_BANDS ||
-            request.specifiers[i].bands.eutranBands().size() > MAX_BANDS ||
-            request.specifiers[i].bands.ngranBands().size() > MAX_BANDS ||
-            request.specifiers[i].channels.size() > MAX_CHANNELS) {
-            sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-            return -1;
-        }
-        const V1_5::RadioAccessSpecifier& ras_from = request.specifiers[i];
-        RIL_RadioAccessSpecifier& ras_to = scan_request.specifiers[i];
-
-        ras_to.radio_access_network = (RIL_RadioAccessNetworks) ras_from.radioAccessNetwork;
-        ras_to.channels_length = ras_from.channels.size();
-
-        std::copy(ras_from.channels.begin(), ras_from.channels.end(), ras_to.channels);
-        const std::vector<uint32_t> * bands = nullptr;
-        switch (request.specifiers[i].radioAccessNetwork) {
-            case V1_5::RadioAccessNetworks::GERAN:
-                ras_to.bands_length = ras_from.bands.geranBands().size();
-                bands = (std::vector<uint32_t> *) &ras_from.bands;
-                break;
-            case V1_5::RadioAccessNetworks::UTRAN:
-                ras_to.bands_length = ras_from.bands.utranBands().size();
-                bands = (std::vector<uint32_t> *) &ras_from.bands;
-                break;
-            case V1_5::RadioAccessNetworks::EUTRAN:
-                ras_to.bands_length = ras_from.bands.eutranBands().size();
-                bands = (std::vector<uint32_t> *) &ras_from.bands;
-                break;
-            case V1_5::RadioAccessNetworks::NGRAN:
-                ras_to.bands_length = ras_from.bands.ngranBands().size();
-                bands = (std::vector<uint32_t> *) &ras_from.bands;
-                break;
-            default:
-                sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
-                return -1;
-        }
-        // safe to copy to geran_bands because it's a union member
-        for (size_t idx = 0; idx < ras_to.bands_length; ++idx) {
-            ras_to.bands.geran_bands[idx] = (RIL_GeranBands) (*bands)[idx];
-        }
-    }
-
-    return 0;
-}
-
-// Methods from ::android::hardware::radio::V1_2::IRadio follow.
 Return<void> RadioImpl_1_5::startNetworkScan_1_2(int32_t serial,
         const ::android::hardware::radio::V1_2::NetworkScanRequest& request) {
 #if VDBG
@@ -3344,10 +3163,6 @@
         return Void();
     }
 
-    // TODO: implement checks for new fields.
-    // NetworkScanRequest added maxSearchTime, incrementalResults, incrementalResultsPeriodicity and
-    // mccMncs, could add more validations using request2 here.
-
     RIL_NetworkScanRequest scan_request = {};
 
     if (prepareNetworkScanRequest_1_2(scan_request, request, pRI) < 0) {
@@ -3460,6 +3275,50 @@
 }
 
 // Methods from ::android::hardware::radio::V1_4::IRadio follow.
+Return<void> RadioImpl_1_5::setAllowedCarriers_1_4(int32_t  serial,
+        const V1_4::CarrierRestrictionsWithPriority& carriers,
+        V1_4::SimLockMultiSimPolicy multiSimPolicy) {
+#if VDBG
+    RLOGD("setAllowedCarriers_1_4: serial %d", serial);
+#endif
+
+    RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
+            RIL_REQUEST_SET_CARRIER_RESTRICTIONS);
+    if (pRI == NULL) {
+        return Void();
+    }
+
+    // Prepare legacy structure (defined in IRadio 1.0) to re-use existing code.
+    RIL_CarrierRestrictions cr = {};
+    if (prepareCarrierRestrictions(cr, false, carriers.allowedCarriers, carriers.excludedCarriers,
+            pRI) < 0) {
+        return Void();
+    }
+    // Copy the legacy structure into the new structure (defined in IRadio 1.4)
+    RIL_CarrierRestrictionsWithPriority crExt = {};
+    crExt.len_allowed_carriers = cr.len_allowed_carriers;
+    crExt.allowed_carriers = cr.allowed_carriers;
+    crExt.len_excluded_carriers = cr.len_excluded_carriers;
+    crExt.excluded_carriers = cr.excluded_carriers;
+    crExt.allowedCarriersPrioritized = BOOL_TO_INT(carriers.allowedCarriersPrioritized);
+    crExt.multiSimPolicy = (RIL_SimLockMultiSimPolicy)multiSimPolicy;
+
+    CALL_ONREQUEST(pRI->pCI->requestNumber, &crExt, sizeof(RIL_CarrierRestrictionsWithPriority),
+            pRI, mSlotId);
+
+    freeCarrierRestrictions(cr);
+
+    return Void();
+}
+
+Return<void> RadioImpl_1_5::getAllowedCarriers_1_4(int32_t serial) {
+#if VDBG
+    RLOGD("getAllowedCarriers_1_4: serial %d", serial);
+#endif
+    dispatchVoid(serial, mSlotId, RIL_REQUEST_GET_CARRIER_RESTRICTIONS);
+    return Void();
+}
+
 Return<void> RadioImpl_1_5::setupDataCall_1_4(int32_t serial ,
         ::android::hardware::radio::V1_4::AccessNetwork /* accessNetwork */,
         const ::android::hardware::radio::V1_4::DataProfileInfo& dataProfileInfo,
@@ -3604,22 +3463,18 @@
     RLOGD("startNetworkScan_1_4: serial %d", serial);
 #endif
 
-    RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_START_NETWORK_SCAN4);
+    RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_START_NETWORK_SCAN);
     if (pRI == NULL) {
         return Void();
     }
 
-    // TODO: implement checks for new fields.
-    // NetworkScanRequest added maxSearchTime, incrementalResults, incrementalResultsPeriodicity and
-    // mccMncs, could add more validations using request2 here.
-
     RIL_NetworkScanRequest scan_request = {};
 
     if (prepareNetworkScanRequest_1_2(scan_request, request, pRI) < 0) {
         return Void();
     }
 
-    CALL_ONREQUEST(RIL_REQUEST_START_NETWORK_SCAN4, &scan_request, sizeof(scan_request), pRI,
+    CALL_ONREQUEST(RIL_REQUEST_START_NETWORK_SCAN, &scan_request, sizeof(scan_request), pRI,
             mSlotId);
 
     return Void();
@@ -3675,7 +3530,7 @@
     RLOGD("setRadioPower_1_5: serial %d powerOn %d forEmergency %d preferredForEmergencyCall %d",
         serial, powerOn, forEmergencyCall, preferredForEmergencyCall);
 #endif
-    dispatchVoid(serial, mSlotId, RIL_REQUEST_SET_RADIO_POWER_1_5);
+    dispatchVoid(serial, mSlotId, RIL_REQUEST_SET_RADIO_POWER);
     return Void();
 }
 
@@ -3687,37 +3542,134 @@
     return Void();
 }
 
-Return<void> RadioImpl_1_5::setSystemSelectionChannels_1_5(int32_t serial, bool /* specifyChannels */,
-        const hidl_vec<::android::hardware::radio::V1_5::RadioAccessSpecifier>& /* specifiers */) {
+Return<void> RadioImpl_1_5::getVoiceRegistrationState_1_5(int32_t serial) {
+#if VDBG
+    RLOGD("getVoiceRegistrationState: serial %d", serial);
+#endif
+    dispatchVoid(serial, mSlotId, RIL_REQUEST_VOICE_REGISTRATION_STATE);
+    return Void();
+}
+
+Return<void> RadioImpl_1_5::getDataRegistrationState_1_5(int32_t serial) {
+#if VDBG
+    RLOGD("getDataRegistrationState: serial %d", serial);
+#endif
+    dispatchVoid(serial, mSlotId, RIL_REQUEST_DATA_REGISTRATION_STATE);
+    return Void();
+}
+
+Return<void> RadioImpl_1_5::setSystemSelectionChannels_1_5(int32_t serial,
+        bool /* specifyChannels */, const hidl_vec<V1_5::RadioAccessSpecifier>& /* specifiers */) {
 #if VDBG
     RLOGD("setSystemSelectionChannels_1_5: serial %d", serial);
 #endif
-    dispatchVoid(serial, mSlotId, RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS_1_5);
+    dispatchVoid(serial, mSlotId, RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS);
     return Void();
 }
 
+int prepareNetworkScanRequest_1_5(RIL_NetworkScanRequest &scan_request,
+        const V1_5::NetworkScanRequest& request, RequestInfo *pRI) {
+    scan_request.type = (RIL_ScanType) request.type;
+    scan_request.interval = request.interval;
+    scan_request.specifiers_length = request.specifiers.size();
+
+    int intervalLow = static_cast<int>(V1_2::ScanIntervalRange::MIN);
+    int intervalHigh = static_cast<int>(V1_2::ScanIntervalRange::MAX);
+    int maxSearchTimeLow = static_cast<int>(V1_2::MaxSearchTimeRange::MIN);
+    int maxSearchTimeHigh = static_cast<int>(V1_2::MaxSearchTimeRange::MAX);
+    int incrementalResultsPeriodicityRangeLow =
+            static_cast<int>(V1_2::IncrementalResultsPeriodicityRange::MIN);
+    int incrementalResultsPeriodicityRangeHigh =
+            static_cast<int>(V1_2::IncrementalResultsPeriodicityRange::MAX);
+    uint maxSpecifierSize = static_cast<uint>(V1_2::RadioConst::RADIO_ACCESS_SPECIFIER_MAX_SIZE);
+
+    if (request.interval < intervalLow || request.interval > intervalHigh) {
+        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+        return -1;
+    }
+    // If defined, must fall in correct range.
+    if (request.maxSearchTime != 0 && (request.maxSearchTime < maxSearchTimeLow
+            || request.maxSearchTime > maxSearchTimeHigh)) {
+        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+        return -1;
+    }
+    if (request.maxSearchTime != 0
+            && (request.incrementalResultsPeriodicity < incrementalResultsPeriodicityRangeLow
+            || request.incrementalResultsPeriodicity > incrementalResultsPeriodicityRangeHigh
+            || request.incrementalResultsPeriodicity > request.maxSearchTime)) {
+        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+        return -1;
+    }
+    if (request.specifiers.size() == 0 || request.specifiers.size() > maxSpecifierSize) {
+        sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+        return -1;
+    }
+
+    for (size_t i = 0; i < request.specifiers.size(); ++i) {
+        if (request.specifiers[i].bands.geranBands().size() > MAX_BANDS
+                || request.specifiers[i].bands.utranBands().size() > MAX_BANDS
+                || request.specifiers[i].bands.eutranBands().size() > MAX_BANDS
+                || request.specifiers[i].bands.ngranBands().size() > MAX_BANDS
+                || request.specifiers[i].channels.size() > MAX_CHANNELS) {
+            sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+            return -1;
+        }
+        const V1_5::RadioAccessSpecifier& ras_from = request.specifiers[i];
+        RIL_RadioAccessSpecifier& ras_to = scan_request.specifiers[i];
+
+        ras_to.radio_access_network = (RIL_RadioAccessNetworks) ras_from.radioAccessNetwork;
+        ras_to.channels_length = ras_from.channels.size();
+
+        std::copy(ras_from.channels.begin(), ras_from.channels.end(), ras_to.channels);
+        const std::vector<uint32_t> * bands = nullptr;
+        switch (request.specifiers[i].radioAccessNetwork) {
+            case V1_5::RadioAccessNetworks::GERAN:
+                ras_to.bands_length = ras_from.bands.geranBands().size();
+                bands = (std::vector<uint32_t> *) &ras_from.bands;
+                break;
+            case V1_5::RadioAccessNetworks::UTRAN:
+                ras_to.bands_length = ras_from.bands.utranBands().size();
+                bands = (std::vector<uint32_t> *) &ras_from.bands;
+                break;
+            case V1_5::RadioAccessNetworks::EUTRAN:
+                ras_to.bands_length = ras_from.bands.eutranBands().size();
+                bands = (std::vector<uint32_t> *) &ras_from.bands;
+                break;
+            case V1_5::RadioAccessNetworks::NGRAN:
+                ras_to.bands_length = ras_from.bands.ngranBands().size();
+                bands = (std::vector<uint32_t> *) &ras_from.bands;
+                break;
+            default:
+                sendErrorResponse(pRI, RIL_E_INVALID_ARGUMENTS);
+                return -1;
+        }
+        // safe to copy to geran_bands because it's a union member
+        for (size_t idx = 0; idx < ras_to.bands_length; ++idx) {
+            ras_to.bands.geran_bands[idx] = (RIL_GeranBands) (*bands)[idx];
+        }
+    }
+
+    return 0;
+}
+
 Return<void> RadioImpl_1_5::startNetworkScan_1_5(int32_t serial,
         const ::android::hardware::radio::V1_5::NetworkScanRequest& request) {
 #if VDBG
     RLOGD("startNetworkScan_1_5: serial %d", serial);
 #endif
 
-    RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_START_NETWORK_SCAN_1_5);
+    RequestInfo *pRI = android::addRequestToList(serial, mSlotId, RIL_REQUEST_START_NETWORK_SCAN);
     if (pRI == NULL) {
         return Void();
     }
 
-    // TODO: implement checks for new fields.
-    // NetworkScanRequest added maxSearchTime, incrementalResults, incrementalResultsPeriodicity and
-    // mccMncs, could add more validations using request2 here.
-
     RIL_NetworkScanRequest scan_request = {};
 
     if (prepareNetworkScanRequest_1_5(scan_request, request, pRI) < 0) {
         return Void();
     }
 
-    CALL_ONREQUEST(RIL_REQUEST_START_NETWORK_SCAN_1_5, &scan_request, sizeof(scan_request), pRI,
+    CALL_ONREQUEST(RIL_REQUEST_START_NETWORK_SCAN, &scan_request, sizeof(scan_request), pRI,
             mSlotId);
 
     return Void();
@@ -3847,6 +3799,33 @@
     return Void();
 }
 
+Return<void> RadioImpl_1_5::sendCdmaSmsExpectMore(int32_t serial, const CdmaSmsMessage& sms) {
+#if VDBG
+    RLOGD("sendCdmaSmsExpectMore: serial %d", serial);
+#endif
+    RequestInfo *pRI = android::addRequestToList(serial, mSlotId,
+            RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE);
+    if (pRI == NULL) {
+        return Void();
+    }
+
+    RIL_CDMA_SMS_Message rcsm = {};
+    constructCdmaSms(rcsm, sms);
+
+    CALL_ONREQUEST(pRI->pCI->requestNumber, &rcsm, sizeof(rcsm), pRI, mSlotId);
+    return Void();
+}
+
+Return<void> RadioImpl_1_5::supplySimDepersonalization(int32_t serial,
+        V1_5::PersoSubstate persoType, const hidl_string& controlKey) {
+#if VDBG
+    RLOGD("supplySimDepersonalization: serial %d", serial);
+#endif
+    dispatchStrings(serial, mSlotId, RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION, true, 1,
+            controlKey.c_str());
+    return Void();
+}
+
 // OEM hook methods:
 Return<void> OemHookImpl::setResponseFunctions(
         const ::android::sp<IOemHookResponse>& oemHookResponseParam,
@@ -4175,37 +4154,6 @@
     return 0;
 }
 
-int radio_1_5::supplySimDepersonalizationResponse(int slotId,
-                                                 int responseType, int serial, RIL_Errno e,
-                                                 void *response, size_t responseLen) {
-#if VDBG
-    RLOGD("supplySimDepersonalizationResponse: serial %d", serial);
-#endif
-
-    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        int persoType = -1, remainingRetries = -1;
-        int numInts = responseLen / sizeof(int);
-        if (response == NULL || numInts != 2) {
-            RLOGE("getClirResponse Invalid response: NULL");
-            if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
-        } else {
-            int *pInt = (int *) response;
-            persoType = pInt[0];
-            remainingRetries = pInt[1];
-        }
-        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5->
-                supplySimDepersonalizationResponse(responseInfo, (::android::hardware::radio::V1_5::PersoSubstate) persoType,
-                                                   remainingRetries);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("supplySimDepersonalizationResponse: radioService[%d]->mRadioResponseV1_5 == "
-                "NULL", slotId);
-    }
-
-    return 0;
-}
-
 int radio_1_5::getCurrentCallsResponse(int slotId,
                                   int responseType, int serial, RIL_Errno e,
                                   void *response, size_t responseLen) {
@@ -4967,17 +4915,22 @@
 int radio_1_5::setRadioPowerResponse(int slotId,
                                 int responseType, int serial, RIL_Errno e, void *response,
                                 size_t responseLen) {
+#if VDBG
     RLOGD("setRadioPowerResponse: serial %d", serial);
+#endif
+    RadioResponseInfo responseInfo = {};
+    populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus = radioService[slotId]->mRadioResponse->setRadioPowerResponse(
-                responseInfo);
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->setRadioPowerResponse_1_5(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponse != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponse
+                ->setRadioPowerResponse(responseInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("setRadioPowerResponse: radioService[%d]->mRadioResponse == NULL",
-                slotId);
+        RLOGE("setRadioPowerResponse: radioService[%d]->mRadioResponse == NULL", slotId);
     }
 
     return 0;
@@ -5580,13 +5533,16 @@
 #if VDBG
     RLOGD("setNetworkSelectionModeManualResponse: serial %d", serial);
 #endif
+    RadioResponseInfo responseInfo = {};
+    populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponse->setNetworkSelectionModeManualResponse(
-                responseInfo);
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->setNetworkSelectionModeManualResponse_1_5(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponse != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponse
+                ->setNetworkSelectionModeManualResponse(responseInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
         RLOGE("acceptCallResponse: radioService[%d]->setNetworkSelectionModeManualResponse "
@@ -6410,28 +6366,6 @@
     return 0;
 }
 
-int radio_1_5::sendCdmaSmsExpectMoreResponse(int slotId,
-                              int responseType, int serial, RIL_Errno e, void *response,
-                              size_t responseLen) {
-#if VDBG
-    RLOGD("sendCdmaSmsExpectMoreResponse: serial %d", serial);
-#endif
-
-    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        SendSmsResult result = makeSendSmsResult(responseInfo, serial, responseType, e, response,
-                responseLen);
-
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_5->sendCdmaSmsExpectMoreResponse(responseInfo, result);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("sendCdmaSmsExpectMoreResponse: radioService[%d]->mRadioResponse == NULL", slotId);
-    }
-
-    return 0;
-}
-
 int radio_1_5::acknowledgeLastIncomingCdmaSmsResponse(int slotId,
                                                  int responseType, int serial, RIL_Errno e,
                                                  void *response, size_t responseLen) {
@@ -7615,36 +7549,19 @@
 #if VDBG
     RLOGD("setAllowedCarriersResponse: serial %d", serial);
 #endif
-
-    if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponse->setAllowedCarriersResponse(responseInfo,
-                ret);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("setAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
-                slotId);
-    }
-
-    return 0;
-}
-
-int radio_1_5::setAllowedCarriersResponse4(int slotId, int responseType, int serial, RIL_Errno e,
-                                    void *response, size_t responseLen) {
-#if VDBG
-    RLOGD("setAllowedCarriersResponse4: serial %d", serial);
-#endif
+    RadioResponseInfo responseInfo = {};
 
     if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_4->setAllowedCarriersResponse_1_4(responseInfo);
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_4
+                ->setAllowedCarriersResponse_1_4(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponse != NULL) {
+        int ret = responseInt(responseInfo, serial, responseType, e, response, responseLen);
+        Return<void> retStatus = radioService[slotId]->mRadioResponse
+                ->setAllowedCarriersResponse(responseInfo, ret);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("setAllowedCarriersResponse4: radioService[%d]->mRadioResponseV1_4 == NULL", slotId);
+        RLOGE("setAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL", slotId);
     }
 
     return 0;
@@ -7684,10 +7601,48 @@
 #if VDBG
     RLOGD("getAllowedCarriersResponse: serial %d", serial);
 #endif
+    RadioResponseInfo responseInfo = {};
+    populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
+    if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
+        V1_4::CarrierRestrictionsWithPriority carrierInfo = {};
+        V1_4::SimLockMultiSimPolicy multiSimPolicy =
+                V1_4::SimLockMultiSimPolicy::NO_MULTISIM_POLICY;
+        bool allAllowed = true;
+
+        if (response == NULL) {
+#if VDBG
+            RLOGD("getAllowedCarriersResponse response is NULL: all allowed");
+#endif
+            carrierInfo.allowedCarriers.resize(0);
+            carrierInfo.excludedCarriers.resize(0);
+            carrierInfo.allowedCarriersPrioritized = false;
+        } else if (responseLen != sizeof(RIL_CarrierRestrictionsWithPriority)) {
+            RLOGE("getAllowedCarriersResponse Invalid response");
+            if (e == RIL_E_SUCCESS) {
+                responseInfo.error = RadioError::INVALID_RESPONSE;
+            }
+        } else {
+            RIL_CarrierRestrictionsWithPriority *pCrExt =
+                    (RIL_CarrierRestrictionsWithPriority *)response;
+
+            // Convert into the structure used in IRadio 1.0 to re-use existing code
+            RIL_CarrierRestrictions cr = {};
+            cr.len_allowed_carriers = pCrExt->len_allowed_carriers;
+            cr.len_excluded_carriers = pCrExt->len_excluded_carriers;
+            cr.allowed_carriers = pCrExt->allowed_carriers;
+            cr.excluded_carriers = pCrExt->excluded_carriers;
+            prepareCarrierRestrictionsResponse(carrierInfo.allowedCarriers,
+                    carrierInfo.excludedCarriers, allAllowed, &cr);
+
+            carrierInfo.allowedCarriersPrioritized = (bool)pCrExt->allowedCarriersPrioritized;
+            multiSimPolicy = (V1_4::SimLockMultiSimPolicy)pCrExt->multiSimPolicy;
+        }
+
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_4
+                ->getAllowedCarriersResponse_1_4(responseInfo, carrierInfo, multiSimPolicy);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponse != NULL) {
         CarrierRestrictions carrierInfo = {};
         bool allAllowed = true;
         if (response == NULL) {
@@ -7703,70 +7658,15 @@
             }
         } else {
             RIL_CarrierRestrictions *pCr = (RIL_CarrierRestrictions *)response;
-            prepareCarrierRestrictionsResponse(carrierInfo.allowedCarriers, carrierInfo.excludedCarriers, allAllowed, pCr);
+            prepareCarrierRestrictionsResponse(carrierInfo.allowedCarriers,
+                    carrierInfo.excludedCarriers, allAllowed, pCr);
         }
 
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponse->getAllowedCarriersResponse(responseInfo,
-                allAllowed, carrierInfo);
+        Return<void> retStatus = radioService[slotId]->mRadioResponse
+                ->getAllowedCarriersResponse(responseInfo, allAllowed, carrierInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("getAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL",
-                slotId);
-    }
-
-    return 0;
-}
-
-int radio_1_5::getAllowedCarriersResponse4(int slotId,
-                                      int responseType, int serial, RIL_Errno e,
-                                      void *response, size_t responseLen) {
-#if VDBG
-    RLOGD("getAllowedCarriersResponse4: serial %d", serial);
-#endif
-
-    if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-
-        ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority carrierInfo = {};
-        ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicy =
-                ::android::hardware::radio::V1_4::SimLockMultiSimPolicy::NO_MULTISIM_POLICY;
-        bool allAllowed = true;
-
-        if (response == NULL) {
-#if VDBG
-            RLOGD("getAllowedCarriersResponse4 response is NULL: all allowed");
-#endif
-            carrierInfo.allowedCarriers.resize(0);
-            carrierInfo.excludedCarriers.resize(0);
-            carrierInfo.allowedCarriersPrioritized = false;
-        } else if (responseLen != sizeof(RIL_CarrierRestrictionsWithPriority)) {
-            RLOGE("getAllowedCarriersResponse4 Invalid response");
-            if (e == RIL_E_SUCCESS) {
-                responseInfo.error = RadioError::INVALID_RESPONSE;
-            }
-        } else {
-            RIL_CarrierRestrictionsWithPriority *pCrExt = (RIL_CarrierRestrictionsWithPriority *)response;
-
-            // Convert into the structure used in IRadio 1.0 to re-use existing code
-            RIL_CarrierRestrictions cr = {};
-            cr.len_allowed_carriers = pCrExt->len_allowed_carriers;
-            cr.len_excluded_carriers = pCrExt->len_excluded_carriers;
-            cr.allowed_carriers = pCrExt->allowed_carriers;
-            cr.excluded_carriers = pCrExt->excluded_carriers;
-            prepareCarrierRestrictionsResponse(carrierInfo.allowedCarriers, carrierInfo.excludedCarriers, allAllowed, &cr);
-
-            carrierInfo.allowedCarriersPrioritized = (bool)pCrExt->allowedCarriersPrioritized;
-            multiSimPolicy = (::android::hardware::radio::V1_4::SimLockMultiSimPolicy)pCrExt->multiSimPolicy;
-        }
-
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_4->getAllowedCarriersResponse_1_4(responseInfo,
-                carrierInfo, multiSimPolicy);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("getAllowedCarriersResponse4: radioService[%d]->mRadioResponseV1_4 == NULL", slotId);
+        RLOGE("getAllowedCarriersResponse: radioService[%d]->mRadioResponse == NULL", slotId);
     }
 
     return 0;
@@ -7815,16 +7715,19 @@
 #if VDBG
     RLOGD("setIndicationFilterResponse: serial %d", serial);
 #endif
+    RadioResponseInfo responseInfo = {};
+    populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponse->setIndicationFilterResponse(responseInfo);
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->setIndicationFilterResponse_1_5(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponse != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponse
+                ->setIndicationFilterResponse(responseInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("setIndicationFilterResponse: radioService[%d]->mRadioResponse == NULL",
-                slotId);
+        RLOGE("setIndicationFilterResponse: radioService[%d]->mRadioResponse == NULL", slotId);
     }
 
     return 0;
@@ -7864,33 +7767,23 @@
 #if VDBG
     RLOGD("startNetworkScanResponse: serial %d", serial);
 #endif
+    RadioResponseInfo responseInfo = {};
+    populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_4->startNetworkScanResponse(responseInfo);
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->startNetworkScanResponse_1_5(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_4
+                ->startNetworkScanResponse_1_4(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponseV1_2 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_2
+                ->startNetworkScanResponse(responseInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("startNetworkScanResponse: radioService[%d]->mRadioResponseV1_4 == NULL", slotId);
-    }
-
-    return 0;
-}
-
-int radio_1_5::startNetworkScanResponse4(int slotId, int responseType, int serial, RIL_Errno e,
-                                    void *response, size_t responseLen) {
-#if VDBG
-    RLOGD("startNetworkScanResponse4: serial %d", serial);
-#endif
-    if (radioService[slotId]->mRadioResponseV1_4 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_4->startNetworkScanResponse_1_4(responseInfo);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("startNetworkScanResponse: radioService[%d]->mRadioResponseV1_4 == NULL", slotId);
+        RLOGE("startNetworkScanResponse: radioService[%d]->mRadioResponse == NULL", slotId);
     }
 
     return 0;
@@ -8099,40 +7992,48 @@
 int radio_1_5::setSystemSelectionChannelsResponse(int slotId, int responseType, int serial,
                                         RIL_Errno e, void* /* response */, size_t responseLen) {
 #if VDBG
-    RLOGD("%s(): %d", __FUNCTION__, serial);
+    RLOGD("setSystemSelectionChannelsResponse: serial %d", serial);
 #endif
     RadioResponseInfo responseInfo = {};
     populateResponseInfo(responseInfo, serial, responseType, e);
 
-    // If we don't have a radio service, there's nothing we can do
-    if (radioService[slotId]->mRadioResponseV1_3 == NULL) {
-        RLOGE("%s: radioService[%d]->mRadioResponseV1_3 == NULL", __FUNCTION__, slotId);
-        return 0;
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->setSystemSelectionChannelsResponse_1_5(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponseV1_3 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_3
+                ->setSystemSelectionChannelsResponse(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else {
+        RLOGE("setSystemSelectionChannelsResponse: radioService[%d]->mRadioResponse == NULL",
+                slotId);
     }
 
-    Return<void> retStatus =
-            radioService[slotId]->mRadioResponseV1_3->setSystemSelectionChannelsResponse(
-            responseInfo);
-    radioService[slotId]->checkReturnStatus(retStatus);
     return 0;
 }
 
-int radio_1_5::setSignalStrengthReportingCriteriaResponse_1_5(int slotId, int responseType,
-                                        int serial, RIL_Errno e, void* /* response */,
-                                        size_t responseLen) {
+int radio_1_5::setSignalStrengthReportingCriteriaResponse(int slotId, int responseType, int serial,
+                                        RIL_Errno e, void* /* response */, size_t responseLen) {
 #if VDBG
-    RLOGD("%s(): %d", __FUNCTION__, serial);
+    RLOGD("setSignalStrengthReportingCriteriaResponse: serial %d", serial);
 #endif
     RadioResponseInfo responseInfo = {};
     populateResponseInfo(responseInfo, serial, responseType, e);
 
-    if (radioService[slotId]->mRadioResponseV1_5 == NULL) {
-        RLOGE("%s: radioService[%d]->mRadioResponseV1_5 == NULL", __FUNCTION__, slotId);
-        Return<void> retStatus =
-                radioService[slotId]->mRadioResponseV1_5->setSignalStrengthReportingCriteriaResponse_1_5(
-                responseInfo);
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->setSignalStrengthReportingCriteriaResponse_1_5(responseInfo);
         radioService[slotId]->checkReturnStatus(retStatus);
+    } else if (radioService[slotId]->mRadioResponseV1_2 != NULL) {
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_2
+                ->setSignalStrengthReportingCriteriaResponse(responseInfo);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else {
+        RLOGE("setSignalStrengthReportingCriteriaResponse: radioService[%d]->mRadioResponse "
+                "== NULL", slotId);
     }
+
     return 0;
 }
 
@@ -8185,87 +8086,6 @@
     return 0;
 }
 
-int radio_1_5::setSystemSelectionChannelsResponse_1_5(int slotId, int responseType, int serial,
-                                        RIL_Errno e, void* /* response */, size_t responseLen) {
-#if VDBG
-    RLOGD("%s(): %d", __FUNCTION__, serial);
-#endif
-    RadioResponseInfo responseInfo = {};
-    populateResponseInfo(responseInfo, serial, responseType, e);
-
-    // If we don't have a radio service, there's nothing we can do
-    if (radioService[slotId]->mRadioResponseV1_5 == NULL) {
-        RLOGE("%s: radioService[%d]->mRadioResponseV1_5 == NULL", __FUNCTION__, slotId);
-        return 0;
-    }
-
-    Return<void> retStatus =
-            radioService[slotId]->mRadioResponseV1_5->setSystemSelectionChannelsResponse_1_5(
-            responseInfo);
-    radioService[slotId]->checkReturnStatus(retStatus);
-    return 0;
-}
-
-int radio_1_5::startNetworkScanResponse_1_5(int slotId, int responseType, int serial, RIL_Errno e,
-                                    void *response, size_t responseLen) {
-#if VDBG
-    RLOGD("startNetworkScanResponse_1_5: serial %d", serial);
-#endif
-    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_5->startNetworkScanResponse_1_5(responseInfo);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("startNetworkScanResponse: radioService[%d]->mRadioResponseV1_5 == NULL", slotId);
-    }
-    return 0;
-}
-
-int radio_1_5::setRadioPowerResponse_1_5(int slotId, int responseType, int serial, RIL_Errno e,
-                                         void* /* response */, size_t responseLen) {
-#if VDBG
-    RLOGD("%s(): %d", __FUNCTION__, serial);
-#endif
-    RadioResponseInfo responseInfo = {};
-    populateResponseInfo(responseInfo, serial, responseType, e);
-
-    // If we don't have a radio service, there's nothing we can do
-    if (radioService[slotId]->mRadioResponseV1_5 == NULL) {
-        RLOGE("%s: radioService[%d]->mRadioResponseV1_5 == NULL", __FUNCTION__, slotId);
-        return 0;
-    }
-
-    Return<void> retStatus =
-            radioService[slotId]->mRadioResponseV1_5->setRadioPowerResponse_1_5(
-            responseInfo);
-    radioService[slotId]->checkReturnStatus(retStatus);
-    return 0;
-}
-
-int radio_1_5::setIndicationFilterResponse_1_5(int slotId,
-                              int responseType, int serial, RIL_Errno e,
-                              void *response, size_t responselen) {
-#if VDBG
-    RLOGD("setIndicationFilterResponse_1_5: serial %d", serial);
-#endif
-
-    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus
-                = radioService[slotId]->mRadioResponseV1_5->
-                        setIndicationFilterResponse_1_5(responseInfo);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else {
-        RLOGE("setIndicationFilterResponse_1_5: radioService[%d]->mRadioResponse == NULL",
-                slotId);
-    }
-
-    return 0;
-}
-
 int radio_1_5::getBarringInfoResponse(int slotId,
                               int responseType, int serial, RIL_Errno e,
                               void *response, size_t responselen) {
@@ -8289,28 +8109,52 @@
     return 0;
 }
 
-int radio_1_5::setNetworkSelectionModeManualResponse_1_5(int slotId,
-                             int responseType, int serial, RIL_Errno e,
-                             void *response, size_t responseLen) {
+int radio_1_5::sendCdmaSmsExpectMoreResponse(int slotId, int responseType, int serial, RIL_Errno e,
+                                             void *response, size_t responseLen) {
 #if VDBG
-    RLOGD("setNetworkSelectionModeManualResponse_1_5: serial %d", serial);
+    RLOGD("sendCdmaSmsExpectMoreResponse: serial %d", serial);
 #endif
 
     if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
         RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
+        SendSmsResult result = makeSendSmsResult(responseInfo, serial, responseType, e, response,
+                responseLen);
+
         Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
-                ->setNetworkSelectionModeManualResponse_1_5(responseInfo);
-        radioService[slotId]->checkReturnStatus(retStatus);
-    } else if (radioService[slotId]->mRadioResponse != NULL) {
-        RadioResponseInfo responseInfo = {};
-        populateResponseInfo(responseInfo, serial, responseType, e);
-        Return<void> retStatus = radioService[slotId]->mRadioResponse
-                ->setNetworkSelectionModeManualResponse(responseInfo);
+                ->sendCdmaSmsExpectMoreResponse(responseInfo, result);
         radioService[slotId]->checkReturnStatus(retStatus);
     } else {
-        RLOGE("acceptCallResponse: radioService[%d]->setNetworkSelectionModeManualResponse_1_5 "
-                "== NULL", slotId);
+        RLOGE("sendCdmaSmsExpectMoreResponse: radioService[%d]->mRadioResponse == NULL", slotId);
+    }
+
+    return 0;
+}
+
+int radio_1_5::supplySimDepersonalizationResponse(int slotId, int responseType, int serial,
+                                                  RIL_Errno e, void *response, size_t responseLen) {
+#if VDBG
+    RLOGD("supplySimDepersonalizationResponse: serial %d", serial);
+#endif
+
+    if (radioService[slotId]->mRadioResponseV1_5 != NULL) {
+        RadioResponseInfo responseInfo = {};
+        int persoType = -1, remainingRetries = -1;
+        int numInts = responseLen / sizeof(int);
+        if (response == NULL || numInts != 2) {
+            RLOGE("getClirResponse Invalid response: NULL");
+            if (e == RIL_E_SUCCESS) responseInfo.error = RadioError::INVALID_RESPONSE;
+        } else {
+            int *pInt = (int *) response;
+            persoType = pInt[0];
+            remainingRetries = pInt[1];
+        }
+        Return<void> retStatus = radioService[slotId]->mRadioResponseV1_5
+                ->supplySimDepersonalizationResponse(responseInfo, (V1_5::PersoSubstate) persoType,
+                remainingRetries);
+        radioService[slotId]->checkReturnStatus(retStatus);
+    } else {
+        RLOGE("supplySimDepersonalizationResponse: radioService[%d]->mRadioResponseV1_5 == "
+                "NULL", slotId);
     }
 
     return 0;
diff --git a/guest/hals/ril/libril/ril_service.h b/guest/hals/ril/libril/ril_service.h
index 037fccf..972764f 100644
--- a/guest/hals/ril/libril/ril_service.h
+++ b/guest/hals/ril/libril/ril_service.h
@@ -54,10 +54,6 @@
                                           int responseType, int serial, RIL_Errno e,
                                           void *response, size_t responselen);
 
-int supplySimDepersonalizationResponse(int slotId,
-                                          int responseType, int serial, RIL_Errno e,
-                                          void *response, size_t responselen);
-
 int getCurrentCallsResponse(int slotId,
                            int responseType, int serial, RIL_Errno e, void *response,
                            size_t responselen);
@@ -199,10 +195,6 @@
                                          int responseType, int serial, RIL_Errno e, void *response,
                                          size_t responselen);
 
-int setNetworkSelectionModeManualResponse_1_5(int slotId,
-                                             int responseType, int serial, RIL_Errno e,
-                                             void *response, size_t responselen);
-
 int getAvailableNetworksResponse(int slotId,
                                 int responseType, int serial, RIL_Errno e, void *response,
                                 size_t responselen);
@@ -211,14 +203,6 @@
                              int responseType, int serial, RIL_Errno e, void *response,
                              size_t responselen);
 
-int startNetworkScanResponse4(int slotId,
-                             int responseType, int serial, RIL_Errno e, void *response,
-                             size_t responselen);
-
-int startNetworkScanResponse_1_5(int slotId,
-                             int responseType, int serial, RIL_Errno e, void *response,
-                             size_t responselen);
-
 int stopNetworkScanResponse(int slotId,
                             int responseType, int serial, RIL_Errno e, void *response,
                             size_t responselen);
@@ -355,10 +339,6 @@
                        int responseType, int serial, RIL_Errno e, void *response,
                        size_t responselen);
 
-int sendCdmaSmsExpectMoreResponse(int slotId,
-                       int responseType, int serial, RIL_Errno e, void *response,
-                       size_t responselen);
-
 int acknowledgeLastIncomingCdmaSmsResponse(int slotId,
                                           int responseType, int serial, RIL_Errno e, void *response,
                                           size_t responselen);
@@ -784,23 +764,8 @@
                                int responseType, int serial, RIL_Errno e,
                                void *response, size_t responseLen);
 
-int setSystemSelectionChannelsResponse_1_5(int slotId,
-                               int responseType, int serial, RIL_Errno e,
-                               void *response, size_t responseLen);
-
-int setAllowedCarriersResponse4(int slotId,
-                                int responseType, int serial, RIL_Errno e,
-                                void *response,
-                                size_t responselen);
-
-int getAllowedCarriersResponse4(int slotId,
-                                int responseType, int serial, RIL_Errno e,
-                                void *response,
-                                size_t responselen);
-
-int setSignalStrengthReportingCriteriaResponse_1_5(int slotId,
-                          int responseType, int serial, RIL_Errno e,
-                          void *response, size_t responselen);
+int setSignalStrengthReportingCriteriaResponse(int slotId, int responseType, int serial,
+                                               RIL_Errno e, void *response, size_t responselen);
 
 int enableUiccApplicationsResponse(int slotId,
                                  int responseType, int serial, RIL_Errno e,
@@ -810,14 +775,17 @@
                                      int responseType, int serial, RIL_Errno e,
                                      void *response, size_t responselen);
 
-int setRadioPowerResponse_1_5(int slotId, int responseType, int serial, RIL_Errno e,
-                              void *response, size_t responselen);
+int setRadioPowerResponse(int slotId, int responseType, int serial, RIL_Errno e, void *response,
+                          size_t responselen);
 
-int setIndicationFilterResponse_1_5(int slotId, int responseType, int serial, RIL_Errno e,
-                              void *response, size_t responselen);
+int getBarringInfoResponse(int slotId, int responseType, int serial, RIL_Errno e, void *response,
+                           size_t responselen);
 
-int getBarringInfoResponse(int slotId, int responseType, int serial, RIL_Errno e,
-                              void *response, size_t responselen);
+int sendCdmaSmsExpectMoreResponse(int slotId, int responseType, int serial, RIL_Errno e,
+                                  void *response, size_t responselen);
+
+int supplySimDepersonalizationResponse(int slotId, int responseType, int serial, RIL_Errno e,
+                                       void *response, size_t responselen);
 
 pthread_rwlock_t * getRadioServiceRwlock(int slotId);