Snaptube v4.40.0.4401610版本的 MD5 值为:ca2b95dcff63007195db02a6c93091b9

以下内容为反编译后的 DialogC0490.java 源代码,内容仅作参考


package o;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.webkit.WebView;
import org.json.JSONException;
import org.json.JSONObject;
public class DialogC0490 extends DialogC0853 {
    private static final String f23542 = DialogC0490.class.getName();
    private boolean f23543;

    public DialogC0490(Context context, String str, String str2) {
        super(context, str);
        m25647(str2);
    }

    @Override
    protected Bundle mo24092(String str) {
        Bundle m25305 = C0779.m25305(Uri.parse(str).getQuery());
        String string = m25305.getString("bridge_args");
        m25305.remove("bridge_args");
        if (!C0779.m25295(string)) {
            try {
                m25305.putBundle("com.facebook.platform.protocol.BRIDGE_ARGS", C1487.m28319(new JSONObject(string)));
            } catch (JSONException e) {
                C0779.m25287(f23542, "Unable to parse bridge_args JSON", e);
            }
        }
        String string2 = m25305.getString("method_results");
        m25305.remove("method_results");
        if (!C0779.m25295(string2)) {
            if (C0779.m25295(string2)) {
                string2 = "{}";
            }
            try {
                m25305.putBundle("com.facebook.platform.protocol.RESULT_ARGS", C1487.m28319(new JSONObject(string2)));
            } catch (JSONException e2) {
                C0779.m25287(f23542, "Unable to parse bridge_args JSON", e2);
            }
        }
        m25305.remove("version");
        m25305.putInt("com.facebook.platform.protocol.PROTOCOL_VERSION", C0731.m25080());
        return m25305;
    }

    @Override
    public void cancel() {
        WebView webView = m25649();
        if (!m25648() || m25646() || webView == null || !webView.isShown()) {
            super.cancel();
        } else if (!this.f23543) {
            this.f23543 = true;
            webView.loadUrl("javascript:(function() {  var event = document.createEvent('Event');  event.initEvent('fbPlatformDialogMustClose',true,true);  document.dispatchEvent(event);})();");
            new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
                @Override
                public void run() {
                    DialogC0490.super.cancel();
                }
            }, 1500L);
        }
    }
}