mainline:Replace serviceState.getDataRegState and getVoiceRegState

Replace serviceState.getVoiceRegState with getState
Replace serviceState.getDataRegState with getDataRegistrationState

Bug: 146637978
Test: atest TelephonyConnectionServiceTest (PASS)
atest ServiceStateProviderTest (PASS)
atest NumberVerificationManagerTest (PASS)
Change-Id: Id458f4e030186d4bb91573ba638e63280f246df3
Merged-In: Id458f4e030186d4bb91573ba638e63280f246df3
diff --git a/src/com/android/phone/NumberVerificationManager.java b/src/com/android/phone/NumberVerificationManager.java
index 9ec16f8..2298d40 100644
--- a/src/com/android/phone/NumberVerificationManager.java
+++ b/src/com/android/phone/NumberVerificationManager.java
@@ -135,7 +135,7 @@
                 }
 
                 // make sure at least one phone is registered for voice
-                if (phone.getServiceState().getVoiceRegState() == ServiceState.STATE_IN_SERVICE) {
+                if (phone.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) {
                     isAnyPhoneVoiceRegistered = true;
                 }
                 // make sure at least one phone has room for an incoming call.
diff --git a/src/com/android/phone/ServiceStateProvider.java b/src/com/android/phone/ServiceStateProvider.java
index 69ea27c..9e6ea83 100644
--- a/src/com/android/phone/ServiceStateProvider.java
+++ b/src/com/android/phone/ServiceStateProvider.java
@@ -209,8 +209,8 @@
             }
 
             // Build the result
-            final int voice_reg_state = ss.getVoiceRegState();
-            final int data_reg_state = ss.getDataRegState();
+            final int voice_reg_state = ss.getState();
+            final int data_reg_state = ss.getDataRegistrationState();
             final int voice_roaming_type = ss.getVoiceRoamingType();
             final int data_roaming_type = ss.getDataRoamingType();
             final String voice_operator_alpha_long = ss.getOperatorAlphaLong();
@@ -324,11 +324,11 @@
     }
 
     private static boolean voiceRegStateChanged(ServiceState oldSS, ServiceState newSS) {
-        return oldSS.getVoiceRegState() != newSS.getVoiceRegState();
+        return oldSS.getState() != newSS.getState();
     }
 
     private static boolean dataRegStateChanged(ServiceState oldSS, ServiceState newSS) {
-        return oldSS.getDataRegState() != newSS.getDataRegState();
+        return oldSS.getDataRegistrationState() != newSS.getDataRegistrationState();
     }
 
     private static boolean voiceRoamingTypeChanged(ServiceState oldSS, ServiceState newSS) {
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index bac4793..fe853fe 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -896,7 +896,7 @@
             int dataNetType = phone.getServiceState().getDataNetworkType();
             if (dataNetType == TelephonyManager.NETWORK_TYPE_LTE ||
                     dataNetType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
-                state = phone.getServiceState().getDataRegState();
+                state = phone.getServiceState().getDataRegistrationState();
             }
         }