Merge "[WebView] Allow the WebView to be compiled against the system SDK."

This commit is contained in:
Ignacio Solla
2014-11-26 18:31:00 +00:00
committed by Gerrit Code Review
25 changed files with 422 additions and 725 deletions

View File

@@ -35803,24 +35803,25 @@ package android.webkit {
enum_constant public static final android.webkit.ConsoleMessage.MessageLevel WARNING; enum_constant public static final android.webkit.ConsoleMessage.MessageLevel WARNING;
} }
public class CookieManager { public abstract class CookieManager {
method public synchronized boolean acceptCookie(); ctor public CookieManager();
method public boolean acceptThirdPartyCookies(android.webkit.WebView); method public abstract boolean acceptCookie();
method public abstract boolean acceptThirdPartyCookies(android.webkit.WebView);
method public static boolean allowFileSchemeCookies(); method public static boolean allowFileSchemeCookies();
method public void flush(); method public abstract void flush();
method public java.lang.String getCookie(java.lang.String); method public abstract java.lang.String getCookie(java.lang.String);
method public static synchronized android.webkit.CookieManager getInstance(); method public static synchronized android.webkit.CookieManager getInstance();
method public synchronized boolean hasCookies(); method public abstract boolean hasCookies();
method public deprecated void removeAllCookie(); method public abstract deprecated void removeAllCookie();
method public void removeAllCookies(android.webkit.ValueCallback<java.lang.Boolean>); method public abstract void removeAllCookies(android.webkit.ValueCallback<java.lang.Boolean>);
method public deprecated void removeExpiredCookie(); method public abstract deprecated void removeExpiredCookie();
method public deprecated void removeSessionCookie(); method public abstract deprecated void removeSessionCookie();
method public void removeSessionCookies(android.webkit.ValueCallback<java.lang.Boolean>); method public abstract void removeSessionCookies(android.webkit.ValueCallback<java.lang.Boolean>);
method public synchronized void setAcceptCookie(boolean); method public abstract void setAcceptCookie(boolean);
method public static void setAcceptFileSchemeCookies(boolean); method public static void setAcceptFileSchemeCookies(boolean);
method public void setAcceptThirdPartyCookies(android.webkit.WebView, boolean); method public abstract void setAcceptThirdPartyCookies(android.webkit.WebView, boolean);
method public void setCookie(java.lang.String, java.lang.String); method public abstract void setCookie(java.lang.String, java.lang.String);
method public void setCookie(java.lang.String, java.lang.String, android.webkit.ValueCallback<java.lang.Boolean>); method public abstract void setCookie(java.lang.String, java.lang.String, android.webkit.ValueCallback<java.lang.Boolean>);
} }
public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager { public final deprecated class CookieSyncManager extends android.webkit.WebSyncManager {
@@ -35929,11 +35930,13 @@ package android.webkit {
method public abstract void onReceiveValue(T); method public abstract void onReceiveValue(T);
} }
public class WebBackForwardList implements java.lang.Cloneable java.io.Serializable { public abstract class WebBackForwardList implements java.lang.Cloneable java.io.Serializable {
method public synchronized int getCurrentIndex(); ctor public WebBackForwardList();
method public synchronized android.webkit.WebHistoryItem getCurrentItem(); method protected abstract android.webkit.WebBackForwardList clone();
method public synchronized android.webkit.WebHistoryItem getItemAtIndex(int); method public abstract int getCurrentIndex();
method public synchronized int getSize(); method public abstract android.webkit.WebHistoryItem getCurrentItem();
method public abstract android.webkit.WebHistoryItem getItemAtIndex(int);
method public abstract int getSize();
} }
public class WebChromeClient { public class WebChromeClient {
@@ -35985,21 +35988,24 @@ package android.webkit {
field public static final int MODE_SAVE = 3; // 0x3 field public static final int MODE_SAVE = 3; // 0x3
} }
public class WebHistoryItem implements java.lang.Cloneable { public abstract class WebHistoryItem implements java.lang.Cloneable {
method public android.graphics.Bitmap getFavicon(); ctor public WebHistoryItem();
method public java.lang.String getOriginalUrl(); method protected abstract android.webkit.WebHistoryItem clone();
method public java.lang.String getTitle(); method public abstract android.graphics.Bitmap getFavicon();
method public java.lang.String getUrl(); method public abstract java.lang.String getOriginalUrl();
method public abstract java.lang.String getTitle();
method public abstract java.lang.String getUrl();
} }
public deprecated class WebIconDatabase { public abstract deprecated class WebIconDatabase {
method public void close(); ctor public WebIconDatabase();
method public abstract void close();
method public static android.webkit.WebIconDatabase getInstance(); method public static android.webkit.WebIconDatabase getInstance();
method public void open(java.lang.String); method public abstract void open(java.lang.String);
method public void releaseIconForPageUrl(java.lang.String); method public abstract void releaseIconForPageUrl(java.lang.String);
method public void removeAllIcons(); method public abstract void removeAllIcons();
method public void requestIconForPageUrl(java.lang.String, android.webkit.WebIconDatabase.IconListener); method public abstract void requestIconForPageUrl(java.lang.String, android.webkit.WebIconDatabase.IconListener);
method public void retainIconForPageUrl(java.lang.String); method public abstract void retainIconForPageUrl(java.lang.String);
} }
public static abstract deprecated interface WebIconDatabase.IconListener { public static abstract deprecated interface WebIconDatabase.IconListener {
@@ -36031,98 +36037,99 @@ package android.webkit {
} }
public abstract class WebSettings { public abstract class WebSettings {
method public deprecated boolean enableSmoothTransition(); ctor public WebSettings();
method public boolean getAllowContentAccess(); method public abstract deprecated boolean enableSmoothTransition();
method public boolean getAllowFileAccess(); method public abstract boolean getAllowContentAccess();
method public abstract boolean getAllowFileAccess();
method public abstract boolean getAllowFileAccessFromFileURLs(); method public abstract boolean getAllowFileAccessFromFileURLs();
method public abstract boolean getAllowUniversalAccessFromFileURLs(); method public abstract boolean getAllowUniversalAccessFromFileURLs();
method public synchronized boolean getBlockNetworkImage(); method public abstract boolean getBlockNetworkImage();
method public synchronized boolean getBlockNetworkLoads(); method public abstract boolean getBlockNetworkLoads();
method public boolean getBuiltInZoomControls(); method public abstract boolean getBuiltInZoomControls();
method public int getCacheMode(); method public abstract int getCacheMode();
method public synchronized java.lang.String getCursiveFontFamily(); method public abstract java.lang.String getCursiveFontFamily();
method public synchronized boolean getDatabaseEnabled(); method public abstract boolean getDatabaseEnabled();
method public deprecated synchronized java.lang.String getDatabasePath(); method public abstract deprecated java.lang.String getDatabasePath();
method public synchronized int getDefaultFixedFontSize(); method public abstract int getDefaultFixedFontSize();
method public synchronized int getDefaultFontSize(); method public abstract int getDefaultFontSize();
method public synchronized java.lang.String getDefaultTextEncodingName(); method public abstract java.lang.String getDefaultTextEncodingName();
method public static java.lang.String getDefaultUserAgent(android.content.Context); method public static java.lang.String getDefaultUserAgent(android.content.Context);
method public deprecated android.webkit.WebSettings.ZoomDensity getDefaultZoom(); method public abstract deprecated android.webkit.WebSettings.ZoomDensity getDefaultZoom();
method public boolean getDisplayZoomControls(); method public abstract boolean getDisplayZoomControls();
method public synchronized boolean getDomStorageEnabled(); method public abstract boolean getDomStorageEnabled();
method public synchronized java.lang.String getFantasyFontFamily(); method public abstract java.lang.String getFantasyFontFamily();
method public synchronized java.lang.String getFixedFontFamily(); method public abstract java.lang.String getFixedFontFamily();
method public synchronized boolean getJavaScriptCanOpenWindowsAutomatically(); method public abstract boolean getJavaScriptCanOpenWindowsAutomatically();
method public synchronized boolean getJavaScriptEnabled(); method public abstract boolean getJavaScriptEnabled();
method public synchronized android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm(); method public abstract android.webkit.WebSettings.LayoutAlgorithm getLayoutAlgorithm();
method public deprecated boolean getLightTouchEnabled(); method public abstract deprecated boolean getLightTouchEnabled();
method public boolean getLoadWithOverviewMode(); method public abstract boolean getLoadWithOverviewMode();
method public synchronized boolean getLoadsImagesAutomatically(); method public abstract boolean getLoadsImagesAutomatically();
method public boolean getMediaPlaybackRequiresUserGesture(); method public abstract boolean getMediaPlaybackRequiresUserGesture();
method public synchronized int getMinimumFontSize(); method public abstract int getMinimumFontSize();
method public synchronized int getMinimumLogicalFontSize(); method public abstract int getMinimumLogicalFontSize();
method public abstract int getMixedContentMode(); method public abstract int getMixedContentMode();
method public deprecated synchronized android.webkit.WebSettings.PluginState getPluginState(); method public abstract deprecated android.webkit.WebSettings.PluginState getPluginState();
method public synchronized java.lang.String getSansSerifFontFamily(); method public abstract java.lang.String getSansSerifFontFamily();
method public boolean getSaveFormData(); method public abstract boolean getSaveFormData();
method public deprecated boolean getSavePassword(); method public abstract deprecated boolean getSavePassword();
method public synchronized java.lang.String getSerifFontFamily(); method public abstract java.lang.String getSerifFontFamily();
method public synchronized java.lang.String getStandardFontFamily(); method public abstract java.lang.String getStandardFontFamily();
method public deprecated synchronized android.webkit.WebSettings.TextSize getTextSize(); method public deprecated synchronized android.webkit.WebSettings.TextSize getTextSize();
method public synchronized int getTextZoom(); method public abstract int getTextZoom();
method public synchronized boolean getUseWideViewPort(); method public abstract boolean getUseWideViewPort();
method public synchronized java.lang.String getUserAgentString(); method public abstract java.lang.String getUserAgentString();
method public void setAllowContentAccess(boolean); method public abstract void setAllowContentAccess(boolean);
method public void setAllowFileAccess(boolean); method public abstract void setAllowFileAccess(boolean);
method public abstract void setAllowFileAccessFromFileURLs(boolean); method public abstract void setAllowFileAccessFromFileURLs(boolean);
method public abstract void setAllowUniversalAccessFromFileURLs(boolean); method public abstract void setAllowUniversalAccessFromFileURLs(boolean);
method public synchronized void setAppCacheEnabled(boolean); method public abstract void setAppCacheEnabled(boolean);
method public deprecated synchronized void setAppCacheMaxSize(long); method public abstract deprecated void setAppCacheMaxSize(long);
method public synchronized void setAppCachePath(java.lang.String); method public abstract void setAppCachePath(java.lang.String);
method public synchronized void setBlockNetworkImage(boolean); method public abstract void setBlockNetworkImage(boolean);
method public synchronized void setBlockNetworkLoads(boolean); method public abstract void setBlockNetworkLoads(boolean);
method public void setBuiltInZoomControls(boolean); method public abstract void setBuiltInZoomControls(boolean);
method public void setCacheMode(int); method public abstract void setCacheMode(int);
method public synchronized void setCursiveFontFamily(java.lang.String); method public abstract void setCursiveFontFamily(java.lang.String);
method public synchronized void setDatabaseEnabled(boolean); method public abstract void setDatabaseEnabled(boolean);
method public deprecated synchronized void setDatabasePath(java.lang.String); method public abstract deprecated void setDatabasePath(java.lang.String);
method public synchronized void setDefaultFixedFontSize(int); method public abstract void setDefaultFixedFontSize(int);
method public synchronized void setDefaultFontSize(int); method public abstract void setDefaultFontSize(int);
method public synchronized void setDefaultTextEncodingName(java.lang.String); method public abstract void setDefaultTextEncodingName(java.lang.String);
method public deprecated void setDefaultZoom(android.webkit.WebSettings.ZoomDensity); method public abstract deprecated void setDefaultZoom(android.webkit.WebSettings.ZoomDensity);
method public void setDisplayZoomControls(boolean); method public abstract void setDisplayZoomControls(boolean);
method public synchronized void setDomStorageEnabled(boolean); method public abstract void setDomStorageEnabled(boolean);
method public deprecated void setEnableSmoothTransition(boolean); method public abstract deprecated void setEnableSmoothTransition(boolean);
method public synchronized void setFantasyFontFamily(java.lang.String); method public abstract void setFantasyFontFamily(java.lang.String);
method public synchronized void setFixedFontFamily(java.lang.String); method public abstract void setFixedFontFamily(java.lang.String);
method public synchronized void setGeolocationDatabasePath(java.lang.String); method public abstract void setGeolocationDatabasePath(java.lang.String);
method public synchronized void setGeolocationEnabled(boolean); method public abstract void setGeolocationEnabled(boolean);
method public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean); method public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean);
method public synchronized void setJavaScriptEnabled(boolean); method public abstract void setJavaScriptEnabled(boolean);
method public synchronized void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm); method public abstract void setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm);
method public deprecated void setLightTouchEnabled(boolean); method public abstract deprecated void setLightTouchEnabled(boolean);
method public void setLoadWithOverviewMode(boolean); method public abstract void setLoadWithOverviewMode(boolean);
method public synchronized void setLoadsImagesAutomatically(boolean); method public abstract void setLoadsImagesAutomatically(boolean);
method public void setMediaPlaybackRequiresUserGesture(boolean); method public abstract void setMediaPlaybackRequiresUserGesture(boolean);
method public synchronized void setMinimumFontSize(int); method public abstract void setMinimumFontSize(int);
method public synchronized void setMinimumLogicalFontSize(int); method public abstract void setMinimumLogicalFontSize(int);
method public abstract void setMixedContentMode(int); method public abstract void setMixedContentMode(int);
method public void setNeedInitialFocus(boolean); method public abstract void setNeedInitialFocus(boolean);
method public deprecated synchronized void setPluginState(android.webkit.WebSettings.PluginState); method public abstract deprecated void setPluginState(android.webkit.WebSettings.PluginState);
method public deprecated synchronized void setRenderPriority(android.webkit.WebSettings.RenderPriority); method public abstract deprecated void setRenderPriority(android.webkit.WebSettings.RenderPriority);
method public synchronized void setSansSerifFontFamily(java.lang.String); method public abstract void setSansSerifFontFamily(java.lang.String);
method public void setSaveFormData(boolean); method public abstract void setSaveFormData(boolean);
method public deprecated void setSavePassword(boolean); method public abstract deprecated void setSavePassword(boolean);
method public synchronized void setSerifFontFamily(java.lang.String); method public abstract void setSerifFontFamily(java.lang.String);
method public synchronized void setStandardFontFamily(java.lang.String); method public abstract void setStandardFontFamily(java.lang.String);
method public synchronized void setSupportMultipleWindows(boolean); method public abstract void setSupportMultipleWindows(boolean);
method public void setSupportZoom(boolean); method public abstract void setSupportZoom(boolean);
method public deprecated synchronized void setTextSize(android.webkit.WebSettings.TextSize); method public deprecated synchronized void setTextSize(android.webkit.WebSettings.TextSize);
method public synchronized void setTextZoom(int); method public abstract void setTextZoom(int);
method public synchronized void setUseWideViewPort(boolean); method public abstract void setUseWideViewPort(boolean);
method public synchronized void setUserAgentString(java.lang.String); method public abstract void setUserAgentString(java.lang.String);
method public synchronized boolean supportMultipleWindows(); method public abstract boolean supportMultipleWindows();
method public boolean supportZoom(); method public abstract boolean supportZoom();
field public static final int LOAD_CACHE_ELSE_NETWORK = 1; // 0x1 field public static final int LOAD_CACHE_ELSE_NETWORK = 1; // 0x1
field public static final int LOAD_CACHE_ONLY = 3; // 0x3 field public static final int LOAD_CACHE_ONLY = 3; // 0x3
field public static final int LOAD_DEFAULT = -1; // 0xffffffff field public static final int LOAD_DEFAULT = -1; // 0xffffffff
@@ -36372,14 +36379,15 @@ package android.webkit {
field public static final int ERROR_UNSUPPORTED_SCHEME = -10; // 0xfffffff6 field public static final int ERROR_UNSUPPORTED_SCHEME = -10; // 0xfffffff6
} }
public class WebViewDatabase { public abstract class WebViewDatabase {
method public void clearFormData(); ctor public WebViewDatabase();
method public void clearHttpAuthUsernamePassword(); method public abstract void clearFormData();
method public deprecated void clearUsernamePassword(); method public abstract void clearHttpAuthUsernamePassword();
method public abstract deprecated void clearUsernamePassword();
method public static android.webkit.WebViewDatabase getInstance(android.content.Context); method public static android.webkit.WebViewDatabase getInstance(android.content.Context);
method public boolean hasFormData(); method public abstract boolean hasFormData();
method public boolean hasHttpAuthUsernamePassword(); method public abstract boolean hasHttpAuthUsernamePassword();
method public deprecated boolean hasUsernamePassword(); method public abstract deprecated boolean hasUsernamePassword();
} }
public class WebViewFragment extends android.app.Fragment { public class WebViewFragment extends android.app.Fragment {

View File

@@ -18,6 +18,8 @@ package android.net;
import static android.util.Patterns.GOOD_IRI_CHAR; import static android.util.Patterns.GOOD_IRI_CHAR;
import android.annotation.SystemApi;
import java.util.Locale; import java.util.Locale;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -38,6 +40,9 @@ import java.util.regex.Pattern;
* If given an https scheme but no port, fills in port * If given an https scheme but no port, fills in port
* *
*/ */
// TODO(igsolla): remove WebAddress from the system SDK once the WebView apk does not
// longer need to be binary compatible with the API 21 version of the framework.
@SystemApi
public class WebAddress { public class WebAddress {
private String mScheme; private String mScheme;
@@ -136,42 +141,52 @@ public class WebAddress {
return mScheme + "://" + authInfo + mHost + port + mPath; return mScheme + "://" + authInfo + mHost + port + mPath;
} }
/** {@hide} */
public void setScheme(String scheme) { public void setScheme(String scheme) {
mScheme = scheme; mScheme = scheme;
} }
/** {@hide} */
public String getScheme() { public String getScheme() {
return mScheme; return mScheme;
} }
/** {@hide} */
public void setHost(String host) { public void setHost(String host) {
mHost = host; mHost = host;
} }
/** {@hide} */
public String getHost() { public String getHost() {
return mHost; return mHost;
} }
/** {@hide} */
public void setPort(int port) { public void setPort(int port) {
mPort = port; mPort = port;
} }
/** {@hide} */
public int getPort() { public int getPort() {
return mPort; return mPort;
} }
/** {@hide} */
public void setPath(String path) { public void setPath(String path) {
mPath = path; mPath = path;
} }
/** {@hide} */
public String getPath() { public String getPath() {
return mPath; return mPath;
} }
/** {@hide} */
public void setAuthInfo(String authInfo) { public void setAuthInfo(String authInfo) {
mAuthInfo = authInfo; mAuthInfo = authInfo;
} }
/** {@hide} */
public String getAuthInfo() { public String getAuthInfo() {
return mAuthInfo; return mAuthInfo;
} }

View File

@@ -16,18 +16,14 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.net.WebAddress; import android.net.WebAddress;
/** /**
* Manages the cookies used by an application's {@link WebView} instances. * Manages the cookies used by an application's {@link WebView} instances.
* Cookies are manipulated according to RFC2109. * Cookies are manipulated according to RFC2109.
*/ */
public class CookieManager { public abstract class CookieManager {
/**
* @hide Only for use by WebViewProvider implementations
*/
protected CookieManager() {
}
@Override @Override
protected Object clone() throws CloneNotSupportedException { protected Object clone() throws CloneNotSupportedException {
@@ -59,9 +55,7 @@ public class CookieManager {
* @param accept whether {@link WebView} instances should send and accept * @param accept whether {@link WebView} instances should send and accept
* cookies * cookies
*/ */
public synchronized void setAcceptCookie(boolean accept) { public abstract void setAcceptCookie(boolean accept);
throw new MustOverrideException();
}
/** /**
* Gets whether the application's {@link WebView} instances send and accept * Gets whether the application's {@link WebView} instances send and accept
@@ -69,9 +63,7 @@ public class CookieManager {
* *
* @return true if {@link WebView} instances send and accept cookies * @return true if {@link WebView} instances send and accept cookies
*/ */
public synchronized boolean acceptCookie() { public abstract boolean acceptCookie();
throw new MustOverrideException();
}
/** /**
* Sets whether the {@link WebView} should allow third party cookies to be set. * Sets whether the {@link WebView} should allow third party cookies to be set.
@@ -87,9 +79,7 @@ public class CookieManager {
* @param accept whether the {@link WebView} instance should accept * @param accept whether the {@link WebView} instance should accept
* third party cookies * third party cookies
*/ */
public void setAcceptThirdPartyCookies(WebView webview, boolean accept) { public abstract void setAcceptThirdPartyCookies(WebView webview, boolean accept);
throw new MustOverrideException();
}
/** /**
* Gets whether the {@link WebView} should allow third party cookies to be set. * Gets whether the {@link WebView} should allow third party cookies to be set.
@@ -97,9 +87,7 @@ public class CookieManager {
* @param webview the {@link WebView} instance to get the cookie policy for * @param webview the {@link WebView} instance to get the cookie policy for
* @return true if the {@link WebView} accepts third party cookies * @return true if the {@link WebView} accepts third party cookies
*/ */
public boolean acceptThirdPartyCookies(WebView webview) { public abstract boolean acceptThirdPartyCookies(WebView webview);
throw new MustOverrideException();
}
/** /**
* Sets a cookie for the given URL. Any existing cookie with the same host, * Sets a cookie for the given URL. Any existing cookie with the same host,
@@ -110,9 +98,7 @@ public class CookieManager {
* @param value the cookie as a string, using the format of the 'Set-Cookie' * @param value the cookie as a string, using the format of the 'Set-Cookie'
* HTTP response header * HTTP response header
*/ */
public void setCookie(String url, String value) { public abstract void setCookie(String url, String value);
throw new MustOverrideException();
}
/** /**
* Sets a cookie for the given URL. Any existing cookie with the same host, * Sets a cookie for the given URL. Any existing cookie with the same host,
@@ -133,9 +119,7 @@ public class CookieManager {
* HTTP response header * HTTP response header
* @param callback a callback to be executed when the cookie has been set * @param callback a callback to be executed when the cookie has been set
*/ */
public void setCookie(String url, String value, ValueCallback<Boolean> callback) { public abstract void setCookie(String url, String value, ValueCallback<Boolean> callback);
throw new MustOverrideException();
}
/** /**
* Gets the cookies for the given URL. * Gets the cookies for the given URL.
@@ -144,9 +128,7 @@ public class CookieManager {
* @return value the cookies as a string, using the format of the 'Cookie' * @return value the cookies as a string, using the format of the 'Cookie'
* HTTP request header * HTTP request header
*/ */
public String getCookie(String url) { public abstract String getCookie(String url);
throw new MustOverrideException();
}
/** /**
* See {@link #getCookie(String)}. * See {@link #getCookie(String)}.
@@ -155,11 +137,10 @@ public class CookieManager {
* @param privateBrowsing whether to use the private browsing cookie jar * @param privateBrowsing whether to use the private browsing cookie jar
* @return value the cookies as a string, using the format of the 'Cookie' * @return value the cookies as a string, using the format of the 'Cookie'
* HTTP request header * HTTP request header
* @hide Used by Browser, no intention to publish. * @hide Used by Browser and by WebViewProvider implementations.
*/ */
public String getCookie(String url, boolean privateBrowsing) { @SystemApi
throw new MustOverrideException(); public abstract String getCookie(String url, boolean privateBrowsing);
}
/** /**
* Gets cookie(s) for a given uri so that it can be set to "cookie:" in http * Gets cookie(s) for a given uri so that it can be set to "cookie:" in http
@@ -168,10 +149,11 @@ public class CookieManager {
* @param uri the WebAddress for which the cookies are requested * @param uri the WebAddress for which the cookies are requested
* @return value the cookies as a string, using the format of the 'Cookie' * @return value the cookies as a string, using the format of the 'Cookie'
* HTTP request header * HTTP request header
* @hide Used by RequestHandle, no intention to publish. * @hide Used by RequestHandle and by WebViewProvider implementations.
*/ */
@SystemApi
public synchronized String getCookie(WebAddress uri) { public synchronized String getCookie(WebAddress uri) {
throw new MustOverrideException(); return getCookie(uri.toString());
} }
/** /**
@@ -179,9 +161,7 @@ public class CookieManager {
* date. * date.
* @deprecated use {@link #removeSessionCookies(ValueCallback)} instead. * @deprecated use {@link #removeSessionCookies(ValueCallback)} instead.
*/ */
public void removeSessionCookie() { public abstract void removeSessionCookie();
throw new MustOverrideException();
}
/** /**
* Removes all session cookies, which are cookies without an expiration * Removes all session cookies, which are cookies without an expiration
@@ -197,18 +177,14 @@ public class CookieManager {
* method from a thread without a Looper. * method from a thread without a Looper.
* @param callback a callback which is executed when the session cookies have been removed * @param callback a callback which is executed when the session cookies have been removed
*/ */
public void removeSessionCookies(ValueCallback<Boolean> callback) { public abstract void removeSessionCookies(ValueCallback<Boolean> callback);
throw new MustOverrideException();
}
/** /**
* Removes all cookies. * Removes all cookies.
* @deprecated Use {@link #removeAllCookies(ValueCallback)} instead. * @deprecated Use {@link #removeAllCookies(ValueCallback)} instead.
*/ */
@Deprecated @Deprecated
public void removeAllCookie() { public abstract void removeAllCookie();
throw new MustOverrideException();
}
/** /**
* Removes all cookies. * Removes all cookies.
@@ -223,54 +199,37 @@ public class CookieManager {
* method from a thread without a Looper. * method from a thread without a Looper.
* @param callback a callback which is executed when the cookies have been removed * @param callback a callback which is executed when the cookies have been removed
*/ */
public void removeAllCookies(ValueCallback<Boolean> callback) { public abstract void removeAllCookies(ValueCallback<Boolean> callback);
throw new MustOverrideException();
}
/** /**
* Gets whether there are stored cookies. * Gets whether there are stored cookies.
* *
* @return true if there are stored cookies * @return true if there are stored cookies
*/ */
public synchronized boolean hasCookies() { public abstract boolean hasCookies();
throw new MustOverrideException();
}
/** /**
* See {@link #hasCookies()}. * See {@link #hasCookies()}.
* *
* @param privateBrowsing whether to use the private browsing cookie jar * @param privateBrowsing whether to use the private browsing cookie jar
* @hide Used by Browser, no intention to publish. * @hide Used by Browser and WebViewProvider implementations.
*/ */
public synchronized boolean hasCookies(boolean privateBrowsing) { @SystemApi
throw new MustOverrideException(); public abstract boolean hasCookies(boolean privateBrowsing);
}
/** /**
* Removes all expired cookies. * Removes all expired cookies.
* @deprecated The WebView handles removing expired cookies automatically. * @deprecated The WebView handles removing expired cookies automatically.
*/ */
@Deprecated @Deprecated
public void removeExpiredCookie() { public abstract void removeExpiredCookie();
throw new MustOverrideException();
}
/** /**
* Ensures all cookies currently accessible through the getCookie API are * Ensures all cookies currently accessible through the getCookie API are
* written to persistent storage. * written to persistent storage.
* This call will block the caller until it is done and may perform I/O. * This call will block the caller until it is done and may perform I/O.
*/ */
public void flush() { public abstract void flush();
flushCookieStore();
}
/**
* Flushes all cookies managed by the Chrome HTTP stack to flash.
*
* @hide Package level api, called from CookieSyncManager
*/
protected void flushCookieStore() {
}
/** /**
* Gets whether the application's {@link WebView} instances send and accept * Gets whether the application's {@link WebView} instances send and accept
@@ -289,9 +248,8 @@ public class CookieManager {
* *
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
protected boolean allowFileSchemeCookiesImpl() { @SystemApi
throw new MustOverrideException(); protected abstract boolean allowFileSchemeCookiesImpl();
}
/** /**
* Sets whether the application's {@link WebView} instances should send and * Sets whether the application's {@link WebView} instances should send and
@@ -314,7 +272,6 @@ public class CookieManager {
* *
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
protected void setAcceptFileSchemeCookiesImpl(boolean accept) { @SystemApi
throw new MustOverrideException(); protected abstract void setAcceptFileSchemeCookiesImpl(boolean accept);
}
} }

View File

@@ -1,37 +0,0 @@
/*
* Copyright (C) 2009 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.webkit;
/**
* This class is a container for all of the debug flags used in the Java
* components of webkit. These flags must be final in order to ensure that
* the compiler optimizes the code that uses them out of the final executable.
*
* The name of each flags maps directly to the name of the class in which that
* flag is used.
*
* @hide Only used by WebView implementations.
*/
public class DebugFlags {
public static final boolean COOKIE_SYNC_MANAGER = false;
public static final boolean TRACE_API = false;
public static final boolean TRACE_CALLBACK = false;
public static final boolean URL_UTIL = false;
public static final boolean WEB_SYNC_MANAGER = false;
}

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.Context; import android.content.Context;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Point; import android.graphics.Point;
@@ -36,6 +37,7 @@ import android.widget.TextView;
/** /**
* @hide * @hide
*/ */
@SystemApi
public class FindActionModeCallback implements ActionMode.Callback, TextWatcher, public class FindActionModeCallback implements ActionMode.Callback, TextWatcher,
View.OnClickListener, WebView.FindListener { View.OnClickListener, WebView.FindListener {
private View mCustomView; private View mCustomView;

View File

@@ -16,6 +16,8 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import java.util.Set; import java.util.Set;
/** /**
@@ -136,5 +138,6 @@ public class GeolocationPermissions {
* way to call createHandler() and createUIHandler(), so it would not work). * way to call createHandler() and createUIHandler(), so it would not work).
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public GeolocationPermissions() {} public GeolocationPermissions() {}
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.os.Handler; import android.os.Handler;
/** /**
@@ -30,6 +31,7 @@ public class HttpAuthHandler extends Handler {
/** /**
* @hide Only for use by WebViewProvider implementations. * @hide Only for use by WebViewProvider implementations.
*/ */
@SystemApi
public HttpAuthHandler() { public HttpAuthHandler() {
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
@@ -34,8 +35,9 @@ import java.net.URL;
* Helper class to create JavaScript dialogs. It is used by * Helper class to create JavaScript dialogs. It is used by
* different WebView implementations. * different WebView implementations.
* *
* @hide Helper class for internal use * @hide
*/ */
@SystemApi
public class JsDialogHelper { public class JsDialogHelper {
private static final String TAG = "JsDialogHelper"; private static final String TAG = "JsDialogHelper";

View File

@@ -16,6 +16,8 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
/** /**
* Public class for handling JavaScript prompt requests. The WebChromeClient will receive a * Public class for handling JavaScript prompt requests. The WebChromeClient will receive a
@@ -39,6 +41,7 @@ public class JsPromptResult extends JsResult {
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public JsPromptResult(ResultReceiver receiver) { public JsPromptResult(ResultReceiver receiver) {
super(receiver); super(receiver);
} }
@@ -46,6 +49,7 @@ public class JsPromptResult extends JsResult {
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public String getStringResult() { public String getStringResult() {
return mStringResult; return mStringResult;
} }

View File

@@ -16,6 +16,8 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
/** /**
* An instance of this class is passed as a parameter in various {@link WebChromeClient} action * An instance of this class is passed as a parameter in various {@link WebChromeClient} action
* notifications. The object is used as a handle onto the underlying JavaScript-originated request, * notifications. The object is used as a handle onto the underlying JavaScript-originated request,
@@ -27,6 +29,7 @@ public class JsResult {
* notifications when the JavaScript result represented by a JsResult instance has * notifications when the JavaScript result represented by a JsResult instance has
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public interface ResultReceiver { public interface ResultReceiver {
public void onJsResultComplete(JsResult result); public void onJsResultComplete(JsResult result);
} }
@@ -54,6 +57,7 @@ public class JsResult {
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public JsResult(ResultReceiver receiver) { public JsResult(ResultReceiver receiver) {
mReceiver = receiver; mReceiver = receiver;
} }
@@ -61,6 +65,7 @@ public class JsResult {
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public final boolean getResult() { public final boolean getResult() {
return mResult; return mResult;
} }

View File

@@ -1,25 +0,0 @@
/*
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.webkit;
// TODO: Remove MustOverrideException and make all methods throwing it abstract instead;
// needs API file update.
class MustOverrideException extends RuntimeException {
MustOverrideException() {
super("abstract function called: must be overriden!");
}
}

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.os.Handler; import android.os.Handler;
/** /**
@@ -30,6 +31,7 @@ public class SslErrorHandler extends Handler {
/** /**
* @hide Only for use by WebViewProvider implementations. * @hide Only for use by WebViewProvider implementations.
*/ */
@SystemApi
public SslErrorHandler() {} public SslErrorHandler() {}
/** /**

View File

@@ -29,6 +29,7 @@ import android.util.Log;
public final class URLUtil { public final class URLUtil {
private static final String LOGTAG = "webkit"; private static final String LOGTAG = "webkit";
private static final boolean TRACE = false;
// to refer to bar.png under your package's asset/foo/ directory, use // to refer to bar.png under your package's asset/foo/ directory, use
// "file:///android_asset/foo/bar.png". // "file:///android_asset/foo/bar.png".
@@ -49,7 +50,7 @@ public final class URLUtil {
String retVal = inUrl; String retVal = inUrl;
WebAddress webAddress; WebAddress webAddress;
if (DebugFlags.URL_UTIL) Log.v(LOGTAG, "guessURL before queueRequest: " + inUrl); if (TRACE) Log.v(LOGTAG, "guessURL before queueRequest: " + inUrl);
if (inUrl.length() == 0) return inUrl; if (inUrl.length() == 0) return inUrl;
if (inUrl.startsWith("about:")) return inUrl; if (inUrl.startsWith("about:")) return inUrl;
@@ -69,7 +70,7 @@ public final class URLUtil {
webAddress = new WebAddress(inUrl); webAddress = new WebAddress(inUrl);
} catch (ParseException ex) { } catch (ParseException ex) {
if (DebugFlags.URL_UTIL) { if (TRACE) {
Log.v(LOGTAG, "smartUrlFilter: failed to parse url = " + inUrl); Log.v(LOGTAG, "smartUrlFilter: failed to parse url = " + inUrl);
} }
return retVal; return retVal;

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import java.io.Serializable; import java.io.Serializable;
/** /**
@@ -23,56 +24,38 @@ import java.io.Serializable;
* WebView.copyBackForwardList() will return a copy of this class used to * WebView.copyBackForwardList() will return a copy of this class used to
* inspect the entries in the list. * inspect the entries in the list.
*/ */
public class WebBackForwardList implements Cloneable, Serializable { public abstract class WebBackForwardList implements Cloneable, Serializable {
/**
* @hide
*/
public WebBackForwardList() {
}
/** /**
* Return the current history item. This method returns null if the list is * Return the current history item. This method returns null if the list is
* empty. * empty.
* @return The current history item. * @return The current history item.
*/ */
public synchronized WebHistoryItem getCurrentItem() { public abstract WebHistoryItem getCurrentItem();
throw new MustOverrideException();
}
/** /**
* Get the index of the current history item. This index can be used to * Get the index of the current history item. This index can be used to
* directly index into the array list. * directly index into the array list.
* @return The current index from 0...n or -1 if the list is empty. * @return The current index from 0...n or -1 if the list is empty.
*/ */
public synchronized int getCurrentIndex() { public abstract int getCurrentIndex();
throw new MustOverrideException();
}
/** /**
* Get the history item at the given index. The index range is from 0...n * Get the history item at the given index. The index range is from 0...n
* where 0 is the first item and n is the last item. * where 0 is the first item and n is the last item.
* @param index The index to retrieve. * @param index The index to retrieve.
*/ */
public synchronized WebHistoryItem getItemAtIndex(int index) { public abstract WebHistoryItem getItemAtIndex(int index);
throw new MustOverrideException();
}
/** /**
* Get the total size of the back/forward list. * Get the total size of the back/forward list.
* @return The size of the list. * @return The size of the list.
*/ */
public synchronized int getSize() { public abstract int getSize();
throw new MustOverrideException();
}
/** /**
* Clone the entire object to be used in the UI thread by clients of * Clone the entire object to be used in the UI thread by clients of
* WebView. This creates a copy that should never be modified by any of the * WebView. This creates a copy that should never be modified by any of the
* webkit package classes. * webkit package classes.
*/ */
protected synchronized WebBackForwardList clone() { protected abstract WebBackForwardList clone();
throw new MustOverrideException();
}
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.Intent; import android.content.Intent;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@@ -509,6 +510,7 @@ public class WebChromeClient {
* @deprecated Use {@link #showFileChooser} instead. * @deprecated Use {@link #showFileChooser} instead.
* @hide This method was not published in any SDK version. * @hide This method was not published in any SDK version.
*/ */
@SystemApi
@Deprecated @Deprecated
public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType, String capture) { public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType, String capture) {
uploadFile.onReceiveValue(null); uploadFile.onReceiveValue(null);

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.graphics.Bitmap; import android.graphics.Bitmap;
/** /**
@@ -24,14 +25,7 @@ import android.graphics.Bitmap;
* item. Each history item may be updated during the load of a page. * item. Each history item may be updated during the load of a page.
* @see WebBackForwardList * @see WebBackForwardList
*/ */
public class WebHistoryItem implements Cloneable { public abstract class WebHistoryItem implements Cloneable {
/**
* @hide
*/
public WebHistoryItem() {
}
/** /**
* Return an identifier for this history item. If an item is a copy of * Return an identifier for this history item. If an item is a copy of
* another item, the identifiers will be the same even if they are not the * another item, the identifiers will be the same even if they are not the
@@ -40,10 +34,9 @@ public class WebHistoryItem implements Cloneable {
* @deprecated This method is now obsolete. * @deprecated This method is now obsolete.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public int getId() { public abstract int getId();
throw new MustOverrideException();
}
/** /**
* Return the url of this history item. The url is the base url of this * Return the url of this history item. The url is the base url of this
@@ -53,9 +46,7 @@ public class WebHistoryItem implements Cloneable {
* Note: The VM ensures 32-bit atomic read/write operations so we don't have * Note: The VM ensures 32-bit atomic read/write operations so we don't have
* to synchronize this method. * to synchronize this method.
*/ */
public String getUrl() { public abstract String getUrl();
throw new MustOverrideException();
}
/** /**
* Return the original url of this history item. This was the requested * Return the original url of this history item. This was the requested
@@ -63,9 +54,7 @@ public class WebHistoryItem implements Cloneable {
* redirects while loading the site. * redirects while loading the site.
* @return The original url of this history item. * @return The original url of this history item.
*/ */
public String getOriginalUrl() { public abstract String getOriginalUrl();
throw new MustOverrideException();
}
/** /**
* Return the document title of this history item. * Return the document title of this history item.
@@ -73,9 +62,7 @@ public class WebHistoryItem implements Cloneable {
* Note: The VM ensures 32-bit atomic read/write operations so we don't have * Note: The VM ensures 32-bit atomic read/write operations so we don't have
* to synchronize this method. * to synchronize this method.
*/ */
public String getTitle() { public abstract String getTitle();
throw new MustOverrideException();
}
/** /**
* Return the favicon of this history item or null if no favicon was found. * Return the favicon of this history item or null if no favicon was found.
@@ -83,15 +70,10 @@ public class WebHistoryItem implements Cloneable {
* Note: The VM ensures 32-bit atomic read/write operations so we don't have * Note: The VM ensures 32-bit atomic read/write operations so we don't have
* to synchronize this method. * to synchronize this method.
*/ */
public Bitmap getFavicon() { public abstract Bitmap getFavicon();
throw new MustOverrideException();
}
/** /**
* Clone the history item for use by clients of WebView. * Clone the history item for use by clients of WebView.
*/ */
protected synchronized WebHistoryItem clone() { protected abstract WebHistoryItem clone();
throw new MustOverrideException();
}
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.ContentResolver; import android.content.ContentResolver;
import android.graphics.Bitmap; import android.graphics.Bitmap;
@@ -32,7 +33,7 @@ import android.graphics.Bitmap;
* up to {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} * up to {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/ */
@Deprecated @Deprecated
public class WebIconDatabase { public abstract class WebIconDatabase {
/** /**
* Interface for receiving icons from the database. * Interface for receiving icons from the database.
* @deprecated This interface is obsolete. * @deprecated This interface is obsolete.
@@ -52,23 +53,17 @@ public class WebIconDatabase {
* Open a the icon database and store the icons in the given path. * Open a the icon database and store the icons in the given path.
* @param path The directory path where the icon database will be stored. * @param path The directory path where the icon database will be stored.
*/ */
public void open(String path) { public abstract void open(String path);
throw new MustOverrideException();
}
/** /**
* Close the shared instance of the icon database. * Close the shared instance of the icon database.
*/ */
public void close() { public abstract void close();
throw new MustOverrideException();
}
/** /**
* Removes all the icons in the database. * Removes all the icons in the database.
*/ */
public void removeAllIcons() { public abstract void removeAllIcons();
throw new MustOverrideException();
}
/** /**
* Request the Bitmap representing the icon for the given page * Request the Bitmap representing the icon for the given page
@@ -76,32 +71,25 @@ public class WebIconDatabase {
* @param url The page's url. * @param url The page's url.
* @param listener An implementation on IconListener to receive the result. * @param listener An implementation on IconListener to receive the result.
*/ */
public void requestIconForPageUrl(String url, IconListener listener) { public abstract void requestIconForPageUrl(String url, IconListener listener);
throw new MustOverrideException();
}
/** {@hide} /** {@hide}
*/ */
public void bulkRequestIconForPageUrl(ContentResolver cr, String where, @SystemApi
IconListener listener) { public abstract void bulkRequestIconForPageUrl(ContentResolver cr, String where,
throw new MustOverrideException(); IconListener listener);
}
/** /**
* Retain the icon for the given page url. * Retain the icon for the given page url.
* @param url The page's url. * @param url The page's url.
*/ */
public void retainIconForPageUrl(String url) { public abstract void retainIconForPageUrl(String url);
throw new MustOverrideException();
}
/** /**
* Release the icon for the given page url. * Release the icon for the given page url.
* @param url The page's url. * @param url The page's url.
*/ */
public void releaseIconForPageUrl(String url) { public abstract void releaseIconForPageUrl(String url);
throw new MustOverrideException();
}
/** /**
* Get the global instance of WebIconDatabase. * Get the global instance of WebIconDatabase.
@@ -113,9 +101,4 @@ public class WebIconDatabase {
// XXX: Must be created in the UI thread. // XXX: Must be created in the UI thread.
return WebViewFactory.getProvider().getWebIconDatabase(); return WebViewFactory.getProvider().getWebIconDatabase();
} }
/**
* @hide Only for use by WebViewProvider implementations
*/
protected WebIconDatabase() {}
} }

View File

@@ -203,15 +203,6 @@ public abstract class WebSettings {
*/ */
public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2; public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2;
/**
* Hidden constructor to prevent clients from creating a new settings
* instance or deriving the class.
*
* @hide
*/
protected WebSettings() {
}
/** /**
* Enables dumping the pages navigation cache to a text file. The default * Enables dumping the pages navigation cache to a text file. The default
* is false. * is false.
@@ -219,10 +210,9 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete. * @deprecated This method is now obsolete.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public void setNavDump(boolean enabled) { public abstract void setNavDump(boolean enabled);
throw new MustOverrideException();
}
/** /**
* Gets whether dumping the navigation cache is enabled. * Gets whether dumping the navigation cache is enabled.
@@ -232,10 +222,9 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete. * @deprecated This method is now obsolete.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public boolean getNavDump() { public abstract boolean getNavDump();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should support zooming using its on-screen zoom * Sets whether the WebView should support zooming using its on-screen zoom
@@ -246,9 +235,7 @@ public abstract class WebSettings {
* *
* @param support whether the WebView should support zoom * @param support whether the WebView should support zoom
*/ */
public void setSupportZoom(boolean support) { public abstract void setSupportZoom(boolean support);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView supports zoom. * Gets whether the WebView supports zoom.
@@ -256,9 +243,7 @@ public abstract class WebSettings {
* @return true if the WebView supports zoom * @return true if the WebView supports zoom
* @see #setSupportZoom * @see #setSupportZoom
*/ */
public boolean supportZoom() { public abstract boolean supportZoom();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView requires a user gesture to play media. * Sets whether the WebView requires a user gesture to play media.
@@ -266,9 +251,7 @@ public abstract class WebSettings {
* *
* @param require whether the WebView requires a user gesture to play media * @param require whether the WebView requires a user gesture to play media
*/ */
public void setMediaPlaybackRequiresUserGesture(boolean require) { public abstract void setMediaPlaybackRequiresUserGesture(boolean require);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView requires a user gesture to play media. * Gets whether the WebView requires a user gesture to play media.
@@ -276,9 +259,7 @@ public abstract class WebSettings {
* @return true if the WebView requires a user gesture to play media * @return true if the WebView requires a user gesture to play media
* @see #setMediaPlaybackRequiresUserGesture * @see #setMediaPlaybackRequiresUserGesture
*/ */
public boolean getMediaPlaybackRequiresUserGesture() { public abstract boolean getMediaPlaybackRequiresUserGesture();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should use its built-in zoom mechanisms. The * Sets whether the WebView should use its built-in zoom mechanisms. The
@@ -295,9 +276,7 @@ public abstract class WebSettings {
// This method was intended to select between the built-in zoom mechanisms // This method was intended to select between the built-in zoom mechanisms
// and the separate zoom controls. The latter were obtained using // and the separate zoom controls. The latter were obtained using
// {@link WebView#getZoomControls}, which is now hidden. // {@link WebView#getZoomControls}, which is now hidden.
public void setBuiltInZoomControls(boolean enabled) { public abstract void setBuiltInZoomControls(boolean enabled);
throw new MustOverrideException();
}
/** /**
* Gets whether the zoom mechanisms built into WebView are being used. * Gets whether the zoom mechanisms built into WebView are being used.
@@ -305,9 +284,7 @@ public abstract class WebSettings {
* @return true if the zoom mechanisms built into WebView are being used * @return true if the zoom mechanisms built into WebView are being used
* @see #setBuiltInZoomControls * @see #setBuiltInZoomControls
*/ */
public boolean getBuiltInZoomControls() { public abstract boolean getBuiltInZoomControls();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should display on-screen zoom controls when * Sets whether the WebView should display on-screen zoom controls when
@@ -316,9 +293,7 @@ public abstract class WebSettings {
* *
* @param enabled whether the WebView should display on-screen zoom controls * @param enabled whether the WebView should display on-screen zoom controls
*/ */
public void setDisplayZoomControls(boolean enabled) { public abstract void setDisplayZoomControls(boolean enabled);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView displays on-screen zoom controls when using * Gets whether the WebView displays on-screen zoom controls when using
@@ -328,9 +303,7 @@ public abstract class WebSettings {
* the built-in zoom mechanisms * the built-in zoom mechanisms
* @see #setDisplayZoomControls * @see #setDisplayZoomControls
*/ */
public boolean getDisplayZoomControls() { public abstract boolean getDisplayZoomControls();
throw new MustOverrideException();
}
/** /**
* Enables or disables file access within WebView. File access is enabled by * Enables or disables file access within WebView. File access is enabled by
@@ -338,36 +311,28 @@ public abstract class WebSettings {
* Assets and resources are still accessible using file:///android_asset and * Assets and resources are still accessible using file:///android_asset and
* file:///android_res. * file:///android_res.
*/ */
public void setAllowFileAccess(boolean allow) { public abstract void setAllowFileAccess(boolean allow);
throw new MustOverrideException();
}
/** /**
* Gets whether this WebView supports file access. * Gets whether this WebView supports file access.
* *
* @see #setAllowFileAccess * @see #setAllowFileAccess
*/ */
public boolean getAllowFileAccess() { public abstract boolean getAllowFileAccess();
throw new MustOverrideException();
}
/** /**
* Enables or disables content URL access within WebView. Content URL * Enables or disables content URL access within WebView. Content URL
* access allows WebView to load content from a content provider installed * access allows WebView to load content from a content provider installed
* in the system. The default is enabled. * in the system. The default is enabled.
*/ */
public void setAllowContentAccess(boolean allow) { public abstract void setAllowContentAccess(boolean allow);
throw new MustOverrideException();
}
/** /**
* Gets whether this WebView supports content URL access. * Gets whether this WebView supports content URL access.
* *
* @see #setAllowContentAccess * @see #setAllowContentAccess
*/ */
public boolean getAllowContentAccess() { public abstract boolean getAllowContentAccess();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView loads pages in overview mode, that is, * Sets whether the WebView loads pages in overview mode, that is,
@@ -376,9 +341,7 @@ public abstract class WebSettings {
* of the WebView control, for example, when {@link #getUseWideViewPort} * of the WebView control, for example, when {@link #getUseWideViewPort}
* is enabled. The default is false. * is enabled. The default is false.
*/ */
public void setLoadWithOverviewMode(boolean overview) { public abstract void setLoadWithOverviewMode(boolean overview);
throw new MustOverrideException();
}
/** /**
* Gets whether this WebView loads pages in overview mode. * Gets whether this WebView loads pages in overview mode.
@@ -386,9 +349,7 @@ public abstract class WebSettings {
* @return whether this WebView loads pages in overview mode * @return whether this WebView loads pages in overview mode
* @see #setLoadWithOverviewMode * @see #setLoadWithOverviewMode
*/ */
public boolean getLoadWithOverviewMode() { public abstract boolean getLoadWithOverviewMode();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView will enable smooth transition while panning or * Sets whether the WebView will enable smooth transition while panning or
@@ -400,9 +361,7 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete, and will become a no-op in future. * @deprecated This method is now obsolete, and will become a no-op in future.
*/ */
@Deprecated @Deprecated
public void setEnableSmoothTransition(boolean enable) { public abstract void setEnableSmoothTransition(boolean enable);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView enables smooth transition while panning or * Gets whether the WebView enables smooth transition while panning or
@@ -413,9 +372,7 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete, and will become a no-op in future. * @deprecated This method is now obsolete, and will become a no-op in future.
*/ */
@Deprecated @Deprecated
public boolean enableSmoothTransition() { public abstract boolean enableSmoothTransition();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView uses its background for over scroll background. * Sets whether the WebView uses its background for over scroll background.
@@ -425,10 +382,9 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete. * @deprecated This method is now obsolete.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public void setUseWebViewBackgroundForOverscrollBackground(boolean view) { public abstract void setUseWebViewBackgroundForOverscrollBackground(boolean view);
throw new MustOverrideException();
}
/** /**
* Gets whether this WebView uses WebView's background instead of * Gets whether this WebView uses WebView's background instead of
@@ -438,17 +394,14 @@ public abstract class WebSettings {
* @deprecated This method is now obsolete. * @deprecated This method is now obsolete.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public boolean getUseWebViewBackgroundForOverscrollBackground() { public abstract boolean getUseWebViewBackgroundForOverscrollBackground();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should save form data. The default is true. * Sets whether the WebView should save form data. The default is true.
*/ */
public void setSaveFormData(boolean save) { public abstract void setSaveFormData(boolean save);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView saves form data. * Gets whether the WebView saves form data.
@@ -456,18 +409,14 @@ public abstract class WebSettings {
* @return whether the WebView saves form data * @return whether the WebView saves form data
* @see #setSaveFormData * @see #setSaveFormData
*/ */
public boolean getSaveFormData() { public abstract boolean getSaveFormData();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should save passwords. The default is true. * Sets whether the WebView should save passwords. The default is true.
* @deprecated Saving passwords in WebView will not be supported in future versions. * @deprecated Saving passwords in WebView will not be supported in future versions.
*/ */
@Deprecated @Deprecated
public void setSavePassword(boolean save) { public abstract void setSavePassword(boolean save);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView saves passwords. * Gets whether the WebView saves passwords.
@@ -477,18 +426,14 @@ public abstract class WebSettings {
* @deprecated Saving passwords in WebView will not be supported in future versions. * @deprecated Saving passwords in WebView will not be supported in future versions.
*/ */
@Deprecated @Deprecated
public boolean getSavePassword() { public abstract boolean getSavePassword();
throw new MustOverrideException();
}
/** /**
* Sets the text zoom of the page in percent. The default is 100. * Sets the text zoom of the page in percent. The default is 100.
* *
* @param textZoom the text zoom in percent * @param textZoom the text zoom in percent
*/ */
public synchronized void setTextZoom(int textZoom) { public abstract void setTextZoom(int textZoom);
throw new MustOverrideException();
}
/** /**
* Gets the text zoom of the page in percent. * Gets the text zoom of the page in percent.
@@ -496,27 +441,23 @@ public abstract class WebSettings {
* @return the text zoom of the page in percent * @return the text zoom of the page in percent
* @see #setTextZoom * @see #setTextZoom
*/ */
public synchronized int getTextZoom() { public abstract int getTextZoom();
throw new MustOverrideException();
}
/** /**
* Sets policy for third party cookies. * Sets policy for third party cookies.
* Developers should access this via {@link CookieManager#setShouldAcceptThirdPartyCookies}. * Developers should access this via {@link CookieManager#setShouldAcceptThirdPartyCookies}.
* @hide Internal API. * @hide Internal API.
*/ */
public void setAcceptThirdPartyCookies(boolean accept) { @SystemApi
throw new MustOverrideException(); public abstract void setAcceptThirdPartyCookies(boolean accept);
}
/** /**
* Gets policy for third party cookies. * Gets policy for third party cookies.
* Developers should access this via {@link CookieManager#getShouldAcceptThirdPartyCookies}. * Developers should access this via {@link CookieManager#getShouldAcceptThirdPartyCookies}.
* @hide Internal API * @hide Internal API
*/ */
public boolean getAcceptThirdPartyCookies() { @SystemApi
throw new MustOverrideException(); public abstract boolean getAcceptThirdPartyCookies();
}
/** /**
* Sets the text size of the page. The default is {@link TextSize#NORMAL}. * Sets the text size of the page. The default is {@link TextSize#NORMAL}.
@@ -569,9 +510,7 @@ public abstract class WebSettings {
* recommended alternatives. * recommended alternatives.
*/ */
@Deprecated @Deprecated
public void setDefaultZoom(ZoomDensity zoom) { public abstract void setDefaultZoom(ZoomDensity zoom);
throw new MustOverrideException();
}
/** /**
* Gets the default zoom density of the page. This should be called from * Gets the default zoom density of the page. This should be called from
@@ -583,9 +522,7 @@ public abstract class WebSettings {
* @see #setDefaultZoom * @see #setDefaultZoom
* @deprecated Will only return the default value. * @deprecated Will only return the default value.
*/ */
public ZoomDensity getDefaultZoom() { public abstract ZoomDensity getDefaultZoom();
throw new MustOverrideException();
}
/** /**
* Enables using light touches to make a selection and activate mouseovers. * Enables using light touches to make a selection and activate mouseovers.
@@ -593,9 +530,7 @@ public abstract class WebSettings {
* setting is obsolete and has no effect. * setting is obsolete and has no effect.
*/ */
@Deprecated @Deprecated
public void setLightTouchEnabled(boolean enabled) { public abstract void setLightTouchEnabled(boolean enabled);
throw new MustOverrideException();
}
/** /**
* Gets whether light touches are enabled. * Gets whether light touches are enabled.
@@ -603,9 +538,7 @@ public abstract class WebSettings {
* @deprecated This setting is obsolete. * @deprecated This setting is obsolete.
*/ */
@Deprecated @Deprecated
public boolean getLightTouchEnabled() { public abstract boolean getLightTouchEnabled();
throw new MustOverrideException();
}
/** /**
* Controlled a rendering optimization that is no longer present. Setting * Controlled a rendering optimization that is no longer present. Setting
@@ -615,7 +548,7 @@ public abstract class WebSettings {
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@Deprecated @Deprecated
public synchronized void setUseDoubleTree(boolean use) { public void setUseDoubleTree(boolean use) {
// Specified to do nothing, so no need for derived classes to override. // Specified to do nothing, so no need for derived classes to override.
} }
@@ -627,7 +560,7 @@ public abstract class WebSettings {
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@Deprecated @Deprecated
public synchronized boolean getUseDoubleTree() { public boolean getUseDoubleTree() {
// Returns false unconditionally, so no need for derived classes to override. // Returns false unconditionally, so no need for derived classes to override.
return false; return false;
} }
@@ -645,10 +578,9 @@ public abstract class WebSettings {
* @deprecated Please use {@link #setUserAgentString} instead. * @deprecated Please use {@link #setUserAgentString} instead.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public synchronized void setUserAgent(int ua) { public abstract void setUserAgent(int ua);
throw new MustOverrideException();
}
/** /**
* Gets the user-agent as an integer code. * Gets the user-agent as an integer code.
@@ -664,10 +596,9 @@ public abstract class WebSettings {
* @deprecated Please use {@link #getUserAgentString} instead. * @deprecated Please use {@link #getUserAgentString} instead.
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
@SystemApi
@Deprecated @Deprecated
public synchronized int getUserAgent() { public abstract int getUserAgent();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should enable support for the &quot;viewport&quot; * Sets whether the WebView should enable support for the &quot;viewport&quot;
@@ -680,9 +611,7 @@ public abstract class WebSettings {
* *
* @param use whether to enable support for the viewport meta tag * @param use whether to enable support for the viewport meta tag
*/ */
public synchronized void setUseWideViewPort(boolean use) { public abstract void setUseWideViewPort(boolean use);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView supports the &quot;viewport&quot; * Gets whether the WebView supports the &quot;viewport&quot;
@@ -691,9 +620,7 @@ public abstract class WebSettings {
* @return true if the WebView supports the viewport meta tag * @return true if the WebView supports the viewport meta tag
* @see #setUseWideViewPort * @see #setUseWideViewPort
*/ */
public synchronized boolean getUseWideViewPort() { public abstract boolean getUseWideViewPort();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView whether supports multiple windows. If set to * Sets whether the WebView whether supports multiple windows. If set to
@@ -702,9 +629,7 @@ public abstract class WebSettings {
* *
* @param support whether to suport multiple windows * @param support whether to suport multiple windows
*/ */
public synchronized void setSupportMultipleWindows(boolean support) { public abstract void setSupportMultipleWindows(boolean support);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView supports multiple windows. * Gets whether the WebView supports multiple windows.
@@ -712,9 +637,7 @@ public abstract class WebSettings {
* @return true if the WebView supports multiple windows * @return true if the WebView supports multiple windows
* @see #setSupportMultipleWindows * @see #setSupportMultipleWindows
*/ */
public synchronized boolean supportMultipleWindows() { public abstract boolean supportMultipleWindows();
throw new MustOverrideException();
}
/** /**
* Sets the underlying layout algorithm. This will cause a relayout of the * Sets the underlying layout algorithm. This will cause a relayout of the
@@ -722,9 +645,7 @@ public abstract class WebSettings {
* *
* @param l the layout algorithm to use, as a {@link LayoutAlgorithm} value * @param l the layout algorithm to use, as a {@link LayoutAlgorithm} value
*/ */
public synchronized void setLayoutAlgorithm(LayoutAlgorithm l) { public abstract void setLayoutAlgorithm(LayoutAlgorithm l);
throw new MustOverrideException();
}
/** /**
* Gets the current layout algorithm. * Gets the current layout algorithm.
@@ -732,18 +653,14 @@ public abstract class WebSettings {
* @return the layout algorithm in use, as a {@link LayoutAlgorithm} value * @return the layout algorithm in use, as a {@link LayoutAlgorithm} value
* @see #setLayoutAlgorithm * @see #setLayoutAlgorithm
*/ */
public synchronized LayoutAlgorithm getLayoutAlgorithm() { public abstract LayoutAlgorithm getLayoutAlgorithm();
throw new MustOverrideException();
}
/** /**
* Sets the standard font family name. The default is "sans-serif". * Sets the standard font family name. The default is "sans-serif".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setStandardFontFamily(String font) { public abstract void setStandardFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the standard font family name. * Gets the standard font family name.
@@ -751,18 +668,14 @@ public abstract class WebSettings {
* @return the standard font family name as a string * @return the standard font family name as a string
* @see #setStandardFontFamily * @see #setStandardFontFamily
*/ */
public synchronized String getStandardFontFamily() { public abstract String getStandardFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the fixed font family name. The default is "monospace". * Sets the fixed font family name. The default is "monospace".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setFixedFontFamily(String font) { public abstract void setFixedFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the fixed font family name. * Gets the fixed font family name.
@@ -770,18 +683,14 @@ public abstract class WebSettings {
* @return the fixed font family name as a string * @return the fixed font family name as a string
* @see #setFixedFontFamily * @see #setFixedFontFamily
*/ */
public synchronized String getFixedFontFamily() { public abstract String getFixedFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the sans-serif font family name. The default is "sans-serif". * Sets the sans-serif font family name. The default is "sans-serif".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setSansSerifFontFamily(String font) { public abstract void setSansSerifFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the sans-serif font family name. * Gets the sans-serif font family name.
@@ -789,18 +698,14 @@ public abstract class WebSettings {
* @return the sans-serif font family name as a string * @return the sans-serif font family name as a string
* @see #setSansSerifFontFamily * @see #setSansSerifFontFamily
*/ */
public synchronized String getSansSerifFontFamily() { public abstract String getSansSerifFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the serif font family name. The default is "sans-serif". * Sets the serif font family name. The default is "sans-serif".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setSerifFontFamily(String font) { public abstract void setSerifFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the serif font family name. The default is "serif". * Gets the serif font family name. The default is "serif".
@@ -808,18 +713,14 @@ public abstract class WebSettings {
* @return the serif font family name as a string * @return the serif font family name as a string
* @see #setSerifFontFamily * @see #setSerifFontFamily
*/ */
public synchronized String getSerifFontFamily() { public abstract String getSerifFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the cursive font family name. The default is "cursive". * Sets the cursive font family name. The default is "cursive".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setCursiveFontFamily(String font) { public abstract void setCursiveFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the cursive font family name. * Gets the cursive font family name.
@@ -827,18 +728,14 @@ public abstract class WebSettings {
* @return the cursive font family name as a string * @return the cursive font family name as a string
* @see #setCursiveFontFamily * @see #setCursiveFontFamily
*/ */
public synchronized String getCursiveFontFamily() { public abstract String getCursiveFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the fantasy font family name. The default is "fantasy". * Sets the fantasy font family name. The default is "fantasy".
* *
* @param font a font family name * @param font a font family name
*/ */
public synchronized void setFantasyFontFamily(String font) { public abstract void setFantasyFontFamily(String font);
throw new MustOverrideException();
}
/** /**
* Gets the fantasy font family name. * Gets the fantasy font family name.
@@ -846,9 +743,7 @@ public abstract class WebSettings {
* @return the fantasy font family name as a string * @return the fantasy font family name as a string
* @see #setFantasyFontFamily * @see #setFantasyFontFamily
*/ */
public synchronized String getFantasyFontFamily() { public abstract String getFantasyFontFamily();
throw new MustOverrideException();
}
/** /**
* Sets the minimum font size. The default is 8. * Sets the minimum font size. The default is 8.
@@ -856,9 +751,7 @@ public abstract class WebSettings {
* @param size a non-negative integer between 1 and 72. Any number outside * @param size a non-negative integer between 1 and 72. Any number outside
* the specified range will be pinned. * the specified range will be pinned.
*/ */
public synchronized void setMinimumFontSize(int size) { public abstract void setMinimumFontSize(int size);
throw new MustOverrideException();
}
/** /**
* Gets the minimum font size. * Gets the minimum font size.
@@ -866,9 +759,7 @@ public abstract class WebSettings {
* @return a non-negative integer between 1 and 72 * @return a non-negative integer between 1 and 72
* @see #setMinimumFontSize * @see #setMinimumFontSize
*/ */
public synchronized int getMinimumFontSize() { public abstract int getMinimumFontSize();
throw new MustOverrideException();
}
/** /**
* Sets the minimum logical font size. The default is 8. * Sets the minimum logical font size. The default is 8.
@@ -876,9 +767,7 @@ public abstract class WebSettings {
* @param size a non-negative integer between 1 and 72. Any number outside * @param size a non-negative integer between 1 and 72. Any number outside
* the specified range will be pinned. * the specified range will be pinned.
*/ */
public synchronized void setMinimumLogicalFontSize(int size) { public abstract void setMinimumLogicalFontSize(int size);
throw new MustOverrideException();
}
/** /**
* Gets the minimum logical font size. * Gets the minimum logical font size.
@@ -886,9 +775,7 @@ public abstract class WebSettings {
* @return a non-negative integer between 1 and 72 * @return a non-negative integer between 1 and 72
* @see #setMinimumLogicalFontSize * @see #setMinimumLogicalFontSize
*/ */
public synchronized int getMinimumLogicalFontSize() { public abstract int getMinimumLogicalFontSize();
throw new MustOverrideException();
}
/** /**
* Sets the default font size. The default is 16. * Sets the default font size. The default is 16.
@@ -896,9 +783,7 @@ public abstract class WebSettings {
* @param size a non-negative integer between 1 and 72. Any number outside * @param size a non-negative integer between 1 and 72. Any number outside
* the specified range will be pinned. * the specified range will be pinned.
*/ */
public synchronized void setDefaultFontSize(int size) { public abstract void setDefaultFontSize(int size);
throw new MustOverrideException();
}
/** /**
* Gets the default font size. * Gets the default font size.
@@ -906,9 +791,7 @@ public abstract class WebSettings {
* @return a non-negative integer between 1 and 72 * @return a non-negative integer between 1 and 72
* @see #setDefaultFontSize * @see #setDefaultFontSize
*/ */
public synchronized int getDefaultFontSize() { public abstract int getDefaultFontSize();
throw new MustOverrideException();
}
/** /**
* Sets the default fixed font size. The default is 16. * Sets the default fixed font size. The default is 16.
@@ -916,9 +799,7 @@ public abstract class WebSettings {
* @param size a non-negative integer between 1 and 72. Any number outside * @param size a non-negative integer between 1 and 72. Any number outside
* the specified range will be pinned. * the specified range will be pinned.
*/ */
public synchronized void setDefaultFixedFontSize(int size) { public abstract void setDefaultFixedFontSize(int size);
throw new MustOverrideException();
}
/** /**
* Gets the default fixed font size. * Gets the default fixed font size.
@@ -926,9 +807,7 @@ public abstract class WebSettings {
* @return a non-negative integer between 1 and 72 * @return a non-negative integer between 1 and 72
* @see #setDefaultFixedFontSize * @see #setDefaultFixedFontSize
*/ */
public synchronized int getDefaultFixedFontSize() { public abstract int getDefaultFixedFontSize();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should load image resources. Note that this method * Sets whether the WebView should load image resources. Note that this method
@@ -941,9 +820,7 @@ public abstract class WebSettings {
* *
* @param flag whether the WebView should load image resources * @param flag whether the WebView should load image resources
*/ */
public synchronized void setLoadsImagesAutomatically(boolean flag) { public abstract void setLoadsImagesAutomatically(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView loads image resources. This includes * Gets whether the WebView loads image resources. This includes
@@ -952,9 +829,7 @@ public abstract class WebSettings {
* @return true if the WebView loads image resources * @return true if the WebView loads image resources
* @see #setLoadsImagesAutomatically * @see #setLoadsImagesAutomatically
*/ */
public synchronized boolean getLoadsImagesAutomatically() { public abstract boolean getLoadsImagesAutomatically();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should not load image resources from the * Sets whether the WebView should not load image resources from the
@@ -971,9 +846,7 @@ public abstract class WebSettings {
* network * network
* @see #setBlockNetworkLoads * @see #setBlockNetworkLoads
*/ */
public synchronized void setBlockNetworkImage(boolean flag) { public abstract void setBlockNetworkImage(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView does not load image resources from the network. * Gets whether the WebView does not load image resources from the network.
@@ -981,9 +854,7 @@ public abstract class WebSettings {
* @return true if the WebView does not load image resources from the network * @return true if the WebView does not load image resources from the network
* @see #setBlockNetworkImage * @see #setBlockNetworkImage
*/ */
public synchronized boolean getBlockNetworkImage() { public abstract boolean getBlockNetworkImage();
throw new MustOverrideException();
}
/** /**
* Sets whether the WebView should not load resources from the network. * Sets whether the WebView should not load resources from the network.
@@ -1003,9 +874,7 @@ public abstract class WebSettings {
* network * network
* @see android.webkit.WebView#reload * @see android.webkit.WebView#reload
*/ */
public synchronized void setBlockNetworkLoads(boolean flag) { public abstract void setBlockNetworkLoads(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether the WebView does not load any resources from the network. * Gets whether the WebView does not load any resources from the network.
@@ -1013,9 +882,7 @@ public abstract class WebSettings {
* @return true if the WebView does not load any resources from the network * @return true if the WebView does not load any resources from the network
* @see #setBlockNetworkLoads * @see #setBlockNetworkLoads
*/ */
public synchronized boolean getBlockNetworkLoads() { public abstract boolean getBlockNetworkLoads();
throw new MustOverrideException();
}
/** /**
* Tells the WebView to enable JavaScript execution. * Tells the WebView to enable JavaScript execution.
@@ -1023,9 +890,7 @@ public abstract class WebSettings {
* *
* @param flag true if the WebView should execute JavaScript * @param flag true if the WebView should execute JavaScript
*/ */
public synchronized void setJavaScriptEnabled(boolean flag) { public abstract void setJavaScriptEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Sets whether JavaScript running in the context of a file scheme URL * Sets whether JavaScript running in the context of a file scheme URL
@@ -1076,10 +941,9 @@ public abstract class WebSettings {
* {@link #setPluginState} * {@link #setPluginState}
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/ */
@SystemApi
@Deprecated @Deprecated
public synchronized void setPluginsEnabled(boolean flag) { public abstract void setPluginsEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Tells the WebView to enable, disable, or have plugins on demand. On * Tells the WebView to enable, disable, or have plugins on demand. On
@@ -1092,9 +956,7 @@ public abstract class WebSettings {
* @deprecated Plugins will not be supported in future, and should not be used. * @deprecated Plugins will not be supported in future, and should not be used.
*/ */
@Deprecated @Deprecated
public synchronized void setPluginState(PluginState state) { public abstract void setPluginState(PluginState state);
throw new MustOverrideException();
}
/** /**
* Sets a custom path to plugins used by the WebView. This method is * Sets a custom path to plugins used by the WebView. This method is
@@ -1106,7 +968,7 @@ public abstract class WebSettings {
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/ */
@Deprecated @Deprecated
public synchronized void setPluginsPath(String pluginsPath) { public void setPluginsPath(String pluginsPath) {
// Specified to do nothing, so no need for derived classes to override. // Specified to do nothing, so no need for derived classes to override.
} }
@@ -1125,9 +987,7 @@ public abstract class WebSettings {
// Note that the WebCore Database Tracker only allows the path to be set // Note that the WebCore Database Tracker only allows the path to be set
// once. // once.
@Deprecated @Deprecated
public synchronized void setDatabasePath(String databasePath) { public abstract void setDatabasePath(String databasePath);
throw new MustOverrideException();
}
/** /**
* Sets the path where the Geolocation databases should be saved. In order * Sets the path where the Geolocation databases should be saved. In order
@@ -1138,9 +998,7 @@ public abstract class WebSettings {
* saved. * saved.
*/ */
// This will update WebCore when the Sync runs in the C++ side. // This will update WebCore when the Sync runs in the C++ side.
public synchronized void setGeolocationDatabasePath(String databasePath) { public abstract void setGeolocationDatabasePath(String databasePath);
throw new MustOverrideException();
}
/** /**
* Sets whether the Application Caches API should be enabled. The default * Sets whether the Application Caches API should be enabled. The default
@@ -1150,9 +1008,7 @@ public abstract class WebSettings {
* *
* @param flag true if the WebView should enable Application Caches * @param flag true if the WebView should enable Application Caches
*/ */
public synchronized void setAppCacheEnabled(boolean flag) { public abstract void setAppCacheEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Sets the path to the Application Caches files. In order for the * Sets the path to the Application Caches files. In order for the
@@ -1164,9 +1020,7 @@ public abstract class WebSettings {
* Application Caches files. * Application Caches files.
* @see #setAppCacheEnabled * @see #setAppCacheEnabled
*/ */
public synchronized void setAppCachePath(String appCachePath) { public abstract void setAppCachePath(String appCachePath);
throw new MustOverrideException();
}
/** /**
* Sets the maximum size for the Application Cache content. The passed size * Sets the maximum size for the Application Cache content. The passed size
@@ -1180,9 +1034,7 @@ public abstract class WebSettings {
* @deprecated In future quota will be managed automatically. * @deprecated In future quota will be managed automatically.
*/ */
@Deprecated @Deprecated
public synchronized void setAppCacheMaxSize(long appCacheMaxSize) { public abstract void setAppCacheMaxSize(long appCacheMaxSize);
throw new MustOverrideException();
}
/** /**
* Sets whether the database storage API is enabled. The default value is * Sets whether the database storage API is enabled. The default value is
@@ -1196,18 +1048,14 @@ public abstract class WebSettings {
* *
* @param flag true if the WebView should use the database storage API * @param flag true if the WebView should use the database storage API
*/ */
public synchronized void setDatabaseEnabled(boolean flag) { public abstract void setDatabaseEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Sets whether the DOM storage API is enabled. The default value is false. * Sets whether the DOM storage API is enabled. The default value is false.
* *
* @param flag true if the WebView should use the DOM storage API * @param flag true if the WebView should use the DOM storage API
*/ */
public synchronized void setDomStorageEnabled(boolean flag) { public abstract void setDomStorageEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether the DOM Storage APIs are enabled. * Gets whether the DOM Storage APIs are enabled.
@@ -1215,9 +1063,8 @@ public abstract class WebSettings {
* @return true if the DOM Storage APIs are enabled * @return true if the DOM Storage APIs are enabled
* @see #setDomStorageEnabled * @see #setDomStorageEnabled
*/ */
public synchronized boolean getDomStorageEnabled() { public abstract boolean getDomStorageEnabled();
throw new MustOverrideException();
}
/** /**
* Gets the path to where database storage API databases are saved. * Gets the path to where database storage API databases are saved.
* *
@@ -1226,9 +1073,7 @@ public abstract class WebSettings {
* @deprecated Database paths are managed by the implementation this method is obsolete. * @deprecated Database paths are managed by the implementation this method is obsolete.
*/ */
@Deprecated @Deprecated
public synchronized String getDatabasePath() { public abstract String getDatabasePath();
throw new MustOverrideException();
}
/** /**
* Gets whether the database storage API is enabled. * Gets whether the database storage API is enabled.
@@ -1236,9 +1081,7 @@ public abstract class WebSettings {
* @return true if the database storage API is enabled * @return true if the database storage API is enabled
* @see #setDatabaseEnabled * @see #setDatabaseEnabled
*/ */
public synchronized boolean getDatabaseEnabled() { public abstract boolean getDatabaseEnabled();
throw new MustOverrideException();
}
/** /**
* Sets whether Geolocation is enabled. The default is true. * Sets whether Geolocation is enabled. The default is true.
@@ -1260,9 +1103,7 @@ public abstract class WebSettings {
* *
* @param flag whether Geolocation should be enabled * @param flag whether Geolocation should be enabled
*/ */
public synchronized void setGeolocationEnabled(boolean flag) { public abstract void setGeolocationEnabled(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether JavaScript is enabled. * Gets whether JavaScript is enabled.
@@ -1270,9 +1111,7 @@ public abstract class WebSettings {
* @return true if JavaScript is enabled * @return true if JavaScript is enabled
* @see #setJavaScriptEnabled * @see #setJavaScriptEnabled
*/ */
public synchronized boolean getJavaScriptEnabled() { public abstract boolean getJavaScriptEnabled();
throw new MustOverrideException();
}
/** /**
* Gets whether JavaScript running in the context of a file scheme URL can * Gets whether JavaScript running in the context of a file scheme URL can
@@ -1303,10 +1142,9 @@ public abstract class WebSettings {
* @deprecated This method has been replaced by {@link #getPluginState} * @deprecated This method has been replaced by {@link #getPluginState}
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/ */
@SystemApi
@Deprecated @Deprecated
public synchronized boolean getPluginsEnabled() { public abstract boolean getPluginsEnabled();
throw new MustOverrideException();
}
/** /**
* Gets the current state regarding whether plugins are enabled. * Gets the current state regarding whether plugins are enabled.
@@ -1316,9 +1154,7 @@ public abstract class WebSettings {
* @deprecated Plugins will not be supported in future, and should not be used. * @deprecated Plugins will not be supported in future, and should not be used.
*/ */
@Deprecated @Deprecated
public synchronized PluginState getPluginState() { public abstract PluginState getPluginState();
throw new MustOverrideException();
}
/** /**
* Gets the directory that contains the plugin libraries. This method is * Gets the directory that contains the plugin libraries. This method is
@@ -1330,7 +1166,7 @@ public abstract class WebSettings {
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}
*/ */
@Deprecated @Deprecated
public synchronized String getPluginsPath() { public String getPluginsPath() {
// Unconditionally returns empty string, so no need for derived classes to override. // Unconditionally returns empty string, so no need for derived classes to override.
return ""; return "";
} }
@@ -1341,9 +1177,7 @@ public abstract class WebSettings {
* *
* @param flag true if JavaScript can open windows automatically * @param flag true if JavaScript can open windows automatically
*/ */
public synchronized void setJavaScriptCanOpenWindowsAutomatically(boolean flag) { public abstract void setJavaScriptCanOpenWindowsAutomatically(boolean flag);
throw new MustOverrideException();
}
/** /**
* Gets whether JavaScript can open windows automatically. * Gets whether JavaScript can open windows automatically.
@@ -1352,9 +1186,7 @@ public abstract class WebSettings {
* window.open() * window.open()
* @see #setJavaScriptCanOpenWindowsAutomatically * @see #setJavaScriptCanOpenWindowsAutomatically
*/ */
public synchronized boolean getJavaScriptCanOpenWindowsAutomatically() { public abstract boolean getJavaScriptCanOpenWindowsAutomatically();
throw new MustOverrideException();
}
/** /**
* Sets the default text encoding name to use when decoding html pages. * Sets the default text encoding name to use when decoding html pages.
@@ -1362,9 +1194,7 @@ public abstract class WebSettings {
* *
* @param encoding the text encoding name * @param encoding the text encoding name
*/ */
public synchronized void setDefaultTextEncodingName(String encoding) { public abstract void setDefaultTextEncodingName(String encoding);
throw new MustOverrideException();
}
/** /**
* Gets the default text encoding name. * Gets the default text encoding name.
@@ -1372,17 +1202,13 @@ public abstract class WebSettings {
* @return the default text encoding name as a string * @return the default text encoding name as a string
* @see #setDefaultTextEncodingName * @see #setDefaultTextEncodingName
*/ */
public synchronized String getDefaultTextEncodingName() { public abstract String getDefaultTextEncodingName();
throw new MustOverrideException();
}
/** /**
* Sets the WebView's user-agent string. If the string is null or empty, * Sets the WebView's user-agent string. If the string is null or empty,
* the system default value will be used. * the system default value will be used.
*/ */
public synchronized void setUserAgentString(String ua) { public abstract void setUserAgentString(String ua);
throw new MustOverrideException();
}
/** /**
* Gets the WebView's user-agent string. * Gets the WebView's user-agent string.
@@ -1390,9 +1216,7 @@ public abstract class WebSettings {
* @return the WebView's user-agent string * @return the WebView's user-agent string
* @see #setUserAgentString * @see #setUserAgentString
*/ */
public synchronized String getUserAgentString() { public abstract String getUserAgentString();
throw new MustOverrideException();
}
/** /**
* Returns the default User-Agent used by a WebView. * Returns the default User-Agent used by a WebView.
@@ -1412,9 +1236,7 @@ public abstract class WebSettings {
* *
* @param flag whether the WebView needs to set a node * @param flag whether the WebView needs to set a node
*/ */
public void setNeedInitialFocus(boolean flag) { public abstract void setNeedInitialFocus(boolean flag);
throw new MustOverrideException();
}
/** /**
* Sets the priority of the Render thread. Unlike the other settings, this * Sets the priority of the Render thread. Unlike the other settings, this
@@ -1426,9 +1248,7 @@ public abstract class WebSettings {
* not be supported in future versions. * not be supported in future versions.
*/ */
@Deprecated @Deprecated
public synchronized void setRenderPriority(RenderPriority priority) { public abstract void setRenderPriority(RenderPriority priority);
throw new MustOverrideException();
}
/** /**
* Overrides the way the cache is used. The way the cache is used is based * Overrides the way the cache is used. The way the cache is used is based
@@ -1442,9 +1262,7 @@ public abstract class WebSettings {
* *
* @param mode the mode to use * @param mode the mode to use
*/ */
public void setCacheMode(int mode) { public abstract void setCacheMode(int mode);
throw new MustOverrideException();
}
/** /**
* Gets the current setting for overriding the cache mode. * Gets the current setting for overriding the cache mode.
@@ -1452,9 +1270,7 @@ public abstract class WebSettings {
* @return the current setting for overriding the cache mode * @return the current setting for overriding the cache mode
* @see #setCacheMode * @see #setCacheMode
*/ */
public int getCacheMode() { public abstract int getCacheMode();
throw new MustOverrideException();
}
/** /**
* Configures the WebView's behavior when a secure origin attempts to load a resource from an * Configures the WebView's behavior when a secure origin attempts to load a resource from an

View File

@@ -16,6 +16,8 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import java.util.Map; import java.util.Map;
/** /**
@@ -65,23 +67,13 @@ public class WebStorage {
private long mUsage = 0; private long mUsage = 0;
/** @hide */ /** @hide */
@SystemApi
protected Origin(String origin, long quota, long usage) { protected Origin(String origin, long quota, long usage) {
mOrigin = origin; mOrigin = origin;
mQuota = quota; mQuota = quota;
mUsage = usage; mUsage = usage;
} }
/** @hide */
protected Origin(String origin, long quota) {
mOrigin = origin;
mQuota = quota;
}
/** @hide */
protected Origin(String origin) {
mOrigin = origin;
}
/** /**
* Gets the string representation of this origin. * Gets the string representation of this origin.
* *
@@ -210,5 +202,6 @@ public class WebStorage {
* way to call createHandler() and createUIHandler(), so it would not work). * way to call createHandler() and createUIHandler(), so it would not work).
* @hide * @hide
*/ */
@SystemApi
public WebStorage() {} public WebStorage() {}
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.annotation.Widget; import android.annotation.Widget;
import android.content.Context; import android.content.Context;
import android.content.res.Configuration; import android.content.res.Configuration;
@@ -256,10 +257,12 @@ public class WebView extends AbsoluteLayout
* always stay as a hidden API. * always stay as a hidden API.
* @hide * @hide
*/ */
@SystemApi
public static final String DATA_REDUCTION_PROXY_SETTING_CHANGED = public static final String DATA_REDUCTION_PROXY_SETTING_CHANGED =
"android.webkit.DATA_REDUCTION_PROXY_SETTING_CHANGED"; "android.webkit.DATA_REDUCTION_PROXY_SETTING_CHANGED";
private static final String LOGTAG = "WebView"; private static final String LOGTAG = "WebView";
private static final boolean TRACE = false;
// Throwing an exception for incorrect thread usage if the // Throwing an exception for incorrect thread usage if the
// build target is JB MR2 or newer. Defaults to false, and is // build target is JB MR2 or newer. Defaults to false, and is
@@ -394,6 +397,7 @@ public class WebView extends AbsoluteLayout
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public HitTestResult() { public HitTestResult() {
mType = UNKNOWN_TYPE; mType = UNKNOWN_TYPE;
} }
@@ -401,6 +405,7 @@ public class WebView extends AbsoluteLayout
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public void setType(int type) { public void setType(int type) {
mType = type; mType = type;
} }
@@ -408,6 +413,7 @@ public class WebView extends AbsoluteLayout
/** /**
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public void setExtra(String extra) { public void setExtra(String extra) {
mExtra = extra; mExtra = extra;
} }
@@ -542,7 +548,7 @@ public class WebView extends AbsoluteLayout
sEnforceThreadChecking = context.getApplicationInfo().targetSdkVersion >= sEnforceThreadChecking = context.getApplicationInfo().targetSdkVersion >=
Build.VERSION_CODES.JELLY_BEAN_MR2; Build.VERSION_CODES.JELLY_BEAN_MR2;
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "WebView<init>"); if (TRACE) Log.d(LOGTAG, "WebView<init>");
ensureProviderCreated(); ensureProviderCreated();
mProvider.init(javaScriptInterfaces, privateBrowsing); mProvider.init(javaScriptInterfaces, privateBrowsing);
@@ -557,7 +563,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void setHorizontalScrollbarOverlay(boolean overlay) { public void setHorizontalScrollbarOverlay(boolean overlay) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setHorizontalScrollbarOverlay=" + overlay); if (TRACE) Log.d(LOGTAG, "setHorizontalScrollbarOverlay=" + overlay);
mProvider.setHorizontalScrollbarOverlay(overlay); mProvider.setHorizontalScrollbarOverlay(overlay);
} }
@@ -568,7 +574,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void setVerticalScrollbarOverlay(boolean overlay) { public void setVerticalScrollbarOverlay(boolean overlay) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setVerticalScrollbarOverlay=" + overlay); if (TRACE) Log.d(LOGTAG, "setVerticalScrollbarOverlay=" + overlay);
mProvider.setVerticalScrollbarOverlay(overlay); mProvider.setVerticalScrollbarOverlay(overlay);
} }
@@ -623,7 +629,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public void setCertificate(SslCertificate certificate) { public void setCertificate(SslCertificate certificate) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setCertificate=" + certificate); if (TRACE) Log.d(LOGTAG, "setCertificate=" + certificate);
mProvider.setCertificate(certificate); mProvider.setCertificate(certificate);
} }
@@ -647,7 +653,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public void savePassword(String host, String username, String password) { public void savePassword(String host, String username, String password) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "savePassword=" + host); if (TRACE) Log.d(LOGTAG, "savePassword=" + host);
mProvider.savePassword(host, username, password); mProvider.savePassword(host, username, password);
} }
@@ -667,7 +673,7 @@ public class WebView extends AbsoluteLayout
public void setHttpAuthUsernamePassword(String host, String realm, public void setHttpAuthUsernamePassword(String host, String realm,
String username, String password) { String username, String password) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setHttpAuthUsernamePassword=" + host); if (TRACE) Log.d(LOGTAG, "setHttpAuthUsernamePassword=" + host);
mProvider.setHttpAuthUsernamePassword(host, realm, username, password); mProvider.setHttpAuthUsernamePassword(host, realm, username, password);
} }
@@ -697,7 +703,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void destroy() { public void destroy() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "destroy"); if (TRACE) Log.d(LOGTAG, "destroy");
mProvider.destroy(); mProvider.destroy();
} }
@@ -743,7 +749,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void setNetworkAvailable(boolean networkUp) { public void setNetworkAvailable(boolean networkUp) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setNetworkAvailable=" + networkUp); if (TRACE) Log.d(LOGTAG, "setNetworkAvailable=" + networkUp);
mProvider.setNetworkAvailable(networkUp); mProvider.setNetworkAvailable(networkUp);
} }
@@ -760,7 +766,7 @@ public class WebView extends AbsoluteLayout
*/ */
public WebBackForwardList saveState(Bundle outState) { public WebBackForwardList saveState(Bundle outState) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "saveState"); if (TRACE) Log.d(LOGTAG, "saveState");
return mProvider.saveState(outState); return mProvider.saveState(outState);
} }
@@ -777,7 +783,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public boolean savePicture(Bundle b, final File dest) { public boolean savePicture(Bundle b, final File dest) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "savePicture=" + dest.getName()); if (TRACE) Log.d(LOGTAG, "savePicture=" + dest.getName());
return mProvider.savePicture(b, dest); return mProvider.savePicture(b, dest);
} }
@@ -795,7 +801,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public boolean restorePicture(Bundle b, File src) { public boolean restorePicture(Bundle b, File src) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "restorePicture=" + src.getName()); if (TRACE) Log.d(LOGTAG, "restorePicture=" + src.getName());
return mProvider.restorePicture(b, src); return mProvider.restorePicture(b, src);
} }
@@ -813,7 +819,7 @@ public class WebView extends AbsoluteLayout
*/ */
public WebBackForwardList restoreState(Bundle inState) { public WebBackForwardList restoreState(Bundle inState) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "restoreState"); if (TRACE) Log.d(LOGTAG, "restoreState");
return mProvider.restoreState(inState); return mProvider.restoreState(inState);
} }
@@ -830,7 +836,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void loadUrl(String url, Map<String, String> additionalHttpHeaders) { public void loadUrl(String url, Map<String, String> additionalHttpHeaders) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) { if (TRACE) {
StringBuilder headers = new StringBuilder(); StringBuilder headers = new StringBuilder();
if (additionalHttpHeaders != null) { if (additionalHttpHeaders != null) {
for (Map.Entry<String, String> entry : additionalHttpHeaders.entrySet()) { for (Map.Entry<String, String> entry : additionalHttpHeaders.entrySet()) {
@@ -849,7 +855,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void loadUrl(String url) { public void loadUrl(String url) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "loadUrl=" + url); if (TRACE) Log.d(LOGTAG, "loadUrl=" + url);
mProvider.loadUrl(url); mProvider.loadUrl(url);
} }
@@ -864,7 +870,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void postUrl(String url, byte[] postData) { public void postUrl(String url, byte[] postData) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "postUrl=" + url); if (TRACE) Log.d(LOGTAG, "postUrl=" + url);
if (URLUtil.isNetworkUrl(url)) { if (URLUtil.isNetworkUrl(url)) {
mProvider.postUrl(url, postData); mProvider.postUrl(url, postData);
} else { } else {
@@ -903,7 +909,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void loadData(String data, String mimeType, String encoding) { public void loadData(String data, String mimeType, String encoding) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "loadData"); if (TRACE) Log.d(LOGTAG, "loadData");
mProvider.loadData(data, mimeType, encoding); mProvider.loadData(data, mimeType, encoding);
} }
@@ -936,7 +942,7 @@ public class WebView extends AbsoluteLayout
public void loadDataWithBaseURL(String baseUrl, String data, public void loadDataWithBaseURL(String baseUrl, String data,
String mimeType, String encoding, String historyUrl) { String mimeType, String encoding, String historyUrl) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "loadDataWithBaseURL=" + baseUrl); if (TRACE) Log.d(LOGTAG, "loadDataWithBaseURL=" + baseUrl);
mProvider.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl); mProvider.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
} }
@@ -953,7 +959,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void evaluateJavascript(String script, ValueCallback<String> resultCallback) { public void evaluateJavascript(String script, ValueCallback<String> resultCallback) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "evaluateJavascript=" + script); if (TRACE) Log.d(LOGTAG, "evaluateJavascript=" + script);
mProvider.evaluateJavaScript(script, resultCallback); mProvider.evaluateJavaScript(script, resultCallback);
} }
@@ -964,7 +970,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void saveWebArchive(String filename) { public void saveWebArchive(String filename) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "saveWebArchive=" + filename); if (TRACE) Log.d(LOGTAG, "saveWebArchive=" + filename);
mProvider.saveWebArchive(filename); mProvider.saveWebArchive(filename);
} }
@@ -982,7 +988,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void saveWebArchive(String basename, boolean autoname, ValueCallback<String> callback) { public void saveWebArchive(String basename, boolean autoname, ValueCallback<String> callback) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "saveWebArchive(auto)=" + basename); if (TRACE) Log.d(LOGTAG, "saveWebArchive(auto)=" + basename);
mProvider.saveWebArchive(basename, autoname, callback); mProvider.saveWebArchive(basename, autoname, callback);
} }
@@ -991,7 +997,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void stopLoading() { public void stopLoading() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "stopLoading"); if (TRACE) Log.d(LOGTAG, "stopLoading");
mProvider.stopLoading(); mProvider.stopLoading();
} }
@@ -1000,7 +1006,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void reload() { public void reload() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "reload"); if (TRACE) Log.d(LOGTAG, "reload");
mProvider.reload(); mProvider.reload();
} }
@@ -1019,7 +1025,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void goBack() { public void goBack() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "goBack"); if (TRACE) Log.d(LOGTAG, "goBack");
mProvider.goBack(); mProvider.goBack();
} }
@@ -1038,7 +1044,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void goForward() { public void goForward() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "goForward"); if (TRACE) Log.d(LOGTAG, "goForward");
mProvider.goForward(); mProvider.goForward();
} }
@@ -1064,7 +1070,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void goBackOrForward(int steps) { public void goBackOrForward(int steps) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "goBackOrForwad=" + steps); if (TRACE) Log.d(LOGTAG, "goBackOrForwad=" + steps);
mProvider.goBackOrForward(steps); mProvider.goBackOrForward(steps);
} }
@@ -1084,7 +1090,7 @@ public class WebView extends AbsoluteLayout
*/ */
public boolean pageUp(boolean top) { public boolean pageUp(boolean top) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "pageUp"); if (TRACE) Log.d(LOGTAG, "pageUp");
return mProvider.pageUp(top); return mProvider.pageUp(top);
} }
@@ -1096,7 +1102,7 @@ public class WebView extends AbsoluteLayout
*/ */
public boolean pageDown(boolean bottom) { public boolean pageDown(boolean bottom) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "pageDown"); if (TRACE) Log.d(LOGTAG, "pageDown");
return mProvider.pageDown(bottom); return mProvider.pageDown(bottom);
} }
@@ -1109,7 +1115,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public void clearView() { public void clearView() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearView"); if (TRACE) Log.d(LOGTAG, "clearView");
mProvider.clearView(); mProvider.clearView();
} }
@@ -1140,7 +1146,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public Picture capturePicture() { public Picture capturePicture() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "capturePicture"); if (TRACE) Log.d(LOGTAG, "capturePicture");
return mProvider.capturePicture(); return mProvider.capturePicture();
} }
@@ -1151,7 +1157,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public PrintDocumentAdapter createPrintDocumentAdapter() { public PrintDocumentAdapter createPrintDocumentAdapter() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "createPrintDocumentAdapter"); if (TRACE) Log.d(LOGTAG, "createPrintDocumentAdapter");
return mProvider.createPrintDocumentAdapter("default"); return mProvider.createPrintDocumentAdapter("default");
} }
@@ -1170,7 +1176,7 @@ public class WebView extends AbsoluteLayout
*/ */
public PrintDocumentAdapter createPrintDocumentAdapter(String documentName) { public PrintDocumentAdapter createPrintDocumentAdapter(String documentName) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "createPrintDocumentAdapter"); if (TRACE) Log.d(LOGTAG, "createPrintDocumentAdapter");
return mProvider.createPrintDocumentAdapter(documentName); return mProvider.createPrintDocumentAdapter(documentName);
} }
@@ -1210,7 +1216,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void setInitialScale(int scaleInPercent) { public void setInitialScale(int scaleInPercent) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setInitialScale=" + scaleInPercent); if (TRACE) Log.d(LOGTAG, "setInitialScale=" + scaleInPercent);
mProvider.setInitialScale(scaleInPercent); mProvider.setInitialScale(scaleInPercent);
} }
@@ -1221,7 +1227,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void invokeZoomPicker() { public void invokeZoomPicker() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "invokeZoomPicker"); if (TRACE) Log.d(LOGTAG, "invokeZoomPicker");
mProvider.invokeZoomPicker(); mProvider.invokeZoomPicker();
} }
@@ -1245,7 +1251,7 @@ public class WebView extends AbsoluteLayout
*/ */
public HitTestResult getHitTestResult() { public HitTestResult getHitTestResult() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "getHitTestResult"); if (TRACE) Log.d(LOGTAG, "getHitTestResult");
return mProvider.getHitTestResult(); return mProvider.getHitTestResult();
} }
@@ -1264,7 +1270,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void requestFocusNodeHref(Message hrefMsg) { public void requestFocusNodeHref(Message hrefMsg) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "requestFocusNodeHref"); if (TRACE) Log.d(LOGTAG, "requestFocusNodeHref");
mProvider.requestFocusNodeHref(hrefMsg); mProvider.requestFocusNodeHref(hrefMsg);
} }
@@ -1277,7 +1283,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void requestImageRef(Message msg) { public void requestImageRef(Message msg) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "requestImageRef"); if (TRACE) Log.d(LOGTAG, "requestImageRef");
mProvider.requestImageRef(msg); mProvider.requestImageRef(msg);
} }
@@ -1382,7 +1388,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void pauseTimers() { public void pauseTimers() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "pauseTimers"); if (TRACE) Log.d(LOGTAG, "pauseTimers");
mProvider.pauseTimers(); mProvider.pauseTimers();
} }
@@ -1392,7 +1398,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void resumeTimers() { public void resumeTimers() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "resumeTimers"); if (TRACE) Log.d(LOGTAG, "resumeTimers");
mProvider.resumeTimers(); mProvider.resumeTimers();
} }
@@ -1405,7 +1411,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void onPause() { public void onPause() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "onPause"); if (TRACE) Log.d(LOGTAG, "onPause");
mProvider.onPause(); mProvider.onPause();
} }
@@ -1414,7 +1420,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void onResume() { public void onResume() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "onResume"); if (TRACE) Log.d(LOGTAG, "onResume");
mProvider.onResume(); mProvider.onResume();
} }
@@ -1437,7 +1443,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public void freeMemory() { public void freeMemory() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "freeMemory"); if (TRACE) Log.d(LOGTAG, "freeMemory");
mProvider.freeMemory(); mProvider.freeMemory();
} }
@@ -1449,7 +1455,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void clearCache(boolean includeDiskFiles) { public void clearCache(boolean includeDiskFiles) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearCache"); if (TRACE) Log.d(LOGTAG, "clearCache");
mProvider.clearCache(includeDiskFiles); mProvider.clearCache(includeDiskFiles);
} }
@@ -1461,7 +1467,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void clearFormData() { public void clearFormData() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearFormData"); if (TRACE) Log.d(LOGTAG, "clearFormData");
mProvider.clearFormData(); mProvider.clearFormData();
} }
@@ -1470,7 +1476,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void clearHistory() { public void clearHistory() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearHistory"); if (TRACE) Log.d(LOGTAG, "clearHistory");
mProvider.clearHistory(); mProvider.clearHistory();
} }
@@ -1480,7 +1486,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void clearSslPreferences() { public void clearSslPreferences() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearSslPreferences"); if (TRACE) Log.d(LOGTAG, "clearSslPreferences");
mProvider.clearSslPreferences(); mProvider.clearSslPreferences();
} }
@@ -1496,7 +1502,7 @@ public class WebView extends AbsoluteLayout
* callback. The runnable will be called in UI thread. * callback. The runnable will be called in UI thread.
*/ */
public static void clearClientCertPreferences(Runnable onCleared) { public static void clearClientCertPreferences(Runnable onCleared) {
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearClientCertPreferences"); if (TRACE) Log.d(LOGTAG, "clearClientCertPreferences");
getFactory().getStatics().clearClientCertPreferences(onCleared); getFactory().getStatics().clearClientCertPreferences(onCleared);
} }
@@ -1538,7 +1544,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void findNext(boolean forward) { public void findNext(boolean forward) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "findNext"); if (TRACE) Log.d(LOGTAG, "findNext");
mProvider.findNext(forward); mProvider.findNext(forward);
} }
@@ -1554,7 +1560,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public int findAll(String find) { public int findAll(String find) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "findAll"); if (TRACE) Log.d(LOGTAG, "findAll");
StrictMode.noteSlowCall("findAll blocks UI: prefer findAllAsync"); StrictMode.noteSlowCall("findAll blocks UI: prefer findAllAsync");
return mProvider.findAll(find); return mProvider.findAll(find);
} }
@@ -1569,7 +1575,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void findAllAsync(String find) { public void findAllAsync(String find) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "findAllAsync"); if (TRACE) Log.d(LOGTAG, "findAllAsync");
mProvider.findAllAsync(find); mProvider.findAllAsync(find);
} }
@@ -1590,7 +1596,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public boolean showFindDialog(String text, boolean showIme) { public boolean showFindDialog(String text, boolean showIme) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "showFindDialog"); if (TRACE) Log.d(LOGTAG, "showFindDialog");
return mProvider.showFindDialog(text, showIme); return mProvider.showFindDialog(text, showIme);
} }
@@ -1646,7 +1652,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void clearMatches() { public void clearMatches() {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "clearMatches"); if (TRACE) Log.d(LOGTAG, "clearMatches");
mProvider.clearMatches(); mProvider.clearMatches();
} }
@@ -1707,7 +1713,7 @@ public class WebView extends AbsoluteLayout
@Deprecated @Deprecated
public void setPictureListener(PictureListener listener) { public void setPictureListener(PictureListener listener) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "setPictureListener=" + listener); if (TRACE) Log.d(LOGTAG, "setPictureListener=" + listener);
mProvider.setPictureListener(listener); mProvider.setPictureListener(listener);
} }
@@ -1764,7 +1770,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void addJavascriptInterface(Object object, String name) { public void addJavascriptInterface(Object object, String name) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "addJavascriptInterface=" + name); if (TRACE) Log.d(LOGTAG, "addJavascriptInterface=" + name);
mProvider.addJavascriptInterface(object, name); mProvider.addJavascriptInterface(object, name);
} }
@@ -1777,7 +1783,7 @@ public class WebView extends AbsoluteLayout
*/ */
public void removeJavascriptInterface(String name) { public void removeJavascriptInterface(String name) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "removeJavascriptInterface=" + name); if (TRACE) Log.d(LOGTAG, "removeJavascriptInterface=" + name);
mProvider.removeJavascriptInterface(name); mProvider.removeJavascriptInterface(name);
} }
@@ -1881,7 +1887,7 @@ public class WebView extends AbsoluteLayout
public void flingScroll(int vx, int vy) { public void flingScroll(int vx, int vy) {
checkThread(); checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "flingScroll"); if (TRACE) Log.d(LOGTAG, "flingScroll");
mProvider.flingScroll(vx, vy); mProvider.flingScroll(vx, vy);
} }
@@ -2006,6 +2012,7 @@ public class WebView extends AbsoluteLayout
* *
* @hide WebViewProvider is not public API. * @hide WebViewProvider is not public API.
*/ */
@SystemApi
public WebViewProvider getWebViewProvider() { public WebViewProvider getWebViewProvider() {
return mProvider; return mProvider;
} }
@@ -2015,6 +2022,7 @@ public class WebView extends AbsoluteLayout
* and fields, and make super-class calls in this WebView instance. * and fields, and make super-class calls in this WebView instance.
* @hide Only for use by WebViewProvider implementations * @hide Only for use by WebViewProvider implementations
*/ */
@SystemApi
public class PrivateAccess { public class PrivateAccess {
// ---- Access to super-class methods ---- // ---- Access to super-class methods ----
public int super_getScrollBarStyle() { public int super_getScrollBarStyle() {

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.Context; import android.content.Context;
/** /**
@@ -28,18 +29,12 @@ import android.content.Context;
* <li>Data entered into text fields (e.g. for autocomplete suggestions)</li> * <li>Data entered into text fields (e.g. for autocomplete suggestions)</li>
* </ul> * </ul>
*/ */
public class WebViewDatabase { public abstract class WebViewDatabase {
/** /**
* @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1} * @hide Since API level {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}
*/ */
protected static final String LOGTAG = "webviewdatabase"; protected static final String LOGTAG = "webviewdatabase";
/**
* @hide Only for use by WebViewProvider implementations.
*/
protected WebViewDatabase() {
}
public static WebViewDatabase getInstance(Context context) { public static WebViewDatabase getInstance(Context context) {
return WebViewFactory.getProvider().getWebViewDatabase(context); return WebViewFactory.getProvider().getWebViewDatabase(context);
} }
@@ -54,9 +49,7 @@ public class WebViewDatabase {
* @deprecated Saving passwords in WebView will not be supported in future versions. * @deprecated Saving passwords in WebView will not be supported in future versions.
*/ */
@Deprecated @Deprecated
public boolean hasUsernamePassword() { public abstract boolean hasUsernamePassword();
throw new MustOverrideException();
}
/** /**
* Clears any saved username/password pairs for web forms. * Clears any saved username/password pairs for web forms.
@@ -67,9 +60,7 @@ public class WebViewDatabase {
* @deprecated Saving passwords in WebView will not be supported in future versions. * @deprecated Saving passwords in WebView will not be supported in future versions.
*/ */
@Deprecated @Deprecated
public void clearUsernamePassword() { public abstract void clearUsernamePassword();
throw new MustOverrideException();
}
/** /**
* Gets whether there are any saved credentials for HTTP authentication. * Gets whether there are any saved credentials for HTTP authentication.
@@ -79,9 +70,7 @@ public class WebViewDatabase {
* @see WebView#setHttpAuthUsernamePassword * @see WebView#setHttpAuthUsernamePassword
* @see #clearHttpAuthUsernamePassword * @see #clearHttpAuthUsernamePassword
*/ */
public boolean hasHttpAuthUsernamePassword() { public abstract boolean hasHttpAuthUsernamePassword();
throw new MustOverrideException();
}
/** /**
* Clears any saved credentials for HTTP authentication. * Clears any saved credentials for HTTP authentication.
@@ -90,9 +79,7 @@ public class WebViewDatabase {
* @see WebView#setHttpAuthUsernamePassword * @see WebView#setHttpAuthUsernamePassword
* @see #hasHttpAuthUsernamePassword * @see #hasHttpAuthUsernamePassword
*/ */
public void clearHttpAuthUsernamePassword() { public abstract void clearHttpAuthUsernamePassword();
throw new MustOverrideException();
}
/** /**
* Gets whether there is any saved data for web forms. * Gets whether there is any saved data for web forms.
@@ -100,16 +87,12 @@ public class WebViewDatabase {
* @return whether there is any saved data for web forms * @return whether there is any saved data for web forms
* @see #clearFormData * @see #clearFormData
*/ */
public boolean hasFormData() { public abstract boolean hasFormData();
throw new MustOverrideException();
}
/** /**
* Clears any saved data for web forms. * Clears any saved data for web forms.
* *
* @see #hasFormData * @see #hasFormData
*/ */
public void clearFormData() { public abstract void clearFormData();
throw new MustOverrideException();
}
} }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.app.ActivityThread; import android.app.ActivityThread;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
@@ -35,6 +36,7 @@ import android.view.ViewRootImpl;
* *
* @hide * @hide
*/ */
@SystemApi
public final class WebViewDelegate { public final class WebViewDelegate {
/* package */ WebViewDelegate() { } /* package */ WebViewDelegate() { }

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.app.ActivityManagerInternal; import android.app.ActivityManagerInternal;
import android.app.Application; import android.app.Application;
import android.app.AppGlobals; import android.app.AppGlobals;
@@ -46,6 +47,7 @@ import com.android.internal.os.Zygote;
* *
* @hide * @hide
*/ */
@SystemApi
public final class WebViewFactory { public final class WebViewFactory {
private static final String CHROMIUM_WEBVIEW_FACTORY = private static final String CHROMIUM_WEBVIEW_FACTORY =

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
@@ -26,6 +27,7 @@ import android.net.Uri;
* implementation of this interface, and make it available to the WebView via mechanism TBD. * implementation of this interface, and make it available to the WebView via mechanism TBD.
* @hide * @hide
*/ */
@SystemApi
public interface WebViewFactoryProvider { public interface WebViewFactoryProvider {
/** /**
* This Interface provides glue for implementing the backend of WebView static methods which * This Interface provides glue for implementing the backend of WebView static methods which

View File

@@ -16,6 +16,7 @@
package android.webkit; package android.webkit;
import android.annotation.SystemApi;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
@@ -53,6 +54,7 @@ import java.util.Map;
* *
* @hide Not part of the public API; only required by system implementors. * @hide Not part of the public API; only required by system implementors.
*/ */
@SystemApi
public interface WebViewProvider { public interface WebViewProvider {
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// Main interface for backend provider of the WebView class. // Main interface for backend provider of the WebView class.