Replace Proxy hidden constants and methods usages

Proxy is a part of incoming connectivity mainline module. The
hidden APIs are no longer available outside the module. These
shared constants and methods are moving to ProxyUtils insdide
net shared lib. Update the corresponding usage in the caller
side.

Bug: 172183305
Test: atest SettingsRoboTests
Change-Id: I2d51442e65dbcdf1a36940d8a25c7571363d56e6
This commit is contained in:
Chiachang Wang
2021-02-05 16:15:52 +08:00
parent d52cff9b57
commit 9aaad19a82
2 changed files with 9 additions and 10 deletions

View File

@@ -21,7 +21,6 @@ import static com.android.internal.net.VpnProfile.isLegacyType;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.net.Proxy;
import android.net.ProxyInfo;
import android.os.Bundle;
import android.os.SystemProperties;
@@ -41,6 +40,7 @@ import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import com.android.internal.net.VpnProfile;
import com.android.net.module.util.ProxyUtils;
import com.android.settings.R;
import java.net.InetAddress;
@@ -637,7 +637,7 @@ class ConfigDialog extends AlertDialog implements TextWatcher,
final String host = mProxyHost.getText().toString().trim();
final String port = mProxyPort.getText().toString().trim();
return Proxy.validate(host, port, "") == Proxy.PROXY_VALID;
return ProxyUtils.validate(host, port, "") == ProxyUtils.PROXY_VALID;
}
}