diff options
author | Chris Manton <cmanton@google.com> | 2015-08-11 22:28:55 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-11 22:28:55 +0000 |
commit | 5ace41f50ba202e34012863012d7cfc910acc7b7 (patch) | |
tree | 50736e23101a20908601e9900c141a1f76c8d2e6 /telephony | |
parent | af8c19e770717b209ca0c0cf0549eaeff8f1c78e (diff) | |
parent | 19aa341a3548c454c12378d7c4d92cc5074685a8 (diff) | |
download | frameworks_base-5ace41f50ba202e34012863012d7cfc910acc7b7.zip frameworks_base-5ace41f50ba202e34012863012d7cfc910acc7b7.tar.gz frameworks_base-5ace41f50ba202e34012863012d7cfc910acc7b7.tar.bz2 |
am 19aa341a: Merge "Save data registration roaming state" into mnc-dev
* commit '19aa341a3548c454c12378d7c4d92cc5074685a8':
Save data registration roaming state
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/ServiceState.java | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 303a492..80515cf 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -220,6 +220,8 @@ public class ServiceState implements Parcelable { private int mCdmaEriIconIndex; private int mCdmaEriIconMode; + private boolean mIsDataRoamingFromRegistration; + /** * get String description of roaming type * @hide @@ -297,6 +299,7 @@ public class ServiceState implements Parcelable { mCdmaEriIconIndex = s.mCdmaEriIconIndex; mCdmaEriIconMode = s.mCdmaEriIconMode; mIsEmergencyOnly = s.mIsEmergencyOnly; + mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration; } /** @@ -324,6 +327,7 @@ public class ServiceState implements Parcelable { mCdmaEriIconIndex = in.readInt(); mCdmaEriIconMode = in.readInt(); mIsEmergencyOnly = in.readInt() != 0; + mIsDataRoamingFromRegistration = in.readInt() != 0; } public void writeToParcel(Parcel out, int flags) { @@ -348,6 +352,7 @@ public class ServiceState implements Parcelable { out.writeInt(mCdmaEriIconIndex); out.writeInt(mCdmaEriIconMode); out.writeInt(mIsEmergencyOnly ? 1 : 0); + out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0); } public int describeContents() { @@ -439,6 +444,26 @@ public class ServiceState implements Parcelable { } /** + * 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 * @return roaming type * @hide @@ -599,7 +624,8 @@ public class ServiceState implements Parcelable { + ((null == mDataOperatorNumeric) ? 0 : mDataOperatorNumeric.hashCode()) + mCdmaRoamingIndicator + mCdmaDefaultRoamingIndicator - + (mIsEmergencyOnly ? 1 : 0)); + + (mIsEmergencyOnly ? 1 : 0) + + (mIsDataRoamingFromRegistration ? 1 : 0)); } @Override @@ -635,7 +661,8 @@ public class ServiceState implements Parcelable { && equalsHandlesNulls(mCdmaRoamingIndicator, s.mCdmaRoamingIndicator) && equalsHandlesNulls(mCdmaDefaultRoamingIndicator, s.mCdmaDefaultRoamingIndicator) - && mIsEmergencyOnly == s.mIsEmergencyOnly); + && mIsEmergencyOnly == s.mIsEmergencyOnly + && mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration); } /** @@ -736,7 +763,8 @@ public class ServiceState implements Parcelable { + " " + mSystemId + " RoamInd=" + mCdmaRoamingIndicator + " DefRoamInd=" + mCdmaDefaultRoamingIndicator - + " EmergOnly=" + mIsEmergencyOnly); + + " EmergOnly=" + mIsEmergencyOnly + + " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration); } private void setNullState(int state) { @@ -762,6 +790,7 @@ public class ServiceState implements Parcelable { mCdmaEriIconIndex = -1; mCdmaEriIconMode = -1; mIsEmergencyOnly = false; + mIsDataRoamingFromRegistration = false; } public void setStateOutOfService() { @@ -934,6 +963,7 @@ public class ServiceState implements Parcelable { mCdmaRoamingIndicator = m.getInt("cdmaRoamingIndicator"); mCdmaDefaultRoamingIndicator = m.getInt("cdmaDefaultRoamingIndicator"); mIsEmergencyOnly = m.getBoolean("emergencyOnly"); + mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration"); } /** @@ -962,6 +992,7 @@ public class ServiceState implements Parcelable { m.putInt("cdmaRoamingIndicator", mCdmaRoamingIndicator); m.putInt("cdmaDefaultRoamingIndicator", mCdmaDefaultRoamingIndicator); m.putBoolean("emergencyOnly", Boolean.valueOf(mIsEmergencyOnly)); + m.putBoolean("isDataRoamingFromRegistration", Boolean.valueOf(mIsDataRoamingFromRegistration)); } /** @hide */ |