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

Commit 7622a682 authored by Sooraj Sasindran's avatar Sooraj Sasindran Committed by android-build-merger
Browse files

Merge "Remove usage of hidden APIs"

am: 473fab13

Change-Id: I13a1e48a79f448222fd887d42099f54efda37366
parents 52beebe5 473fab13
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -45,8 +45,8 @@ import android.os.SystemProperties;
import android.provider.Telephony;
import android.telephony.AccessNetworkConstants;
import android.telephony.AccessNetworkConstants.TransportType;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.ApnType;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.CarrierConfigManager;
import android.telephony.DataFailCause;
import android.telephony.NetworkRegistrationInfo;
@@ -88,6 +88,8 @@ import com.android.internal.util.Protocol;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;

import libcore.net.InetAddressUtils;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.io.StringWriter;
@@ -1367,7 +1369,11 @@ public class DataConnection extends StateMachine {
    public static boolean isIpAddress(String address) {
        if (address == null) return false;

        return InetAddress.isNumeric(address);
        // Accept IPv6 addresses (only) in square brackets for compatibility.
        if (address.startsWith("[") && address.endsWith("]") && address.indexOf(':') != -1) {
            address = address.substring(1, address.length() - 1);
        }
        return InetAddressUtils.isNumericAddress(address);
    }

    private SetupResult setLinkProperties(DataCallResponse response,
@@ -1441,7 +1447,8 @@ public class DataConnection extends StateMachine {
                for (InetAddress gateway : response.getGatewayAddresses()) {
                    // Allow 0.0.0.0 or :: as a gateway;
                    // this indicates a point-to-point interface.
                    linkProperties.addRoute(new RouteInfo(gateway));
                    linkProperties.addRoute(new RouteInfo(null, gateway, null,
                            RouteInfo.RTN_UNICAST));
                }

                // set interface MTU
+2 −1
Original line number Diff line number Diff line
@@ -2721,7 +2721,8 @@ public class DcTracker extends Handler {
                checkDataRoamingStatus(false);

                boolean isProvApn = apnContext.isProvisioningApn();
                final ConnectivityManager cm = ConnectivityManager.from(mPhone.getContext());
                final ConnectivityManager cm = (ConnectivityManager) mPhone.getContext()
                        .getSystemService(Context.CONNECTIVITY_SERVICE);
                if (mProvisionBroadcastReceiver != null) {
                    mPhone.getContext().unregisterReceiver(mProvisionBroadcastReceiver);
                    mProvisionBroadcastReceiver = null;