Loading telephony/java/android/telephony/ServiceState.java +10 −20 Original line number Diff line number Diff line Loading @@ -1207,13 +1207,8 @@ public class ServiceState implements Parcelable { /** * 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(boolean legacyMode) { private void init() { if (DBG) Rlog.d(LOG_TAG, "init"); mVoiceRegState = STATE_OUT_OF_SERVICE; mDataRegState = STATE_OUT_OF_SERVICE; Loading Loading @@ -1245,14 +1240,12 @@ public class ServiceState implements Parcelable { .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); if (!legacyMode) { addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder() .setDomain(NetworkRegistrationInfo.DOMAIN_PS) .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); } } mOperatorAlphaLongRaw = null; mOperatorAlphaShortRaw = null; mIsDataRoamingFromRegistration = false; Loading @@ -1260,11 +1253,11 @@ public class ServiceState implements Parcelable { } public void setStateOutOfService() { init(true); init(); } public void setStateOff() { init(true); init(); mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; } Loading @@ -1272,14 +1265,11 @@ public class ServiceState implements Parcelable { /** * 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). * @hide */ public void setOutOfService(boolean legacyMode, boolean powerOff) { init(legacyMode); public void setOutOfService(boolean powerOff) { init(); if (powerOff) { mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; Loading Loading
telephony/java/android/telephony/ServiceState.java +10 −20 Original line number Diff line number Diff line Loading @@ -1207,13 +1207,8 @@ public class ServiceState implements Parcelable { /** * 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(boolean legacyMode) { private void init() { if (DBG) Rlog.d(LOG_TAG, "init"); mVoiceRegState = STATE_OUT_OF_SERVICE; mDataRegState = STATE_OUT_OF_SERVICE; Loading Loading @@ -1245,14 +1240,12 @@ public class ServiceState implements Parcelable { .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); if (!legacyMode) { addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder() .setDomain(NetworkRegistrationInfo.DOMAIN_PS) .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); } } mOperatorAlphaLongRaw = null; mOperatorAlphaShortRaw = null; mIsDataRoamingFromRegistration = false; Loading @@ -1260,11 +1253,11 @@ public class ServiceState implements Parcelable { } public void setStateOutOfService() { init(true); init(); } public void setStateOff() { init(true); init(); mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; } Loading @@ -1272,14 +1265,11 @@ public class ServiceState implements Parcelable { /** * 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). * @hide */ public void setOutOfService(boolean legacyMode, boolean powerOff) { init(legacyMode); public void setOutOfService(boolean powerOff) { init(); if (powerOff) { mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; Loading