[RESTRICT AUTOMERGE] Revert "Removed IWLAN legacy mode support" am: 4262d21e5b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2510797

Change-Id: Ic440d2416fd54318169563bc13a6a29a635e16d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Sebastian Pickl
2023-03-29 06:23:54 +00:00
committed by Automerger Merge Worker

View File

@@ -1214,8 +1214,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;
@@ -1247,12 +1252,14 @@ 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());
if (!legacyMode) {
addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder() addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder()
.setDomain(NetworkRegistrationInfo.DOMAIN_PS) .setDomain(NetworkRegistrationInfo.DOMAIN_PS)
.setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN) .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN)
.setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN)
.build()); .build());
} }
}
mOperatorAlphaLongRaw = null; mOperatorAlphaLongRaw = null;
mOperatorAlphaShortRaw = null; mOperatorAlphaShortRaw = null;
mIsDataRoamingFromRegistration = false; mIsDataRoamingFromRegistration = false;
@@ -1260,11 +1267,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;
} }
@@ -1272,11 +1279,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;