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

Commit f7c93bcd authored by Erik Kline's avatar Erik Kline Committed by android-build-merger
Browse files

Merge "Clarify IControlsTethering LOCAL_ONLY state name"

am: 649c4598

Change-Id: Ia856b08ced4e26e32e107faac37e1c245caaf910
parents 232198d0 649c4598
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
        public boolean isCurrentlyServing() {
            switch (lastState) {
                case IControlsTethering.STATE_TETHERED:
                case IControlsTethering.STATE_LOCAL_HOTSPOT:
                case IControlsTethering.STATE_LOCAL_ONLY:
                    return true;
                default:
                    return false;
@@ -643,7 +643,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                    erroredList.add(iface);
                } else if (tetherState.lastState == IControlsTethering.STATE_AVAILABLE) {
                    availableList.add(iface);
                } else if (tetherState.lastState == IControlsTethering.STATE_LOCAL_HOTSPOT) {
                } else if (tetherState.lastState == IControlsTethering.STATE_LOCAL_ONLY) {
                    localOnlyList.add(iface);
                } else if (tetherState.lastState == IControlsTethering.STATE_TETHERED) {
                    if (cfg.isUsb(iface)) {
@@ -807,7 +807,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                        // Otherwise, assume it's a local-only hotspot request.
                        final int state = mWifiTetherRequested
                                ? IControlsTethering.STATE_TETHERED
                                : IControlsTethering.STATE_LOCAL_HOTSPOT;
                                : IControlsTethering.STATE_LOCAL_ONLY;
                        tetherMatchingInterfaces(state, ConnectivityManager.TETHERING_WIFI);
                        break;
                    case WifiManager.WIFI_AP_STATE_DISABLED:
@@ -877,7 +877,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                result = untether(chosenIface);
                break;
            case IControlsTethering.STATE_TETHERED:
            case IControlsTethering.STATE_LOCAL_HOTSPOT:
            case IControlsTethering.STATE_LOCAL_ONLY:
                result = tether(chosenIface, requestedState);
                break;
            default:
@@ -1642,7 +1642,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                    case IControlsTethering.STATE_TETHERED:
                        pw.print("TetheredState");
                        break;
                    case IControlsTethering.STATE_LOCAL_HOTSPOT:
                    case IControlsTethering.STATE_LOCAL_ONLY:
                        pw.print("LocalHotspotState");
                        break;
                    default:
@@ -1697,7 +1697,7 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
                which = TetherMasterSM.EVENT_IFACE_SERVING_STATE_INACTIVE;
                break;
            case IControlsTethering.STATE_TETHERED:
            case IControlsTethering.STATE_LOCAL_HOTSPOT:
            case IControlsTethering.STATE_LOCAL_ONLY:
                which = TetherMasterSM.EVENT_IFACE_SERVING_STATE_ACTIVE;
                break;
            default:
+3 −3
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ public interface IControlsTethering {
    public final int STATE_UNAVAILABLE = 0;
    public final int STATE_AVAILABLE   = 1;
    public final int STATE_TETHERED    = 2;
    public final int STATE_LOCAL_HOTSPOT = 3;
    public final int STATE_LOCAL_ONLY  = 3;

    /**
     * Notify that |who| has changed its tethering state.  This may be called from any thread.
+1 −1
Original line number Diff line number Diff line
@@ -172,7 +172,7 @@ public class IPv6TetheringCoordinator {
        final Downstream ds = findDownstream(sm);
        if (ds == null) return null;

        if (ds.mode == IControlsTethering.STATE_LOCAL_HOTSPOT) {
        if (ds.mode == IControlsTethering.STATE_LOCAL_ONLY) {
            // Build a Unique Locally-assigned Prefix configuration.
            return getUniqueLocalConfig(mUniqueLocalPrefix, ds.subnetId);
        }
+2 −2
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ public class TetherInterfaceStateMachine extends StateMachine {
                case CMD_TETHER_REQUESTED:
                    mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
                    switch (message.arg1) {
                        case IControlsTethering.STATE_LOCAL_HOTSPOT:
                        case IControlsTethering.STATE_LOCAL_ONLY:
                            transitionTo(mLocalHotspotState);
                            break;
                        case IControlsTethering.STATE_TETHERED:
@@ -304,7 +304,7 @@ public class TetherInterfaceStateMachine extends StateMachine {
            }

            if (DBG) Log.d(TAG, "Local hotspot " + mIfaceName);
            sendInterfaceState(IControlsTethering.STATE_LOCAL_HOTSPOT);
            sendInterfaceState(IControlsTethering.STATE_LOCAL_ONLY);
        }

        @Override
+0 −1
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ import static android.net.ConnectivityManager.TETHERING_BLUETOOTH;
import static android.net.ConnectivityManager.TETHERING_USB;
import static android.net.ConnectivityManager.TETHERING_WIFI;
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_AVAILABLE;
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_LOCAL_HOTSPOT;
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_TETHERED;
import static com.android.server.connectivity.tethering.IControlsTethering.STATE_UNAVAILABLE;