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

Commit 778c0ba8 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix some older (depricated) API so they work.

Just because they're depricated doesn't mean we can neglect them.

Change-Id: I7556456bd8be2ec57b81b092f75b4b613b538d46
parent 3a65de79
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -110535,7 +110535,7 @@
 synchronized="false"
 static="true"
 final="true"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
</method>
@@ -110546,7 +110546,7 @@
 synchronized="false"
 static="true"
 final="true"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
</method>
@@ -110557,7 +110557,7 @@
 synchronized="false"
 static="true"
 final="true"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
<parameter name="ctx" type="android.content.Context">
@@ -110570,7 +110570,7 @@
 synchronized="false"
 static="true"
 final="true"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
<parameter name="ctx" type="android.content.Context">
@@ -335145,7 +335145,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -335213,7 +335213,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -335237,7 +335237,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -340880,7 +340880,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -340891,7 +340891,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -340902,7 +340902,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -343272,7 +343272,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
@@ -358346,7 +358346,7 @@
 native="false"
 synchronized="false"
 static="true"
 final="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
+20 −9
Original line number Diff line number Diff line
@@ -131,13 +131,14 @@ public final class Proxy {
    }


    // TODO: deprecate this function
    /**
     * Return the proxy host set by the user.
     * @param ctx A Context used to get the settings for the proxy host.
     * @return String containing the host name. If the user did not set a host
     *         name it returns the default host. A null value means that no
     *         host is to be used.
     * @deprecated Use standard java vm proxy values to find the host, port
     *         and exclusion list.  This call ignores the exclusion list.
     */
    public static final String getHost(Context ctx) {
        java.net.Proxy proxy = getProxy(ctx, null);
@@ -149,11 +150,12 @@ public final class Proxy {
        }
    }

    // TODO: deprecate this function
    /**
     * Return the proxy port set by the user.
     * @param ctx A Context used to get the settings for the proxy port.
     * @return The port number to use or -1 if no proxy is to be used.
     * @deprecated Use standard java vm proxy values to find the host, port
     *         and exclusion list.  This call ignores the exclusion list.
     */
    public static final int getPort(Context ctx) {
        java.net.Proxy proxy = getProxy(ctx, null);
@@ -165,31 +167,40 @@ public final class Proxy {
        }
    }

    // TODO: deprecate this function
    /**
     * Return the default proxy host specified by the carrier.
     * @return String containing the host name or null if there is no proxy for
     * this carrier.
     * @deprecated Use standard java vm proxy values to find the host, port and
     *         exclusion list.  This call ignores the exclusion list and no
     *         longer reports only mobile-data apn-based proxy values.
     */
    public static final String getDefaultHost() {
        return null;
        String host = System.getProperty("http.proxyHost");
        if (TextUtils.isEmpty(host)) return null;
        return host;
    }

    // TODO: deprecate this function
    /**
     * Return the default proxy port specified by the carrier.
     * @return The port number to be used with the proxy host or -1 if there is
     * no proxy for this carrier.
     * @deprecated Use standard java vm proxy values to find the host, port and
     *         exclusion list.  This call ignores the exclusion list and no
     *         longer reports only mobile-data apn-based proxy values.
     */
    public static final int getDefaultPort() {
        if (getDefaultHost() == null) return -1;
        try {
            return Integer.parseInt(System.getProperty("http.proxyPort"));
        } catch (NumberFormatException e) {
            return -1;
        }
    }

    // TODO: remove this function / deprecate
    /**
     * Returns the preferred proxy to be used by clients. This is a wrapper
     * around {@link android.net.Proxy#getHost()}. Currently no proxy will
     * be returned for localhost or if the active network is Wi-Fi.
     * around {@link android.net.Proxy#getHost()}.
     *
     * @param context the context which will be passed to
     * {@link android.net.Proxy#getHost()}