summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-07-11 20:24:22 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-07-11 20:24:22 +0000
commita8a2b70e22fd0ff8e36ea1d985a1ad729e116a2c (patch)
tree7c226203cfc8a4d0439cf40126b2828295330e4b
parentef594270bfdf227a1231fc40e39d244f5fcc6eed (diff)
parentc683c3930e6d03825fd80fa71a2b3d5de5639f7d (diff)
Merge "Reordered the params for network registration"
-rw-r--r--telephony/java/android/telephony/NetworkRegistrationState.java30
-rw-r--r--telephony/java/android/telephony/ServiceState.java5
2 files changed, 18 insertions, 17 deletions
diff --git a/telephony/java/android/telephony/NetworkRegistrationState.java b/telephony/java/android/telephony/NetworkRegistrationState.java
index bba779d0c175..e881549489a3 100644
--- a/telephony/java/android/telephony/NetworkRegistrationState.java
+++ b/telephony/java/android/telephony/NetworkRegistrationState.java
@@ -85,12 +85,12 @@ public class NetworkRegistrationState implements Parcelable {
public static final int SERVICE_TYPE_VIDEO = 4;
public static final int SERVICE_TYPE_EMERGENCY = 5;
- /** {@link AccessNetworkConstants.TransportType}*/
- private final int mTransportType;
-
@Domain
private final int mDomain;
+ /** {@link AccessNetworkConstants.TransportType}*/
+ private final int mTransportType;
+
@RegState
private final int mRegState;
@@ -112,19 +112,19 @@ public class NetworkRegistrationState implements Parcelable {
private DataSpecificRegistrationStates mDataSpecificStates;
/**
- * @param transportType Transport type. Must be {@link AccessNetworkConstants.TransportType}
* @param domain Network domain. Must be DOMAIN_CS or DOMAIN_PS.
+ * @param transportType Transport type. Must be {@link AccessNetworkConstants.TransportType}
* @param regState Network registration state.
* @param accessNetworkTechnology See TelephonyManager NETWORK_TYPE_XXXX.
* @param reasonForDenial Reason for denial if the registration state is DENIED.
* @param availableServices The supported service.
* @param cellIdentity The identity representing a unique cell
*/
- public NetworkRegistrationState(int transportType, int domain, int regState,
+ public NetworkRegistrationState(int domain, int transportType, int regState,
int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
int[] availableServices, @Nullable CellIdentity cellIdentity) {
- mTransportType = transportType;
mDomain = domain;
+ mTransportType = transportType;
mRegState = regState;
mAccessNetworkTechnology = accessNetworkTechnology;
mReasonForDenial = reasonForDenial;
@@ -137,11 +137,11 @@ public class NetworkRegistrationState implements Parcelable {
* Constructor for voice network registration states.
* @hide
*/
- public NetworkRegistrationState(int transportType, int domain, int regState,
+ public NetworkRegistrationState(int domain, int transportType, int regState,
int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
int[] availableServices, @Nullable CellIdentity cellIdentity, boolean cssSupported,
int roamingIndicator, int systemIsInPrl, int defaultRoamingIndicator) {
- this(transportType, domain, regState, accessNetworkTechnology,
+ this(domain, transportType, regState, accessNetworkTechnology,
reasonForDenial, emergencyOnly, availableServices, cellIdentity);
mVoiceSpecificStates = new VoiceSpecificRegistrationStates(cssSupported, roamingIndicator,
@@ -152,18 +152,18 @@ public class NetworkRegistrationState implements Parcelable {
* Constructor for data network registration states.
* @hide
*/
- public NetworkRegistrationState(int transportType, int domain, int regState,
+ public NetworkRegistrationState(int domain, int transportType, int regState,
int accessNetworkTechnology, int reasonForDenial, boolean emergencyOnly,
int[] availableServices, @Nullable CellIdentity cellIdentity, int maxDataCalls) {
- this(transportType, domain, regState, accessNetworkTechnology,
+ this(domain, transportType, regState, accessNetworkTechnology,
reasonForDenial, emergencyOnly, availableServices, cellIdentity);
mDataSpecificStates = new DataSpecificRegistrationStates(maxDataCalls);
}
protected NetworkRegistrationState(Parcel source) {
- mTransportType = source.readInt();
mDomain = source.readInt();
+ mTransportType = source.readInt();
mRegState = source.readInt();
mAccessNetworkTechnology = source.readInt();
mReasonForDenial = source.readInt();
@@ -260,8 +260,8 @@ public class NetworkRegistrationState implements Parcelable {
@Override
public String toString() {
return new StringBuilder("NetworkRegistrationState{")
- .append("transportType=").append(mTransportType)
.append(" domain=").append((mDomain == DOMAIN_CS) ? "CS" : "PS")
+ .append("transportType=").append(mTransportType)
.append(" regState=").append(regStateToString(mRegState))
.append(" accessNetworkTechnology=")
.append(TelephonyManager.getNetworkTypeName(mAccessNetworkTechnology))
@@ -290,8 +290,8 @@ public class NetworkRegistrationState implements Parcelable {
}
NetworkRegistrationState other = (NetworkRegistrationState) o;
- return mTransportType == other.mTransportType
- && mDomain == other.mDomain
+ return mDomain == other.mDomain
+ && mTransportType == other.mTransportType
&& mRegState == other.mRegState
&& mAccessNetworkTechnology == other.mAccessNetworkTechnology
&& mReasonForDenial == other.mReasonForDenial
@@ -305,8 +305,8 @@ public class NetworkRegistrationState implements Parcelable {
@Override
public void writeToParcel(Parcel dest, int flags) {
- dest.writeInt(mTransportType);
dest.writeInt(mDomain);
+ dest.writeInt(mTransportType);
dest.writeInt(mRegState);
dest.writeInt(mAccessNetworkTechnology);
dest.writeInt(mReasonForDenial);
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index ae999c31a42a..9e8529e20a7b 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -1569,13 +1569,14 @@ public class ServiceState implements Parcelable {
/**
* Get the network registration states with given transport type and domain.
*
+ * @param domain The network domain. Must be {@link NetworkRegistrationState#DOMAIN_CS} or
+ * {@link NetworkRegistrationState#DOMAIN_PS}.
* @param transportType The transport type. See {@link AccessNetworkConstants.TransportType}
- * @param domain The network domain. Must be DOMAIN_CS or DOMAIN_PS.
* @return The matching NetworkRegistrationState.
* @hide
*/
@SystemApi
- public NetworkRegistrationState getNetworkRegistrationStates(int transportType, int domain) {
+ public NetworkRegistrationState getNetworkRegistrationStates(int domain, int transportType) {
synchronized (mNetworkRegistrationStates) {
for (NetworkRegistrationState networkRegistrationState : mNetworkRegistrationStates) {
if (networkRegistrationState.getTransportType() == transportType