Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4e82851 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Remove redundent getCurrentCdmaDataConnectionState

replace with existing and generic getCurrentDataConnectionState.
bug:3487138

Change-Id: I8a5e85afd316252eedeacb2a042450124702defd
parent 425f2a6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ public class CDMALTEPhone extends CDMAPhone {
            // already been called

            ret = DataState.DISCONNECTED;
        } else if (mSST.getCurrentCdmaDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
        } else if (mSST.getCurrentDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
            // If we're out of service, open TCP sockets may still work
            // but no data will flow
            ret = DataState.DISCONNECTED;
+2 −2
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ public class CDMAPhone extends PhoneBase {
    public DataActivityState getDataActivityState() {
        DataActivityState ret = DataActivityState.NONE;

        if (mSST.getCurrentCdmaDataConnectionState() == ServiceState.STATE_IN_SERVICE) {
        if (mSST.getCurrentDataConnectionState() == ServiceState.STATE_IN_SERVICE) {

            switch (mDataConnectionTracker.getActivity()) {
                case DATAIN:
@@ -618,7 +618,7 @@ public class CDMAPhone extends PhoneBase {
             // already been called

             ret = DataState.DISCONNECTED;
        } else if (mSST.getCurrentCdmaDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
        } else if (mSST.getCurrentDataConnectionState() != ServiceState.STATE_IN_SERVICE) {
            // If we're out of service, open TCP sockets may still work
            // but no data will flow
            ret = DataState.DISCONNECTED;
+2 −2
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {

    @Override
    protected boolean isDataAllowed() {
        int psState = mCdmaPhone.mSST.getCurrentCdmaDataConnectionState();
        int psState = mCdmaPhone.mSST.getCurrentDataConnectionState();
        boolean roaming = (mPhone.getServiceState().getRoaming() && !getDataOnRoamingEnabled());
        boolean desiredPowerState = mCdmaPhone.mSST.getDesiredPowerState();

@@ -258,7 +258,7 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker {
            return true;
        }

        int psState = mCdmaPhone.mSST.getCurrentCdmaDataConnectionState();
        int psState = mCdmaPhone.mSST.getCurrentDataConnectionState();
        boolean roaming = mPhone.getServiceState().getRoaming();
        boolean desiredPowerState = mCdmaPhone.mSST.getDesiredPowerState();

+0 −12
Original line number Diff line number Diff line
@@ -1217,18 +1217,6 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
        }
    }

    /**
     * @return The current CDMA data connection state. ServiceState.RADIO_TECHNOLOGY_1xRTT or
     * ServiceState.RADIO_TECHNOLOGY_EVDO is the same as "attached" and
     * ServiceState.RADIO_TECHNOLOGY_UNKNOWN is the same as detached.
     */
    /*package*/ int getCurrentCdmaDataConnectionState() {
        return mDataConnectionState;
    }

    /**
    * TODO: In the future, we need remove getCurrentCdmaDataConnectionState
    */
    public int getCurrentDataConnectionState() {
        return mDataConnectionState;
    }