Merge "Save data registration roaming state" into mnc-dev
This commit is contained in:
@@ -220,6 +220,8 @@ public class ServiceState implements Parcelable {
|
|||||||
private int mCdmaEriIconIndex;
|
private int mCdmaEriIconIndex;
|
||||||
private int mCdmaEriIconMode;
|
private int mCdmaEriIconMode;
|
||||||
|
|
||||||
|
private boolean mIsDataRoamingFromRegistration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get String description of roaming type
|
* get String description of roaming type
|
||||||
* @hide
|
* @hide
|
||||||
@@ -297,6 +299,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconIndex = s.mCdmaEriIconIndex;
|
mCdmaEriIconIndex = s.mCdmaEriIconIndex;
|
||||||
mCdmaEriIconMode = s.mCdmaEriIconMode;
|
mCdmaEriIconMode = s.mCdmaEriIconMode;
|
||||||
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
||||||
|
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -324,6 +327,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconIndex = in.readInt();
|
mCdmaEriIconIndex = in.readInt();
|
||||||
mCdmaEriIconMode = in.readInt();
|
mCdmaEriIconMode = in.readInt();
|
||||||
mIsEmergencyOnly = in.readInt() != 0;
|
mIsEmergencyOnly = in.readInt() != 0;
|
||||||
|
mIsDataRoamingFromRegistration = in.readInt() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
@@ -348,6 +352,7 @@ public class ServiceState implements Parcelable {
|
|||||||
out.writeInt(mCdmaEriIconIndex);
|
out.writeInt(mCdmaEriIconIndex);
|
||||||
out.writeInt(mCdmaEriIconMode);
|
out.writeInt(mCdmaEriIconMode);
|
||||||
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
||||||
|
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
@@ -438,6 +443,26 @@ public class ServiceState implements Parcelable {
|
|||||||
return mDataRoamingType != ROAMING_TYPE_NOT_ROAMING;
|
return mDataRoamingType != ROAMING_TYPE_NOT_ROAMING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set whether data network registration state is roaming
|
||||||
|
*
|
||||||
|
* This should only be set to the roaming value received
|
||||||
|
* once the data registration phase has completed.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void setDataRoamingFromRegistration(boolean dataRoaming) {
|
||||||
|
mIsDataRoamingFromRegistration = dataRoaming;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether data network registration state is roaming
|
||||||
|
* @return true if registration indicates roaming, false otherwise
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean getDataRoamingFromRegistration() {
|
||||||
|
return mIsDataRoamingFromRegistration;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current data network roaming type
|
* Get current data network roaming type
|
||||||
* @return roaming type
|
* @return roaming type
|
||||||
@@ -599,7 +624,8 @@ public class ServiceState implements Parcelable {
|
|||||||
+ ((null == mDataOperatorNumeric) ? 0 : mDataOperatorNumeric.hashCode())
|
+ ((null == mDataOperatorNumeric) ? 0 : mDataOperatorNumeric.hashCode())
|
||||||
+ mCdmaRoamingIndicator
|
+ mCdmaRoamingIndicator
|
||||||
+ mCdmaDefaultRoamingIndicator
|
+ mCdmaDefaultRoamingIndicator
|
||||||
+ (mIsEmergencyOnly ? 1 : 0));
|
+ (mIsEmergencyOnly ? 1 : 0)
|
||||||
|
+ (mIsDataRoamingFromRegistration ? 1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -635,7 +661,8 @@ public class ServiceState implements Parcelable {
|
|||||||
&& equalsHandlesNulls(mCdmaRoamingIndicator, s.mCdmaRoamingIndicator)
|
&& equalsHandlesNulls(mCdmaRoamingIndicator, s.mCdmaRoamingIndicator)
|
||||||
&& equalsHandlesNulls(mCdmaDefaultRoamingIndicator,
|
&& equalsHandlesNulls(mCdmaDefaultRoamingIndicator,
|
||||||
s.mCdmaDefaultRoamingIndicator)
|
s.mCdmaDefaultRoamingIndicator)
|
||||||
&& mIsEmergencyOnly == s.mIsEmergencyOnly);
|
&& mIsEmergencyOnly == s.mIsEmergencyOnly
|
||||||
|
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -736,7 +763,8 @@ public class ServiceState implements Parcelable {
|
|||||||
+ " " + mSystemId
|
+ " " + mSystemId
|
||||||
+ " RoamInd=" + mCdmaRoamingIndicator
|
+ " RoamInd=" + mCdmaRoamingIndicator
|
||||||
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
||||||
+ " EmergOnly=" + mIsEmergencyOnly);
|
+ " EmergOnly=" + mIsEmergencyOnly
|
||||||
|
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setNullState(int state) {
|
private void setNullState(int state) {
|
||||||
@@ -762,6 +790,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconIndex = -1;
|
mCdmaEriIconIndex = -1;
|
||||||
mCdmaEriIconMode = -1;
|
mCdmaEriIconMode = -1;
|
||||||
mIsEmergencyOnly = false;
|
mIsEmergencyOnly = false;
|
||||||
|
mIsDataRoamingFromRegistration = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStateOutOfService() {
|
public void setStateOutOfService() {
|
||||||
@@ -934,6 +963,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaRoamingIndicator = m.getInt("cdmaRoamingIndicator");
|
mCdmaRoamingIndicator = m.getInt("cdmaRoamingIndicator");
|
||||||
mCdmaDefaultRoamingIndicator = m.getInt("cdmaDefaultRoamingIndicator");
|
mCdmaDefaultRoamingIndicator = m.getInt("cdmaDefaultRoamingIndicator");
|
||||||
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
||||||
|
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -962,6 +992,7 @@ public class ServiceState implements Parcelable {
|
|||||||
m.putInt("cdmaRoamingIndicator", mCdmaRoamingIndicator);
|
m.putInt("cdmaRoamingIndicator", mCdmaRoamingIndicator);
|
||||||
m.putInt("cdmaDefaultRoamingIndicator", mCdmaDefaultRoamingIndicator);
|
m.putInt("cdmaDefaultRoamingIndicator", mCdmaDefaultRoamingIndicator);
|
||||||
m.putBoolean("emergencyOnly", Boolean.valueOf(mIsEmergencyOnly));
|
m.putBoolean("emergencyOnly", Boolean.valueOf(mIsEmergencyOnly));
|
||||||
|
m.putBoolean("isDataRoamingFromRegistration", Boolean.valueOf(mIsDataRoamingFromRegistration));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
|
|||||||
Reference in New Issue
Block a user