Merge "Separate voice/data roaming state and type" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
647b437d07
@@ -31,4 +31,31 @@
|
|||||||
<!-- If this value is true, The mms content-disposition field is supported correctly.
|
<!-- If this value is true, The mms content-disposition field is supported correctly.
|
||||||
If false, Content-disposition fragments are ignored -->
|
If false, Content-disposition fragments are ignored -->
|
||||||
<bool name="config_mms_content_disposition_support">false</bool>
|
<bool name="config_mms_content_disposition_support">false</bool>
|
||||||
|
|
||||||
|
<!-- An array of CDMA roaming indicators which means international roaming -->
|
||||||
|
<integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
|
||||||
|
<item>2</item>
|
||||||
|
<item>74</item>
|
||||||
|
<item>124</item>
|
||||||
|
<item>125</item>
|
||||||
|
<item>126</item>
|
||||||
|
<item>157</item>
|
||||||
|
<item>158</item>
|
||||||
|
<item>159</item>
|
||||||
|
<item>193</item>
|
||||||
|
<item>194</item>
|
||||||
|
<item>195</item>
|
||||||
|
<item>196</item>
|
||||||
|
<item>197</item>
|
||||||
|
<item>198</item>
|
||||||
|
<item>228</item>
|
||||||
|
<item>229</item>
|
||||||
|
<item>230</item>
|
||||||
|
<item>231</item>
|
||||||
|
<item>232</item>
|
||||||
|
<item>233</item>
|
||||||
|
<item>234</item>
|
||||||
|
<item>235</item>
|
||||||
|
</integer-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -23,4 +23,31 @@
|
|||||||
|
|
||||||
<!-- Sprint need a 70 ms delay for 3way call -->
|
<!-- Sprint need a 70 ms delay for 3way call -->
|
||||||
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
||||||
|
|
||||||
|
<!-- An array of CDMA roaming indicators which means international roaming -->
|
||||||
|
<integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
|
||||||
|
<item>2</item>
|
||||||
|
<item>74</item>
|
||||||
|
<item>124</item>
|
||||||
|
<item>125</item>
|
||||||
|
<item>126</item>
|
||||||
|
<item>157</item>
|
||||||
|
<item>158</item>
|
||||||
|
<item>159</item>
|
||||||
|
<item>193</item>
|
||||||
|
<item>194</item>
|
||||||
|
<item>195</item>
|
||||||
|
<item>196</item>
|
||||||
|
<item>197</item>
|
||||||
|
<item>198</item>
|
||||||
|
<item>228</item>
|
||||||
|
<item>229</item>
|
||||||
|
<item>230</item>
|
||||||
|
<item>231</item>
|
||||||
|
<item>232</item>
|
||||||
|
<item>233</item>
|
||||||
|
<item>234</item>
|
||||||
|
<item>235</item>
|
||||||
|
</integer-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -27,4 +27,31 @@
|
|||||||
|
|
||||||
<!-- Sprint need a 70 ms delay for 3way call -->
|
<!-- Sprint need a 70 ms delay for 3way call -->
|
||||||
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
||||||
|
|
||||||
|
<!-- An array of CDMA roaming indicators which means international roaming -->
|
||||||
|
<integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
|
||||||
|
<item>2</item>
|
||||||
|
<item>74</item>
|
||||||
|
<item>124</item>
|
||||||
|
<item>125</item>
|
||||||
|
<item>126</item>
|
||||||
|
<item>157</item>
|
||||||
|
<item>158</item>
|
||||||
|
<item>159</item>
|
||||||
|
<item>193</item>
|
||||||
|
<item>194</item>
|
||||||
|
<item>195</item>
|
||||||
|
<item>196</item>
|
||||||
|
<item>197</item>
|
||||||
|
<item>198</item>
|
||||||
|
<item>228</item>
|
||||||
|
<item>229</item>
|
||||||
|
<item>230</item>
|
||||||
|
<item>231</item>
|
||||||
|
<item>232</item>
|
||||||
|
<item>233</item>
|
||||||
|
<item>234</item>
|
||||||
|
<item>235</item>
|
||||||
|
</integer-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -27,4 +27,31 @@
|
|||||||
|
|
||||||
<!-- Sprint need a 70 ms delay for 3way call -->
|
<!-- Sprint need a 70 ms delay for 3way call -->
|
||||||
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
<integer name="config_cdma_3waycall_flash_delay">70</integer>
|
||||||
|
|
||||||
|
<!-- An array of CDMA roaming indicators which means international roaming -->
|
||||||
|
<integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
|
||||||
|
<item>2</item>
|
||||||
|
<item>74</item>
|
||||||
|
<item>124</item>
|
||||||
|
<item>125</item>
|
||||||
|
<item>126</item>
|
||||||
|
<item>157</item>
|
||||||
|
<item>158</item>
|
||||||
|
<item>159</item>
|
||||||
|
<item>193</item>
|
||||||
|
<item>194</item>
|
||||||
|
<item>195</item>
|
||||||
|
<item>196</item>
|
||||||
|
<item>197</item>
|
||||||
|
<item>198</item>
|
||||||
|
<item>228</item>
|
||||||
|
<item>229</item>
|
||||||
|
<item>230</item>
|
||||||
|
<item>231</item>
|
||||||
|
<item>232</item>
|
||||||
|
<item>233</item>
|
||||||
|
<item>234</item>
|
||||||
|
<item>235</item>
|
||||||
|
</integer-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1952,4 +1952,8 @@
|
|||||||
<dimen name="config_mediaMetadataBitmapMaxSize">320dp</dimen>
|
<dimen name="config_mediaMetadataBitmapMaxSize">320dp</dimen>
|
||||||
|
|
||||||
<string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">false</string>
|
<string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">false</string>
|
||||||
|
|
||||||
|
<!-- An array of CDMA roaming indicators which means international roaming -->
|
||||||
|
<integer-array translatable="false" name="config_cdma_international_roaming_indicators" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -2138,5 +2138,6 @@
|
|||||||
<java-symbol type="string" name="system_error_wipe_data" />
|
<java-symbol type="string" name="system_error_wipe_data" />
|
||||||
<java-symbol type="string" name="system_error_manufacturer" />
|
<java-symbol type="string" name="system_error_manufacturer" />
|
||||||
<java-symbol type="dimen" name="fast_scroller_minimum_touch_target" />
|
<java-symbol type="dimen" name="fast_scroller_minimum_touch_target" />
|
||||||
|
<java-symbol type="array" name="config_cdma_international_roaming_indicators" />
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -167,10 +167,40 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
private int mVoiceRegState = STATE_OUT_OF_SERVICE;
|
private int mVoiceRegState = STATE_OUT_OF_SERVICE;
|
||||||
private int mDataRegState = STATE_OUT_OF_SERVICE;
|
private int mDataRegState = STATE_OUT_OF_SERVICE;
|
||||||
private boolean mRoaming;
|
|
||||||
private String mOperatorAlphaLong;
|
/**
|
||||||
private String mOperatorAlphaShort;
|
* Roaming type
|
||||||
private String mOperatorNumeric;
|
* HOME : in home network
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int ROAMING_TYPE_NOT_ROAMING = 0;
|
||||||
|
/**
|
||||||
|
* Roaming type
|
||||||
|
* UNKNOWN : in a roaming network, but we can not tell if it's domestic or international
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int ROAMING_TYPE_UNKNOWN = 1;
|
||||||
|
/**
|
||||||
|
* Roaming type
|
||||||
|
* DOMESTIC : in domestic roaming network
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int ROAMING_TYPE_DOMESTIC = 2;
|
||||||
|
/**
|
||||||
|
* Roaming type
|
||||||
|
* INTERNATIONAL : in international roaming network
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final int ROAMING_TYPE_INTERNATIONAL = 3;
|
||||||
|
|
||||||
|
private int mVoiceRoamingType;
|
||||||
|
private int mDataRoamingType;
|
||||||
|
private String mVoiceOperatorAlphaLong;
|
||||||
|
private String mVoiceOperatorAlphaShort;
|
||||||
|
private String mVoiceOperatorNumeric;
|
||||||
|
private String mDataOperatorAlphaLong;
|
||||||
|
private String mDataOperatorAlphaShort;
|
||||||
|
private String mDataOperatorNumeric;
|
||||||
private boolean mIsManualNetworkSelection;
|
private boolean mIsManualNetworkSelection;
|
||||||
|
|
||||||
private boolean mIsEmergencyOnly;
|
private boolean mIsEmergencyOnly;
|
||||||
@@ -186,6 +216,29 @@ public class ServiceState implements Parcelable {
|
|||||||
private int mCdmaEriIconIndex;
|
private int mCdmaEriIconIndex;
|
||||||
private int mCdmaEriIconMode;
|
private int mCdmaEriIconMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get String description of roaming type
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String getRoamingLogString(int roamingType) {
|
||||||
|
switch (roamingType) {
|
||||||
|
case ROAMING_TYPE_NOT_ROAMING:
|
||||||
|
return "home";
|
||||||
|
|
||||||
|
case ROAMING_TYPE_UNKNOWN:
|
||||||
|
return "roaming";
|
||||||
|
|
||||||
|
case ROAMING_TYPE_DOMESTIC:
|
||||||
|
return "Domestic Roaming";
|
||||||
|
|
||||||
|
case ROAMING_TYPE_INTERNATIONAL:
|
||||||
|
return "International Roaming";
|
||||||
|
|
||||||
|
default:
|
||||||
|
return "UNKNOWN";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new ServiceState from a intent notifier Bundle
|
* Create a new ServiceState from a intent notifier Bundle
|
||||||
*
|
*
|
||||||
@@ -221,10 +274,14 @@ public class ServiceState implements Parcelable {
|
|||||||
protected void copyFrom(ServiceState s) {
|
protected void copyFrom(ServiceState s) {
|
||||||
mVoiceRegState = s.mVoiceRegState;
|
mVoiceRegState = s.mVoiceRegState;
|
||||||
mDataRegState = s.mDataRegState;
|
mDataRegState = s.mDataRegState;
|
||||||
mRoaming = s.mRoaming;
|
mVoiceRoamingType = s.mVoiceRoamingType;
|
||||||
mOperatorAlphaLong = s.mOperatorAlphaLong;
|
mDataRoamingType = s.mDataRoamingType;
|
||||||
mOperatorAlphaShort = s.mOperatorAlphaShort;
|
mVoiceOperatorAlphaLong = s.mVoiceOperatorAlphaLong;
|
||||||
mOperatorNumeric = s.mOperatorNumeric;
|
mVoiceOperatorAlphaShort = s.mVoiceOperatorAlphaShort;
|
||||||
|
mVoiceOperatorNumeric = s.mVoiceOperatorNumeric;
|
||||||
|
mDataOperatorAlphaLong = s.mDataOperatorAlphaLong;
|
||||||
|
mDataOperatorAlphaShort = s.mDataOperatorAlphaShort;
|
||||||
|
mDataOperatorNumeric = s.mDataOperatorNumeric;
|
||||||
mIsManualNetworkSelection = s.mIsManualNetworkSelection;
|
mIsManualNetworkSelection = s.mIsManualNetworkSelection;
|
||||||
mRilVoiceRadioTechnology = s.mRilVoiceRadioTechnology;
|
mRilVoiceRadioTechnology = s.mRilVoiceRadioTechnology;
|
||||||
mRilDataRadioTechnology = s.mRilDataRadioTechnology;
|
mRilDataRadioTechnology = s.mRilDataRadioTechnology;
|
||||||
@@ -244,10 +301,14 @@ public class ServiceState implements Parcelable {
|
|||||||
public ServiceState(Parcel in) {
|
public ServiceState(Parcel in) {
|
||||||
mVoiceRegState = in.readInt();
|
mVoiceRegState = in.readInt();
|
||||||
mDataRegState = in.readInt();
|
mDataRegState = in.readInt();
|
||||||
mRoaming = in.readInt() != 0;
|
mVoiceRoamingType = in.readInt();
|
||||||
mOperatorAlphaLong = in.readString();
|
mDataRoamingType = in.readInt();
|
||||||
mOperatorAlphaShort = in.readString();
|
mVoiceOperatorAlphaLong = in.readString();
|
||||||
mOperatorNumeric = in.readString();
|
mVoiceOperatorAlphaShort = in.readString();
|
||||||
|
mVoiceOperatorNumeric = in.readString();
|
||||||
|
mDataOperatorAlphaLong = in.readString();
|
||||||
|
mDataOperatorAlphaShort = in.readString();
|
||||||
|
mDataOperatorNumeric = in.readString();
|
||||||
mIsManualNetworkSelection = in.readInt() != 0;
|
mIsManualNetworkSelection = in.readInt() != 0;
|
||||||
mRilVoiceRadioTechnology = in.readInt();
|
mRilVoiceRadioTechnology = in.readInt();
|
||||||
mRilDataRadioTechnology = in.readInt();
|
mRilDataRadioTechnology = in.readInt();
|
||||||
@@ -264,10 +325,14 @@ public class ServiceState implements Parcelable {
|
|||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
out.writeInt(mVoiceRegState);
|
out.writeInt(mVoiceRegState);
|
||||||
out.writeInt(mDataRegState);
|
out.writeInt(mDataRegState);
|
||||||
out.writeInt(mRoaming ? 1 : 0);
|
out.writeInt(mVoiceRoamingType);
|
||||||
out.writeString(mOperatorAlphaLong);
|
out.writeInt(mDataRoamingType);
|
||||||
out.writeString(mOperatorAlphaShort);
|
out.writeString(mVoiceOperatorAlphaLong);
|
||||||
out.writeString(mOperatorNumeric);
|
out.writeString(mVoiceOperatorAlphaShort);
|
||||||
|
out.writeString(mVoiceOperatorNumeric);
|
||||||
|
out.writeString(mDataOperatorAlphaLong);
|
||||||
|
out.writeString(mDataOperatorAlphaShort);
|
||||||
|
out.writeString(mDataOperatorNumeric);
|
||||||
out.writeInt(mIsManualNetworkSelection ? 1 : 0);
|
out.writeInt(mIsManualNetworkSelection ? 1 : 0);
|
||||||
out.writeInt(mRilVoiceRadioTechnology);
|
out.writeInt(mRilVoiceRadioTechnology);
|
||||||
out.writeInt(mRilDataRadioTechnology);
|
out.writeInt(mRilDataRadioTechnology);
|
||||||
@@ -337,10 +402,45 @@ public class ServiceState implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return true if TS 27.007 7.2 roaming is true
|
* @return true if TS 27.007 7.2 roaming is true
|
||||||
* and ONS is different from SPN
|
* and ONS is different from SPN
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public boolean getRoaming() {
|
public boolean getRoaming() {
|
||||||
return mRoaming;
|
return getVoiceRoaming() || getDataRoaming();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current voice network roaming status
|
||||||
|
* @return roaming status
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean getVoiceRoaming() {
|
||||||
|
return mVoiceRoamingType != ROAMING_TYPE_NOT_ROAMING;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current voice network roaming type
|
||||||
|
* @return roaming type
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public int getVoiceRoamingType() {
|
||||||
|
return mVoiceRoamingType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current data network roaming type
|
||||||
|
* @return roaming type
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean getDataRoaming() {
|
||||||
|
return mDataRoamingType != ROAMING_TYPE_NOT_ROAMING;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current data network roaming type
|
||||||
|
* @return roaming type
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public int getDataRoamingType() {
|
||||||
|
return mDataRoamingType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -387,7 +487,25 @@ public class ServiceState implements Parcelable {
|
|||||||
* @return long name of operator, null if unregistered or unknown
|
* @return long name of operator, null if unregistered or unknown
|
||||||
*/
|
*/
|
||||||
public String getOperatorAlphaLong() {
|
public String getOperatorAlphaLong() {
|
||||||
return mOperatorAlphaLong;
|
return mVoiceOperatorAlphaLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered voice network operator name in long alphanumeric format.
|
||||||
|
* @return long name of operator
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getVoiceOperatorAlphaLong() {
|
||||||
|
return mVoiceOperatorAlphaLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered data network operator name in long alphanumeric format.
|
||||||
|
* @return long name of voice operator
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getDataOperatorAlphaLong() {
|
||||||
|
return mDataOperatorAlphaLong;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -398,7 +516,25 @@ public class ServiceState implements Parcelable {
|
|||||||
* @return short name of operator, null if unregistered or unknown
|
* @return short name of operator, null if unregistered or unknown
|
||||||
*/
|
*/
|
||||||
public String getOperatorAlphaShort() {
|
public String getOperatorAlphaShort() {
|
||||||
return mOperatorAlphaShort;
|
return mVoiceOperatorAlphaShort;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered voice network operator name in short alphanumeric format.
|
||||||
|
* @return short name of operator, null if unregistered or unknown
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getVoiceOperatorAlphaShort() {
|
||||||
|
return mVoiceOperatorAlphaShort;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered data network operator name in short alphanumeric format.
|
||||||
|
* @return short name of operator, null if unregistered or unknown
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getDataOperatorAlphaShort() {
|
||||||
|
return mDataOperatorAlphaShort;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -414,7 +550,25 @@ public class ServiceState implements Parcelable {
|
|||||||
* {@link com.android.internal.telephony.MccTable#countryCodeForMcc(int)}.
|
* {@link com.android.internal.telephony.MccTable#countryCodeForMcc(int)}.
|
||||||
*/
|
*/
|
||||||
public String getOperatorNumeric() {
|
public String getOperatorNumeric() {
|
||||||
return mOperatorNumeric;
|
return mVoiceOperatorNumeric;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered voice network operator numeric id.
|
||||||
|
* @return numeric format of operator, null if unregistered or unknown
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getVoiceOperatorNumeric() {
|
||||||
|
return mVoiceOperatorNumeric;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current registered data network operator numeric id.
|
||||||
|
* @return numeric format of operator, null if unregistered or unknown
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public String getDataOperatorNumeric() {
|
||||||
|
return mDataOperatorNumeric;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -430,11 +584,15 @@ public class ServiceState implements Parcelable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return ((mVoiceRegState * 31)
|
return ((mVoiceRegState * 31)
|
||||||
+ (mDataRegState * 37)
|
+ (mDataRegState * 37)
|
||||||
+ (mRoaming ? 1 : 0)
|
+ mVoiceRoamingType
|
||||||
|
+ mDataRoamingType
|
||||||
+ (mIsManualNetworkSelection ? 1 : 0)
|
+ (mIsManualNetworkSelection ? 1 : 0)
|
||||||
+ ((null == mOperatorAlphaLong) ? 0 : mOperatorAlphaLong.hashCode())
|
+ ((null == mVoiceOperatorAlphaLong) ? 0 : mVoiceOperatorAlphaLong.hashCode())
|
||||||
+ ((null == mOperatorAlphaShort) ? 0 : mOperatorAlphaShort.hashCode())
|
+ ((null == mVoiceOperatorAlphaShort) ? 0 : mVoiceOperatorAlphaShort.hashCode())
|
||||||
+ ((null == mOperatorNumeric) ? 0 : mOperatorNumeric.hashCode())
|
+ ((null == mVoiceOperatorNumeric) ? 0 : mVoiceOperatorNumeric.hashCode())
|
||||||
|
+ ((null == mDataOperatorAlphaLong) ? 0 : mDataOperatorAlphaLong.hashCode())
|
||||||
|
+ ((null == mDataOperatorAlphaShort) ? 0 : mDataOperatorAlphaShort.hashCode())
|
||||||
|
+ ((null == mDataOperatorNumeric) ? 0 : mDataOperatorNumeric.hashCode())
|
||||||
+ mCdmaRoamingIndicator
|
+ mCdmaRoamingIndicator
|
||||||
+ mCdmaDefaultRoamingIndicator
|
+ mCdmaDefaultRoamingIndicator
|
||||||
+ (mIsEmergencyOnly ? 1 : 0));
|
+ (mIsEmergencyOnly ? 1 : 0));
|
||||||
@@ -456,11 +614,15 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
return (mVoiceRegState == s.mVoiceRegState
|
return (mVoiceRegState == s.mVoiceRegState
|
||||||
&& mDataRegState == s.mDataRegState
|
&& mDataRegState == s.mDataRegState
|
||||||
&& mRoaming == s.mRoaming
|
|
||||||
&& mIsManualNetworkSelection == s.mIsManualNetworkSelection
|
&& mIsManualNetworkSelection == s.mIsManualNetworkSelection
|
||||||
&& equalsHandlesNulls(mOperatorAlphaLong, s.mOperatorAlphaLong)
|
&& mVoiceRoamingType == s.mVoiceRoamingType
|
||||||
&& equalsHandlesNulls(mOperatorAlphaShort, s.mOperatorAlphaShort)
|
&& mDataRoamingType == s.mDataRoamingType
|
||||||
&& equalsHandlesNulls(mOperatorNumeric, s.mOperatorNumeric)
|
&& equalsHandlesNulls(mVoiceOperatorAlphaLong, s.mVoiceOperatorAlphaLong)
|
||||||
|
&& equalsHandlesNulls(mVoiceOperatorAlphaShort, s.mVoiceOperatorAlphaShort)
|
||||||
|
&& equalsHandlesNulls(mVoiceOperatorNumeric, s.mVoiceOperatorNumeric)
|
||||||
|
&& equalsHandlesNulls(mDataOperatorAlphaLong, s.mDataOperatorAlphaLong)
|
||||||
|
&& equalsHandlesNulls(mDataOperatorAlphaShort, s.mDataOperatorAlphaShort)
|
||||||
|
&& equalsHandlesNulls(mDataOperatorNumeric, s.mDataOperatorNumeric)
|
||||||
&& equalsHandlesNulls(mRilVoiceRadioTechnology, s.mRilVoiceRadioTechnology)
|
&& equalsHandlesNulls(mRilVoiceRadioTechnology, s.mRilVoiceRadioTechnology)
|
||||||
&& equalsHandlesNulls(mRilDataRadioTechnology, s.mRilDataRadioTechnology)
|
&& equalsHandlesNulls(mRilDataRadioTechnology, s.mRilDataRadioTechnology)
|
||||||
&& equalsHandlesNulls(mCssIndicator, s.mCssIndicator)
|
&& equalsHandlesNulls(mCssIndicator, s.mCssIndicator)
|
||||||
@@ -548,10 +710,17 @@ public class ServiceState implements Parcelable {
|
|||||||
String radioTechnology = rilRadioTechnologyToString(mRilVoiceRadioTechnology);
|
String radioTechnology = rilRadioTechnologyToString(mRilVoiceRadioTechnology);
|
||||||
String dataRadioTechnology = rilRadioTechnologyToString(mRilDataRadioTechnology);
|
String dataRadioTechnology = rilRadioTechnologyToString(mRilDataRadioTechnology);
|
||||||
|
|
||||||
return (mVoiceRegState + " " + mDataRegState + " " + (mRoaming ? "roaming" : "home")
|
return (mVoiceRegState + " " + mDataRegState
|
||||||
+ " " + mOperatorAlphaLong
|
+ " "
|
||||||
+ " " + mOperatorAlphaShort
|
+ "voice " + getRoamingLogString(mVoiceRoamingType)
|
||||||
+ " " + mOperatorNumeric
|
+ " "
|
||||||
|
+ "data " + getRoamingLogString(mDataRoamingType)
|
||||||
|
+ " " + mVoiceOperatorAlphaLong
|
||||||
|
+ " " + mVoiceOperatorAlphaShort
|
||||||
|
+ " " + mVoiceOperatorNumeric
|
||||||
|
+ " " + mDataOperatorAlphaLong
|
||||||
|
+ " " + mDataOperatorAlphaShort
|
||||||
|
+ " " + mDataOperatorNumeric
|
||||||
+ " " + (mIsManualNetworkSelection ? "(manual)" : "")
|
+ " " + (mIsManualNetworkSelection ? "(manual)" : "")
|
||||||
+ " " + radioTechnology
|
+ " " + radioTechnology
|
||||||
+ " " + dataRadioTechnology
|
+ " " + dataRadioTechnology
|
||||||
@@ -567,10 +736,14 @@ public class ServiceState implements Parcelable {
|
|||||||
if (DBG) Rlog.d(LOG_TAG, "[ServiceState] setNullState=" + state);
|
if (DBG) Rlog.d(LOG_TAG, "[ServiceState] setNullState=" + state);
|
||||||
mVoiceRegState = state;
|
mVoiceRegState = state;
|
||||||
mDataRegState = state;
|
mDataRegState = state;
|
||||||
mRoaming = false;
|
mVoiceRoamingType = ROAMING_TYPE_NOT_ROAMING;
|
||||||
mOperatorAlphaLong = null;
|
mDataRoamingType = ROAMING_TYPE_NOT_ROAMING;
|
||||||
mOperatorAlphaShort = null;
|
mVoiceOperatorAlphaLong = null;
|
||||||
mOperatorNumeric = null;
|
mVoiceOperatorAlphaShort = null;
|
||||||
|
mVoiceOperatorNumeric = null;
|
||||||
|
mDataOperatorAlphaLong = null;
|
||||||
|
mDataOperatorAlphaShort = null;
|
||||||
|
mDataOperatorNumeric = null;
|
||||||
mIsManualNetworkSelection = false;
|
mIsManualNetworkSelection = false;
|
||||||
mRilVoiceRadioTechnology = 0;
|
mRilVoiceRadioTechnology = 0;
|
||||||
mRilDataRadioTechnology = 0;
|
mRilDataRadioTechnology = 0;
|
||||||
@@ -610,9 +783,29 @@ public class ServiceState implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setRoaming(boolean roaming) {
|
public void setRoaming(boolean roaming) {
|
||||||
mRoaming = roaming;
|
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
|
||||||
|
mDataRoamingType = mVoiceRoamingType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setVoiceRoaming(boolean roaming) {
|
||||||
|
mVoiceRoamingType = (roaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setVoiceRoamingType(int type) {
|
||||||
|
mVoiceRoamingType = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setDataRoaming(boolean dataRoaming) {
|
||||||
|
mDataRoamingType = (dataRoaming ? ROAMING_TYPE_UNKNOWN : ROAMING_TYPE_NOT_ROAMING);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setDataRoamingType(int type) {
|
||||||
|
mDataRoamingType = type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
@@ -650,9 +843,26 @@ public class ServiceState implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setOperatorName(String longName, String shortName, String numeric) {
|
public void setOperatorName(String longName, String shortName, String numeric) {
|
||||||
mOperatorAlphaLong = longName;
|
mVoiceOperatorAlphaLong = longName;
|
||||||
mOperatorAlphaShort = shortName;
|
mVoiceOperatorAlphaShort = shortName;
|
||||||
mOperatorNumeric = numeric;
|
mVoiceOperatorNumeric = numeric;
|
||||||
|
mDataOperatorAlphaLong = longName;
|
||||||
|
mDataOperatorAlphaShort = shortName;
|
||||||
|
mDataOperatorNumeric = numeric;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setVoiceOperatorName(String longName, String shortName, String numeric) {
|
||||||
|
mVoiceOperatorAlphaLong = longName;
|
||||||
|
mVoiceOperatorAlphaShort = shortName;
|
||||||
|
mVoiceOperatorNumeric = numeric;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setDataOperatorName(String longName, String shortName, String numeric) {
|
||||||
|
mDataOperatorAlphaLong = longName;
|
||||||
|
mDataOperatorAlphaShort = shortName;
|
||||||
|
mDataOperatorNumeric = numeric;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -662,7 +872,18 @@ public class ServiceState implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void setOperatorAlphaLong(String longName) {
|
public void setOperatorAlphaLong(String longName) {
|
||||||
mOperatorAlphaLong = longName;
|
mVoiceOperatorAlphaLong = longName;
|
||||||
|
mDataOperatorAlphaLong = longName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setVoiceOperatorAlphaLong(String longName) {
|
||||||
|
mVoiceOperatorAlphaLong = longName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setDataOperatorAlphaLong(String longName) {
|
||||||
|
mDataOperatorAlphaLong = longName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIsManualSelection(boolean isManual) {
|
public void setIsManualSelection(boolean isManual) {
|
||||||
@@ -689,10 +910,14 @@ public class ServiceState implements Parcelable {
|
|||||||
private void setFromNotifierBundle(Bundle m) {
|
private void setFromNotifierBundle(Bundle m) {
|
||||||
mVoiceRegState = m.getInt("voiceRegState");
|
mVoiceRegState = m.getInt("voiceRegState");
|
||||||
mDataRegState = m.getInt("dataRegState");
|
mDataRegState = m.getInt("dataRegState");
|
||||||
mRoaming = m.getBoolean("roaming");
|
mVoiceRoamingType = m.getInt("voiceRoamingType");
|
||||||
mOperatorAlphaLong = m.getString("operator-alpha-long");
|
mDataRoamingType = m.getInt("dataRoamingType");
|
||||||
mOperatorAlphaShort = m.getString("operator-alpha-short");
|
mVoiceOperatorAlphaLong = m.getString("operator-alpha-long");
|
||||||
mOperatorNumeric = m.getString("operator-numeric");
|
mVoiceOperatorAlphaShort = m.getString("operator-alpha-short");
|
||||||
|
mVoiceOperatorNumeric = m.getString("operator-numeric");
|
||||||
|
mDataOperatorAlphaLong = m.getString("data-operator-alpha-long");
|
||||||
|
mDataOperatorAlphaShort = m.getString("data-operator-alpha-short");
|
||||||
|
mDataOperatorNumeric = m.getString("data-operator-numeric");
|
||||||
mIsManualNetworkSelection = m.getBoolean("manual");
|
mIsManualNetworkSelection = m.getBoolean("manual");
|
||||||
mRilVoiceRadioTechnology = m.getInt("radioTechnology");
|
mRilVoiceRadioTechnology = m.getInt("radioTechnology");
|
||||||
mRilDataRadioTechnology = m.getInt("dataRadioTechnology");
|
mRilDataRadioTechnology = m.getInt("dataRadioTechnology");
|
||||||
@@ -713,10 +938,14 @@ public class ServiceState implements Parcelable {
|
|||||||
public void fillInNotifierBundle(Bundle m) {
|
public void fillInNotifierBundle(Bundle m) {
|
||||||
m.putInt("voiceRegState", mVoiceRegState);
|
m.putInt("voiceRegState", mVoiceRegState);
|
||||||
m.putInt("dataRegState", mDataRegState);
|
m.putInt("dataRegState", mDataRegState);
|
||||||
m.putBoolean("roaming", Boolean.valueOf(mRoaming));
|
m.putInt("voiceRoamingType", mVoiceRoamingType);
|
||||||
m.putString("operator-alpha-long", mOperatorAlphaLong);
|
m.putInt("dataRoamingType", mDataRoamingType);
|
||||||
m.putString("operator-alpha-short", mOperatorAlphaShort);
|
m.putString("operator-alpha-long", mVoiceOperatorAlphaLong);
|
||||||
m.putString("operator-numeric", mOperatorNumeric);
|
m.putString("operator-alpha-short", mVoiceOperatorAlphaShort);
|
||||||
|
m.putString("operator-numeric", mVoiceOperatorNumeric);
|
||||||
|
m.putString("data-operator-alpha-long", mDataOperatorAlphaLong);
|
||||||
|
m.putString("data-operator-alpha-short", mDataOperatorAlphaShort);
|
||||||
|
m.putString("data-operator-numeric", mDataOperatorNumeric);
|
||||||
m.putBoolean("manual", Boolean.valueOf(mIsManualNetworkSelection));
|
m.putBoolean("manual", Boolean.valueOf(mIsManualNetworkSelection));
|
||||||
m.putInt("radioTechnology", mRilVoiceRadioTechnology);
|
m.putInt("radioTechnology", mRilVoiceRadioTechnology);
|
||||||
m.putInt("dataRadioTechnology", mRilDataRadioTechnology);
|
m.putInt("dataRadioTechnology", mRilDataRadioTechnology);
|
||||||
|
|||||||
Reference in New Issue
Block a user