Stop exposing LTE_CA as a rat type.
Instead add a new hidden function to ServiceState for use by SystemUI until we get a real API in O. bug:30480638 Change-Id: Ifd9b1fbdb74d3a408c419467b7390675fc13ea3d
This commit is contained in:
@@ -471,6 +471,10 @@ public class MobileSignalController extends SignalController<
|
|||||||
}
|
}
|
||||||
mServiceState = state;
|
mServiceState = state;
|
||||||
mDataNetType = state.getDataNetworkType();
|
mDataNetType = state.getDataNetworkType();
|
||||||
|
if (mDataNetType == TelephonyManager.NETWORK_TYPE_LTE && mServiceState != null &&
|
||||||
|
mServiceState.isUsingCarrierAggregation()) {
|
||||||
|
mDataNetType = TelephonyManager.NETWORK_TYPE_LTE_CA;
|
||||||
|
}
|
||||||
updateTelephony();
|
updateTelephony();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,6 +486,10 @@ public class MobileSignalController extends SignalController<
|
|||||||
}
|
}
|
||||||
mDataState = state;
|
mDataState = state;
|
||||||
mDataNetType = networkType;
|
mDataNetType = networkType;
|
||||||
|
if (mDataNetType == TelephonyManager.NETWORK_TYPE_LTE && mServiceState != null &&
|
||||||
|
mServiceState.isUsingCarrierAggregation()) {
|
||||||
|
mDataNetType = TelephonyManager.NETWORK_TYPE_LTE_CA;
|
||||||
|
}
|
||||||
updateTelephony();
|
updateTelephony();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -240,6 +240,8 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
private boolean mIsDataRoamingFromRegistration;
|
private boolean mIsDataRoamingFromRegistration;
|
||||||
|
|
||||||
|
private boolean mIsUsingCarrierAggregation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get String description of roaming type
|
* get String description of roaming type
|
||||||
* @hide
|
* @hide
|
||||||
@@ -318,6 +320,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconMode = s.mCdmaEriIconMode;
|
mCdmaEriIconMode = s.mCdmaEriIconMode;
|
||||||
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
mIsEmergencyOnly = s.mIsEmergencyOnly;
|
||||||
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
|
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
|
||||||
|
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -346,6 +349,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconMode = in.readInt();
|
mCdmaEriIconMode = in.readInt();
|
||||||
mIsEmergencyOnly = in.readInt() != 0;
|
mIsEmergencyOnly = in.readInt() != 0;
|
||||||
mIsDataRoamingFromRegistration = in.readInt() != 0;
|
mIsDataRoamingFromRegistration = in.readInt() != 0;
|
||||||
|
mIsUsingCarrierAggregation = in.readInt() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
@@ -371,6 +375,7 @@ public class ServiceState implements Parcelable {
|
|||||||
out.writeInt(mCdmaEriIconMode);
|
out.writeInt(mCdmaEriIconMode);
|
||||||
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
out.writeInt(mIsEmergencyOnly ? 1 : 0);
|
||||||
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
|
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
|
||||||
|
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
@@ -680,7 +685,8 @@ public class ServiceState implements Parcelable {
|
|||||||
&& equalsHandlesNulls(mCdmaDefaultRoamingIndicator,
|
&& equalsHandlesNulls(mCdmaDefaultRoamingIndicator,
|
||||||
s.mCdmaDefaultRoamingIndicator)
|
s.mCdmaDefaultRoamingIndicator)
|
||||||
&& mIsEmergencyOnly == s.mIsEmergencyOnly
|
&& mIsEmergencyOnly == s.mIsEmergencyOnly
|
||||||
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration);
|
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration
|
||||||
|
&& mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -788,7 +794,8 @@ public class ServiceState implements Parcelable {
|
|||||||
+ " RoamInd=" + mCdmaRoamingIndicator
|
+ " RoamInd=" + mCdmaRoamingIndicator
|
||||||
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
|
||||||
+ " EmergOnly=" + mIsEmergencyOnly
|
+ " EmergOnly=" + mIsEmergencyOnly
|
||||||
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration);
|
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration
|
||||||
|
+ " IsUsingCarrierAggregation=" + mIsUsingCarrierAggregation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setNullState(int state) {
|
private void setNullState(int state) {
|
||||||
@@ -815,6 +822,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaEriIconMode = -1;
|
mCdmaEriIconMode = -1;
|
||||||
mIsEmergencyOnly = false;
|
mIsEmergencyOnly = false;
|
||||||
mIsDataRoamingFromRegistration = false;
|
mIsDataRoamingFromRegistration = false;
|
||||||
|
mIsUsingCarrierAggregation = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStateOutOfService() {
|
public void setStateOutOfService() {
|
||||||
@@ -988,6 +996,7 @@ public class ServiceState implements Parcelable {
|
|||||||
mCdmaDefaultRoamingIndicator = m.getInt("cdmaDefaultRoamingIndicator");
|
mCdmaDefaultRoamingIndicator = m.getInt("cdmaDefaultRoamingIndicator");
|
||||||
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
mIsEmergencyOnly = m.getBoolean("emergencyOnly");
|
||||||
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
|
mIsDataRoamingFromRegistration = m.getBoolean("isDataRoamingFromRegistration");
|
||||||
|
mIsUsingCarrierAggregation = m.getBoolean("isUsingCarrierAggregation");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1017,20 +1026,41 @@ public class ServiceState implements Parcelable {
|
|||||||
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));
|
m.putBoolean("isDataRoamingFromRegistration", Boolean.valueOf(mIsDataRoamingFromRegistration));
|
||||||
|
m.putBoolean("isUsingCarrierAggregation", Boolean.valueOf(mIsUsingCarrierAggregation));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void setRilVoiceRadioTechnology(int rt) {
|
public void setRilVoiceRadioTechnology(int rt) {
|
||||||
|
if (rt == RIL_RADIO_TECHNOLOGY_LTE_CA) {
|
||||||
|
rt = RIL_RADIO_TECHNOLOGY_LTE;
|
||||||
|
}
|
||||||
|
|
||||||
this.mRilVoiceRadioTechnology = rt;
|
this.mRilVoiceRadioTechnology = rt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void setRilDataRadioTechnology(int rt) {
|
public void setRilDataRadioTechnology(int rt) {
|
||||||
|
if (rt == RIL_RADIO_TECHNOLOGY_LTE_CA) {
|
||||||
|
rt = RIL_RADIO_TECHNOLOGY_LTE;
|
||||||
|
this.mIsUsingCarrierAggregation = true;
|
||||||
|
} else {
|
||||||
|
this.mIsUsingCarrierAggregation = false;
|
||||||
|
}
|
||||||
this.mRilDataRadioTechnology = rt;
|
this.mRilDataRadioTechnology = rt;
|
||||||
if (VDBG) Rlog.d(LOG_TAG, "[ServiceState] setRilDataRadioTechnology=" +
|
if (VDBG) Rlog.d(LOG_TAG, "[ServiceState] setRilDataRadioTechnology=" +
|
||||||
mRilDataRadioTechnology);
|
mRilDataRadioTechnology);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public boolean isUsingCarrierAggregation() {
|
||||||
|
return mIsUsingCarrierAggregation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public void setIsUsingCarrierAggregation(boolean ca) {
|
||||||
|
mIsUsingCarrierAggregation = ca;
|
||||||
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public void setCssIndicator(int css) {
|
public void setCssIndicator(int css) {
|
||||||
this.mCssIndicator = (css != 0);
|
this.mCssIndicator = (css != 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user