Merge "Update methods of PacProcessor."
This commit is contained in:
@@ -12963,11 +12963,12 @@ package android.webkit {
|
||||
}
|
||||
|
||||
public interface PacProcessor {
|
||||
method @NonNull public static android.webkit.PacProcessor createInstance();
|
||||
method @Nullable public String findProxyForUrl(@NonNull String);
|
||||
method @NonNull public static android.webkit.PacProcessor getInstance();
|
||||
method @NonNull public static android.webkit.PacProcessor getInstanceForNetwork(@Nullable android.net.Network);
|
||||
method @Nullable public default android.net.Network getNetwork();
|
||||
method public default void releasePacProcessor();
|
||||
method public default void setNetwork(@Nullable android.net.Network);
|
||||
method public boolean setProxyScript(@NonNull String);
|
||||
}
|
||||
|
||||
@@ -13103,11 +13104,11 @@ package android.webkit {
|
||||
}
|
||||
|
||||
public interface WebViewFactoryProvider {
|
||||
method @NonNull public default android.webkit.PacProcessor createPacProcessor();
|
||||
method public android.webkit.WebViewProvider createWebView(android.webkit.WebView, android.webkit.WebView.PrivateAccess);
|
||||
method public android.webkit.CookieManager getCookieManager();
|
||||
method public android.webkit.GeolocationPermissions getGeolocationPermissions();
|
||||
method @NonNull public default android.webkit.PacProcessor getPacProcessor();
|
||||
method @NonNull public default android.webkit.PacProcessor getPacProcessorForNetwork(@Nullable android.net.Network);
|
||||
method public android.webkit.ServiceWorkerController getServiceWorkerController();
|
||||
method public android.webkit.WebViewFactoryProvider.Statics getStatics();
|
||||
method @Deprecated public android.webkit.TokenBindingService getTokenBindingService();
|
||||
|
||||
@@ -44,24 +44,17 @@ public interface PacProcessor {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns PacProcessor instance associated with the {@link Network}.
|
||||
* The host resolution is done on this {@link Network}.
|
||||
* Create a new PacProcessor instance.
|
||||
*
|
||||
* <p> There can only be one {@link PacProcessor} instance at a time for each {@link Network}.
|
||||
* This method will create a new instance if one did not already exist, or
|
||||
* if the previous instance was released with {@link #releasePacProcessor}.
|
||||
* <p> The created instance needs to be released manually once it is no longer needed
|
||||
* by calling {@link #releasePacProcessor} to prevent memory leaks.
|
||||
*
|
||||
* <p> The {@link PacProcessor} instance needs to be released manually with
|
||||
* {@link #releasePacProcessor} when the associated {@link Network} goes away.
|
||||
*
|
||||
* @param network a {@link Network} which this {@link PacProcessor}
|
||||
* will use for host/address resolution.
|
||||
* If {@code null} this method is equivalent to {@link #getInstance}.
|
||||
* @return {@link PacProcessor} instance for the specified network.
|
||||
* <p> The created instance is not tied to any particular {@link Network}.
|
||||
* To associate {@link PacProcessor} with a {@link Network} use {@link #setNetwork} method.
|
||||
*/
|
||||
@NonNull
|
||||
static PacProcessor getInstanceForNetwork(@Nullable Network network) {
|
||||
return WebViewFactory.getProvider().getPacProcessorForNetwork(network);
|
||||
static PacProcessor createInstance() {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,6 +86,18 @@ public interface PacProcessor {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate {@link PacProcessor} instance with the {@link Network}.
|
||||
* Once this method returns host resolution is done on the set {@link Network}.
|
||||
|
||||
* @param network a {@link Network} which this {@link PacProcessor}
|
||||
* will use for host/address resolution. If {@code null} reset
|
||||
* {@link PacProcessor} instance so it is not associated with any {@link Network}.
|
||||
*/
|
||||
default void setNetwork(@Nullable Network network) {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@link Network} associated with this {@link PacProcessor}.
|
||||
*
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package android.webkit;
|
||||
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.SystemApi;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -186,8 +185,7 @@ public interface WebViewFactoryProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns PacProcessor instance associated with the {@link Network}.
|
||||
* The host resolution is done on this {@link Network}.
|
||||
* Create a new PacProcessor instance.
|
||||
*
|
||||
* @param network a {@link Network} which needs to be associated
|
||||
* with the returned {@link PacProcessor}.
|
||||
@@ -195,7 +193,7 @@ public interface WebViewFactoryProvider {
|
||||
* @return the {@link PacProcessor} instance associated with {@link Network}.
|
||||
*/
|
||||
@NonNull
|
||||
default PacProcessor getPacProcessorForNetwork(@Nullable Network network) {
|
||||
default PacProcessor createPacProcessor() {
|
||||
throw new UnsupportedOperationException("Not implemented");
|
||||
}
|
||||
|
||||
|
||||
@@ -11798,11 +11798,12 @@ package android.webkit {
|
||||
}
|
||||
|
||||
public interface PacProcessor {
|
||||
method @NonNull public static android.webkit.PacProcessor createInstance();
|
||||
method @Nullable public String findProxyForUrl(@NonNull String);
|
||||
method @NonNull public static android.webkit.PacProcessor getInstance();
|
||||
method @NonNull public static android.webkit.PacProcessor getInstanceForNetwork(@Nullable android.net.Network);
|
||||
method @Nullable public default android.net.Network getNetwork();
|
||||
method public default void releasePacProcessor();
|
||||
method public default void setNetwork(@Nullable android.net.Network);
|
||||
method public boolean setProxyScript(@NonNull String);
|
||||
}
|
||||
|
||||
@@ -11938,11 +11939,11 @@ package android.webkit {
|
||||
}
|
||||
|
||||
public interface WebViewFactoryProvider {
|
||||
method @NonNull public default android.webkit.PacProcessor createPacProcessor();
|
||||
method public android.webkit.WebViewProvider createWebView(android.webkit.WebView, android.webkit.WebView.PrivateAccess);
|
||||
method public android.webkit.CookieManager getCookieManager();
|
||||
method public android.webkit.GeolocationPermissions getGeolocationPermissions();
|
||||
method @NonNull public default android.webkit.PacProcessor getPacProcessor();
|
||||
method @NonNull public default android.webkit.PacProcessor getPacProcessorForNetwork(@Nullable android.net.Network);
|
||||
method public android.webkit.ServiceWorkerController getServiceWorkerController();
|
||||
method public android.webkit.WebViewFactoryProvider.Statics getStatics();
|
||||
method @Deprecated public android.webkit.TokenBindingService getTokenBindingService();
|
||||
|
||||
Reference in New Issue
Block a user