@@ -166,9 +166,17 @@ protected void flushCookieStore() {
166166 * @return True if {@link WebView} instances send and accept cookies for
167167 * file scheme URLs
168168 */
169+ // Static for backward compatibility.
169170 public static boolean allowFileSchemeCookies () {
170- // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925
171- return CookieManagerClassic .allowFileSchemeCookies ();
171+ return getInstance ().allowFileSchemeCookiesImpl ();
172+ }
173+
174+ /**
175+ * Implements {@link #allowFileSchemeCookies()}
176+ * @hide Only for use by WebViewProvider implementations
177+ */
178+ protected boolean allowFileSchemeCookiesImpl () {
179+ throw new MustOverrideException ();
172180 }
173181
174182 /**
@@ -181,8 +189,16 @@ public static boolean allowFileSchemeCookies() {
181189 * Note that calls to this method will have no effect if made after a
182190 * {@link WebView} or CookieManager instance has been created.
183191 */
192+ // Static for backward compatibility.
184193 public static void setAcceptFileSchemeCookies (boolean accept ) {
185- // TODO: indirect this via the WebViewFactoryProvider.Statics interface. http://b/6379925
186- CookieManagerClassic .setAcceptFileSchemeCookies (accept );
194+ getInstance ().setAcceptFileSchemeCookiesImpl (accept );
195+ }
196+
197+ /**
198+ * Implements {@link #setAcceptFileSchemeCookies(boolean)}
199+ * @hide Only for use by WebViewProvider implementations
200+ */
201+ protected void setAcceptFileSchemeCookiesImpl (boolean accept ) {
202+ throw new MustOverrideException ();
187203 }
188204}
0 commit comments