Loading src/com/android/settings/ProxySelector.java +7 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.app.settings.SettingsEnums; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.Proxy; import android.net.ProxyInfo; import android.os.Bundle; import android.text.Selection; Loading Loading @@ -186,18 +185,18 @@ public class ProxySelector extends InstrumentedFragment implements DialogCreatab * @return 0 on success, string resource ID on failure */ public static int validate(String hostname, String port, String exclList) { switch (Proxy.validate(hostname, port, exclList)) { case Proxy.PROXY_VALID: switch (ProxyUtils.validate(hostname, port, exclList)) { case ProxyUtils.PROXY_VALID: return 0; case Proxy.PROXY_HOSTNAME_EMPTY: case ProxyUtils.PROXY_HOSTNAME_EMPTY: return R.string.proxy_error_empty_host_set_port; case Proxy.PROXY_HOSTNAME_INVALID: case ProxyUtils.PROXY_HOSTNAME_INVALID: return R.string.proxy_error_invalid_host; case Proxy.PROXY_PORT_EMPTY: case ProxyUtils.PROXY_PORT_EMPTY: return R.string.proxy_error_empty_port; case Proxy.PROXY_PORT_INVALID: case ProxyUtils.PROXY_PORT_INVALID: return R.string.proxy_error_invalid_port; case Proxy.PROXY_EXCLLIST_INVALID: case ProxyUtils.PROXY_EXCLLIST_INVALID: return R.string.proxy_error_invalid_exclusion_list; default: // should neven happen Loading src/com/android/settings/vpn2/ConfigDialog.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; } } Loading
src/com/android/settings/ProxySelector.java +7 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import android.app.settings.SettingsEnums; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.Proxy; import android.net.ProxyInfo; import android.os.Bundle; import android.text.Selection; Loading Loading @@ -186,18 +185,18 @@ public class ProxySelector extends InstrumentedFragment implements DialogCreatab * @return 0 on success, string resource ID on failure */ public static int validate(String hostname, String port, String exclList) { switch (Proxy.validate(hostname, port, exclList)) { case Proxy.PROXY_VALID: switch (ProxyUtils.validate(hostname, port, exclList)) { case ProxyUtils.PROXY_VALID: return 0; case Proxy.PROXY_HOSTNAME_EMPTY: case ProxyUtils.PROXY_HOSTNAME_EMPTY: return R.string.proxy_error_empty_host_set_port; case Proxy.PROXY_HOSTNAME_INVALID: case ProxyUtils.PROXY_HOSTNAME_INVALID: return R.string.proxy_error_invalid_host; case Proxy.PROXY_PORT_EMPTY: case ProxyUtils.PROXY_PORT_EMPTY: return R.string.proxy_error_empty_port; case Proxy.PROXY_PORT_INVALID: case ProxyUtils.PROXY_PORT_INVALID: return R.string.proxy_error_invalid_port; case Proxy.PROXY_EXCLLIST_INVALID: case ProxyUtils.PROXY_EXCLLIST_INVALID: return R.string.proxy_error_invalid_exclusion_list; default: // should neven happen Loading
src/com/android/settings/vpn2/ConfigDialog.java +2 −2 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; } }