Files
android_translation_layer/src/api-impl/android/webkit/CookieManager.java
Julian Winkler fa3292dcb5 add CookieManager and WebStorage, but disable them in NewPipe for now
These classes are needed for WhatsApp, but having them available makes
NewPipe try to generate PoTokens in the WebView, which does not work yet,
so we just throw an Exception in NewPipe based on the package name.
2025-03-02 00:05:59 +01:00

23 lines
564 B
Java

package android.webkit;
import android.content.Context;
class ValueCallback {}
public class CookieManager {
public static CookieManager getInstance() {
// HACK: disable NewPipe's WebView based PoToken generator for now
if (Context.this_application.getPackageName().equals("org.schabi.newpipe")) {
throw new RuntimeException("CookieManager not yet fully implemented");
}
return new CookieManager();
}
public void removeAllCookies(ValueCallback callback) {}
public void removeSessionCookies(ValueCallback callback) {}
public void flush() {}
}