[RESTRICT AUTOMERGE] Revert "Removed IWLAN legacy mode support"
Revert submission 2370228-legacy_iwlan_removal Reason for revert: try finding the culprit for b/275330844 Reverted changes: /q/submissionid:2370228-legacy_iwlan_removal Change-Id: Ibd5482d73e50cdaab583a05542b9b3d471424a15
This commit is contained in:
@@ -1207,8 +1207,13 @@ public class ServiceState implements Parcelable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the service state. Set everything to the default value.
|
* Initialize the service state. Set everything to the default value.
|
||||||
|
*
|
||||||
|
* @param legacyMode {@code true} if the device is on IWLAN legacy mode, where IWLAN is
|
||||||
|
* considered as a RAT on WWAN {@link NetworkRegistrationInfo}. {@code false} if the device
|
||||||
|
* is on AP-assisted mode, where IWLAN should be reported through WLAN.
|
||||||
|
* {@link NetworkRegistrationInfo}.
|
||||||
*/
|
*/
|
||||||
private void init() {
|
private void init(boolean legacyMode) {
|
||||||
if (DBG) Rlog.d(LOG_TAG, "init");
|
if (DBG) Rlog.d(LOG_TAG, "init");
|
||||||
mVoiceRegState = STATE_OUT_OF_SERVICE;
|
mVoiceRegState = STATE_OUT_OF_SERVICE;
|
||||||
mDataRegState = STATE_OUT_OF_SERVICE;
|
mDataRegState = STATE_OUT_OF_SERVICE;
|
||||||
@@ -1240,11 +1245,13 @@ public class ServiceState implements Parcelable {
|
|||||||
.setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
|
.setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN)
|
||||||
.setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN)
|
.setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN)
|
||||||
.build());
|
.build());
|
||||||
addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder()
|
if (!legacyMode) {
|
||||||
.setDomain(NetworkRegistrationInfo.DOMAIN_PS)
|
addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder()
|
||||||
.setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN)
|
.setDomain(NetworkRegistrationInfo.DOMAIN_PS)
|
||||||
.setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN)
|
.setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN)
|
||||||
.build());
|
.setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN)
|
||||||
|
.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mOperatorAlphaLongRaw = null;
|
mOperatorAlphaLongRaw = null;
|
||||||
mOperatorAlphaShortRaw = null;
|
mOperatorAlphaShortRaw = null;
|
||||||
@@ -1253,11 +1260,11 @@ public class ServiceState implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setStateOutOfService() {
|
public void setStateOutOfService() {
|
||||||
init();
|
init(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStateOff() {
|
public void setStateOff() {
|
||||||
init();
|
init(true);
|
||||||
mVoiceRegState = STATE_POWER_OFF;
|
mVoiceRegState = STATE_POWER_OFF;
|
||||||
mDataRegState = STATE_POWER_OFF;
|
mDataRegState = STATE_POWER_OFF;
|
||||||
}
|
}
|
||||||
@@ -1265,11 +1272,14 @@ public class ServiceState implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Set the service state to out-of-service
|
* Set the service state to out-of-service
|
||||||
*
|
*
|
||||||
|
* @param legacyMode {@code true} if the device is on IWLAN legacy mode, where IWLAN is
|
||||||
|
* considered as a RAT on WWAN {@link NetworkRegistrationInfo}. {@code false} if the device
|
||||||
|
* is on AP-assisted mode, where IWLAN should be reported through WLAN.
|
||||||
* @param powerOff {@code true} if this is a power off case (i.e. Airplane mode on).
|
* @param powerOff {@code true} if this is a power off case (i.e. Airplane mode on).
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public void setOutOfService(boolean powerOff) {
|
public void setOutOfService(boolean legacyMode, boolean powerOff) {
|
||||||
init();
|
init(legacyMode);
|
||||||
if (powerOff) {
|
if (powerOff) {
|
||||||
mVoiceRegState = STATE_POWER_OFF;
|
mVoiceRegState = STATE_POWER_OFF;
|
||||||
mDataRegState = STATE_POWER_OFF;
|
mDataRegState = STATE_POWER_OFF;
|
||||||
|
|||||||
Reference in New Issue
Block a user