Loading core/java/android/webkit/CookieManager.java +20 −4 Original line number Diff line number Diff line Loading @@ -166,9 +166,17 @@ public class CookieManager { * @return True if {@link WebView} instances send and accept cookies for * file scheme URLs */ // Static for backward compatibility. public static boolean allowFileSchemeCookies() { // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925 return CookieManagerClassic.allowFileSchemeCookies(); return getInstance().allowFileSchemeCookiesImpl(); } /** * Implements {@link #allowFileSchemeCookies()} * @hide Only for use by WebViewProvider implementations */ protected boolean allowFileSchemeCookiesImpl() { throw new MustOverrideException(); } /** Loading @@ -181,8 +189,16 @@ public class CookieManager { * Note that calls to this method will have no effect if made after a * {@link WebView} or CookieManager instance has been created. */ // Static for backward compatibility. public static void setAcceptFileSchemeCookies(boolean accept) { // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925 CookieManagerClassic.setAcceptFileSchemeCookies(accept); getInstance().setAcceptFileSchemeCookiesImpl(accept); } /** * Implements {@link #setAcceptFileSchemeCookies(boolean)} * @hide Only for use by WebViewProvider implementations */ protected void setAcceptFileSchemeCookiesImpl(boolean accept) { throw new MustOverrideException(); } } core/java/android/webkit/CookieManagerClassic.java +4 −18 Original line number Diff line number Diff line Loading @@ -159,27 +159,13 @@ class CookieManagerClassic extends CookieManager { nativeFlushCookieStore(); } /** * Gets whether the application's {@link WebView} instances send and accept * cookies for file scheme URLs. * @return True if {@link WebView} instances send and accept cookies for * file scheme URLs */ public static boolean allowFileSchemeCookies() { @Override protected boolean allowFileSchemeCookiesImpl() { return nativeAcceptFileSchemeCookies(); } /** * Sets whether the application's {@link WebView} instances should send and * accept cookies for file scheme URLs. * Use of cookies with file scheme URLs is potentially insecure. Do not use * this feature unless you can be sure that no unintentional sharing of * cookie data can take place. * <p> * Note that calls to this method will have no effect if made after a * {@link WebView} or CookieManager instance has been created. */ public static void setAcceptFileSchemeCookies(boolean accept) { @Override protected void setAcceptFileSchemeCookiesImpl(boolean accept) { nativeSetAcceptFileSchemeCookies(accept); } Loading Loading
core/java/android/webkit/CookieManager.java +20 −4 Original line number Diff line number Diff line Loading @@ -166,9 +166,17 @@ public class CookieManager { * @return True if {@link WebView} instances send and accept cookies for * file scheme URLs */ // Static for backward compatibility. public static boolean allowFileSchemeCookies() { // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925 return CookieManagerClassic.allowFileSchemeCookies(); return getInstance().allowFileSchemeCookiesImpl(); } /** * Implements {@link #allowFileSchemeCookies()} * @hide Only for use by WebViewProvider implementations */ protected boolean allowFileSchemeCookiesImpl() { throw new MustOverrideException(); } /** Loading @@ -181,8 +189,16 @@ public class CookieManager { * Note that calls to this method will have no effect if made after a * {@link WebView} or CookieManager instance has been created. */ // Static for backward compatibility. public static void setAcceptFileSchemeCookies(boolean accept) { // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925 CookieManagerClassic.setAcceptFileSchemeCookies(accept); getInstance().setAcceptFileSchemeCookiesImpl(accept); } /** * Implements {@link #setAcceptFileSchemeCookies(boolean)} * @hide Only for use by WebViewProvider implementations */ protected void setAcceptFileSchemeCookiesImpl(boolean accept) { throw new MustOverrideException(); } }
core/java/android/webkit/CookieManagerClassic.java +4 −18 Original line number Diff line number Diff line Loading @@ -159,27 +159,13 @@ class CookieManagerClassic extends CookieManager { nativeFlushCookieStore(); } /** * Gets whether the application's {@link WebView} instances send and accept * cookies for file scheme URLs. * @return True if {@link WebView} instances send and accept cookies for * file scheme URLs */ public static boolean allowFileSchemeCookies() { @Override protected boolean allowFileSchemeCookiesImpl() { return nativeAcceptFileSchemeCookies(); } /** * Sets whether the application's {@link WebView} instances should send and * accept cookies for file scheme URLs. * Use of cookies with file scheme URLs is potentially insecure. Do not use * this feature unless you can be sure that no unintentional sharing of * cookie data can take place. * <p> * Note that calls to this method will have no effect if made after a * {@link WebView} or CookieManager instance has been created. */ public static void setAcceptFileSchemeCookies(boolean accept) { @Override protected void setAcceptFileSchemeCookiesImpl(boolean accept) { nativeSetAcceptFileSchemeCookies(accept); } Loading