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

Commit 434dde84 authored by Paul Jensen's avatar Paul Jensen
Browse files

Remove dead hidden ConnectivityManager and NetworkInfo APIs.

- There are no callers of
  NetworkInfo.setIsConnectedToProvisioningNetwork(), so remove all the
  code that deals with mIsConnectedToProvisioningNetwork being true,
  including the two ConnectiviyManager APIs.
- There are no callers of
  ConnectivityManager.getMobileRedirectedProvisioningUrl(), so remove
  the code that reads this URL.
- There are no callers of
  ConnectivityManager.captivePortalCheckCompleted(), so remove this
  API which is currently a no-op.

Change-Id: Ifa44c7553c7c45ebe261a2a124d9bf8d6f96c690
parent 100e1c92
Loading
Loading
Loading
Loading
+0 −52
Original line number Original line Diff line number Diff line
@@ -800,28 +800,6 @@ public class ConnectivityManager {
        }
        }
    }
    }


    /**
     * Returns details about the Provisioning or currently active default data network. When
     * connected, this network is the default route for outgoing connections.
     * You should always check {@link NetworkInfo#isConnected()} before initiating
     * network traffic. This may return {@code null} when there is no default
     * network.
     * <p>This method requires the caller to hold the permission
     * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
     *
     * @return a {@link NetworkInfo} object for the current default network
     *        or {@code null} if no default network is currently active
     *
     * {@hide}
     */
    public NetworkInfo getProvisioningOrActiveNetworkInfo() {
        try {
            return mService.getProvisioningOrActiveNetworkInfo();
        } catch (RemoteException e) {
            return null;
        }
    }

    /**
    /**
     * Returns the IP information for the current default network.
     * Returns the IP information for the current default network.
     * <p>This method requires the caller to hold the permission
     * <p>This method requires the caller to hold the permission
@@ -2006,24 +1984,6 @@ public class ConnectivityManager {
        }
        }
    }
    }


    /**
     * Signal that the captive portal check on the indicated network
     * is complete and whether its a captive portal or not.
     * <p>This method requires the caller to hold the permission
     * {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}.
     *
     * @param info the {@link NetworkInfo} object for the networkType
     *        in question.
     * @param isCaptivePortal true/false.
     * {@hide}
     */
    public void captivePortalCheckCompleted(NetworkInfo info, boolean isCaptivePortal) {
        try {
            mService.captivePortalCheckCompleted(info, isCaptivePortal);
        } catch (RemoteException e) {
        }
    }

    /**
    /**
     * Check mobile provisioning.
     * Check mobile provisioning.
     *
     *
@@ -2055,18 +2015,6 @@ public class ConnectivityManager {
        return null;
        return null;
    }
    }


    /**
     * Get the mobile redirected provisioning url.
     * {@hide}
     */
    public String getMobileRedirectedProvisioningUrl() {
        try {
            return mService.getMobileRedirectedProvisioningUrl();
        } catch (RemoteException e) {
        }
        return null;
    }

    /**
    /**
     * Set sign in error notification to visible or in visible
     * Set sign in error notification to visible or in visible
     *
     *
+0 −6
Original line number Original line Diff line number Diff line
@@ -53,8 +53,6 @@ interface IConnectivityManager
    Network[] getAllNetworks();
    Network[] getAllNetworks();
    NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId);
    NetworkCapabilities[] getDefaultNetworkCapabilitiesForUser(int userId);


    NetworkInfo getProvisioningOrActiveNetworkInfo();

    boolean isNetworkSupported(int networkType);
    boolean isNetworkSupported(int networkType);


    LinkProperties getActiveLinkProperties();
    LinkProperties getActiveLinkProperties();
@@ -122,14 +120,10 @@ interface IConnectivityManager


    boolean updateLockdownVpn();
    boolean updateLockdownVpn();


    void captivePortalCheckCompleted(in NetworkInfo info, boolean isCaptivePortal);

    int checkMobileProvisioning(int suggestedTimeOutMs);
    int checkMobileProvisioning(int suggestedTimeOutMs);


    String getMobileProvisioningUrl();
    String getMobileProvisioningUrl();


    String getMobileRedirectedProvisioningUrl();

    void setProvisioningNotificationVisible(boolean visible, int networkType, in String action);
    void setProvisioningNotificationVisible(boolean visible, int networkType, in String action);


    void setAirplaneMode(boolean enable);
    void setAirplaneMode(boolean enable);
+0 −23
Original line number Original line Diff line number Diff line
@@ -120,7 +120,6 @@ public class NetworkInfo implements Parcelable {
    private String mExtraInfo;
    private String mExtraInfo;
    private boolean mIsFailover;
    private boolean mIsFailover;
    private boolean mIsRoaming;
    private boolean mIsRoaming;
    private boolean mIsConnectedToProvisioningNetwork;


    /**
    /**
     * Indicates whether network connectivity is possible:
     * Indicates whether network connectivity is possible:
@@ -142,7 +141,6 @@ public class NetworkInfo implements Parcelable {
        mState = State.UNKNOWN;
        mState = State.UNKNOWN;
        mIsAvailable = false; // until we're told otherwise, assume unavailable
        mIsAvailable = false; // until we're told otherwise, assume unavailable
        mIsRoaming = false;
        mIsRoaming = false;
        mIsConnectedToProvisioningNetwork = false;
    }
    }


    /** {@hide} */
    /** {@hide} */
@@ -160,7 +158,6 @@ public class NetworkInfo implements Parcelable {
                mIsFailover = source.mIsFailover;
                mIsFailover = source.mIsFailover;
                mIsRoaming = source.mIsRoaming;
                mIsRoaming = source.mIsRoaming;
                mIsAvailable = source.mIsAvailable;
                mIsAvailable = source.mIsAvailable;
                mIsConnectedToProvisioningNetwork = source.mIsConnectedToProvisioningNetwork;
            }
            }
        }
        }
    }
    }
@@ -332,22 +329,6 @@ public class NetworkInfo implements Parcelable {
        }
        }
    }
    }


    /** {@hide} */
    @VisibleForTesting
    public boolean isConnectedToProvisioningNetwork() {
        synchronized (this) {
            return mIsConnectedToProvisioningNetwork;
        }
    }

    /** {@hide} */
    @VisibleForTesting
    public void setIsConnectedToProvisioningNetwork(boolean val) {
        synchronized (this) {
            mIsConnectedToProvisioningNetwork = val;
        }
    }

    /**
    /**
     * Reports the current coarse-grained state of the network.
     * Reports the current coarse-grained state of the network.
     * @return the coarse-grained state
     * @return the coarse-grained state
@@ -431,8 +412,6 @@ public class NetworkInfo implements Parcelable {
            append(", roaming: ").append(mIsRoaming).
            append(", roaming: ").append(mIsRoaming).
            append(", failover: ").append(mIsFailover).
            append(", failover: ").append(mIsFailover).
            append(", isAvailable: ").append(mIsAvailable).
            append(", isAvailable: ").append(mIsAvailable).
            append(", isConnectedToProvisioningNetwork: ").
            append(mIsConnectedToProvisioningNetwork).
            append("]");
            append("]");
            return builder.toString();
            return builder.toString();
        }
        }
@@ -461,7 +440,6 @@ public class NetworkInfo implements Parcelable {
            dest.writeInt(mIsFailover ? 1 : 0);
            dest.writeInt(mIsFailover ? 1 : 0);
            dest.writeInt(mIsAvailable ? 1 : 0);
            dest.writeInt(mIsAvailable ? 1 : 0);
            dest.writeInt(mIsRoaming ? 1 : 0);
            dest.writeInt(mIsRoaming ? 1 : 0);
            dest.writeInt(mIsConnectedToProvisioningNetwork ? 1 : 0);
            dest.writeString(mReason);
            dest.writeString(mReason);
            dest.writeString(mExtraInfo);
            dest.writeString(mExtraInfo);
        }
        }
@@ -484,7 +462,6 @@ public class NetworkInfo implements Parcelable {
                netInfo.mIsFailover = in.readInt() != 0;
                netInfo.mIsFailover = in.readInt() != 0;
                netInfo.mIsAvailable = in.readInt() != 0;
                netInfo.mIsAvailable = in.readInt() != 0;
                netInfo.mIsRoaming = in.readInt() != 0;
                netInfo.mIsRoaming = in.readInt() != 0;
                netInfo.mIsConnectedToProvisioningNetwork = in.readInt() != 0;
                netInfo.mReason = in.readString();
                netInfo.mReason = in.readString();
                netInfo.mExtraInfo = in.readString();
                netInfo.mExtraInfo = in.readString();
                return netInfo;
                return netInfo;
+0 −5
Original line number Original line Diff line number Diff line
@@ -1271,11 +1271,6 @@
         an mcc/mnc specific config.xml -->
         an mcc/mnc specific config.xml -->
    <string name="mobile_provisioning_url" translatable="false"></string>
    <string name="mobile_provisioning_url" translatable="false"></string>


    <!-- This url is used as the default url when redirection is detected. Any
         should work as all url's get redirected. But maybe overridden by
         if needed. -->
    <string name="mobile_redirected_provisioning_url" translatable="false">http://google.com</string>

    <!-- The default character set for GsmAlphabet -->
    <!-- The default character set for GsmAlphabet -->
    <!-- Empty string means MBCS is not considered -->
    <!-- Empty string means MBCS is not considered -->
    <string name="gsm_alphabet_default_charset" translatable="false"></string>
    <string name="gsm_alphabet_default_charset" translatable="false"></string>
+0 −1
Original line number Original line Diff line number Diff line
@@ -818,7 +818,6 @@
  <java-symbol type="string" name="progress_unmounting" />
  <java-symbol type="string" name="progress_unmounting" />
  <java-symbol type="string" name="mobile_provisioning_apn" />
  <java-symbol type="string" name="mobile_provisioning_apn" />
  <java-symbol type="string" name="mobile_provisioning_url" />
  <java-symbol type="string" name="mobile_provisioning_url" />
  <java-symbol type="string" name="mobile_redirected_provisioning_url" />
  <java-symbol type="string" name="quick_contacts_not_available" />
  <java-symbol type="string" name="quick_contacts_not_available" />
  <java-symbol type="string" name="reboot_to_update_package" />
  <java-symbol type="string" name="reboot_to_update_package" />
  <java-symbol type="string" name="reboot_to_update_prepare" />
  <java-symbol type="string" name="reboot_to_update_prepare" />
Loading