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

Commit 17e7e975 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Kill the NetworkInfo(int type) constructor. IT'S A TRAP!

This constructor does nothing, including doing nothing with its
only argument. This causes it to return a NetworkInfo for
TYPE_MOBILE no matter what was passed in.

Bug: 16610051
Change-Id: I4ccd5ec050f7824fb06496c00fcd7901defeb7bd
parent 0ed0a28a
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -127,14 +127,6 @@ public class NetworkInfo implements Parcelable {
     */
    private boolean mIsAvailable;

    /**
     * @param type network type
     * @deprecated
     * @hide because this constructor was only meant for internal use (and
     * has now been superseded by the package-private constructor below).
     */
    public NetworkInfo(int type) {}

    /**
     * @hide
     */
+2 −1
Original line number Diff line number Diff line
@@ -4816,7 +4816,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            result.setType(networkType);
            return result;
        } else {
            NetworkInfo result = new NetworkInfo(networkType);
            NetworkInfo result = new NetworkInfo(
                    networkType, 0, ConnectivityManager.getNetworkTypeName(networkType), "");
            result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
            return result;
        }