九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e

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


package cn.ninegame.aegissdk.h5challenge.c;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import cn.ninegame.aegissdk.a;
import cn.ninegame.aegissdk.config.SDKStyleConfig;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
public final class a {
    public String c;
    public String e;
    private static Context s = null;
    public static int i = 13;
    public static int j = -1;
    public static int k = -1;
    public static int l = -1;
    public static int m = -1;
    public static String n = "";
    public static int o = -1;
    public static int p = -1;
    public static int q = a.C0018a.ng_toolbar_back_icon;
    public Dialog f295a = null;
    private boolean r = false;
    public Long b = 0L;
    public Integer d = -1;
    public b f = null;
    public LinearLayout g = null;
    public RelativeLayout h = null;

    private static String a(String str, String str2) {
        try {
            return String.format("%s&challengeSig=%s", new URL(str).toString(), str2);
        } catch (MalformedURLException e) {
            Log.e("ChallengeView", "[genNcUrl]", e);
            return str;
        }
    }

    public static void a() {
        if (13 == i) {
            j = -1;
            k = SDKStyleConfig.JY_BANNER_COLOR;
            l = 56;
            m = 42;
            n = "请按提示完成操作";
            o = 0;
            p = 18;
        } else if (12 == i) {
            j = -16777216;
            k = SDKStyleConfig.LIGHT_BANNER_COLOR;
            l = 56;
            m = 42;
            n = "请按提示完成操作";
            o = 0;
            p = 18;
            q = a.C0018a.ng_toolbar_back_icon_dark;
        } else if (11 == i) {
            j = -1;
            k = -16777216;
            l = 56;
            m = 42;
            n = "请按提示完成操作";
            o = 0;
            p = 18;
        }
        try {
            if (SDKStyleConfig.STYLE_FONT_COLOR != 0) {
                j = SDKStyleConfig.STYLE_FONT_COLOR;
            }
            if (SDKStyleConfig.STYLE_BANNER_COLOR != 0) {
                k = SDKStyleConfig.STYLE_BANNER_COLOR;
            }
            if (SDKStyleConfig.STYLE_BANNER_HEIGHT > 0) {
                l = SDKStyleConfig.STYLE_BANNER_HEIGHT;
            }
            if (SDKStyleConfig.STYLE_BACKBTN_SIZE > 0) {
                m = SDKStyleConfig.STYLE_BACKBTN_SIZE;
            }
            if (!TextUtils.isEmpty(SDKStyleConfig.STYLE_TIP_TEXT)) {
                n = SDKStyleConfig.STYLE_TIP_TEXT;
            }
            if (SDKStyleConfig.STYLE_BTN_MARGIN > 0) {
                o = SDKStyleConfig.STYLE_BTN_MARGIN;
            }
            if (SDKStyleConfig.STYLE_TITLE_TEXT_SIZE > 0) {
                p = SDKStyleConfig.STYLE_TITLE_TEXT_SIZE;
            }
            if (SDKStyleConfig.STYLE_DARK_ICON) {
                q = a.C0018a.ng_toolbar_back_icon_dark;
            }
        } catch (Exception e) {
            Log.e("ChallengeView", e.getMessage());
        }
    }

    public final void a(Bundle bundle) {
        if (bundle == null) {
            return;
        }
        try {
            Long valueOf = Long.valueOf(bundle.getLong("webViewId"));
            String string = bundle.getString("callbackId");
            Integer valueOf2 = Integer.valueOf(bundle.getInt("openType"));
            this.b = valueOf;
            this.c = string;
            this.d = valueOf2;
            this.e = bundle.getString("hcUrl");
            this.e = a(this.e, bundle.getString("challengeSig"));
        } catch (Exception e) {
            Log.e("ChallengeView", e.getMessage());
        }
    }

    public final void b() {
        if (this.f295a != null) {
            this.f295a.dismiss();
            this.f295a = null;
        }
        if (this.g != null) {
            this.g.removeAllViews();
            this.g = null;
        }
        if (this.f != null) {
            this.f.loadUrl("javascript:var ev={type:'close'};try{ev=new Event('close');}catch(e){ev=document.createEvent('Event');ev.initEvent('close');};window.dispatchEvent(ev);");
            this.f = null;
        }
    }

    public static void a(a aVar) {
        HashMap hashMap = new HashMap();
        hashMap.put("callbackId", aVar.c);
        hashMap.put("webViewId", aVar.b);
        hashMap.put("openType", aVar.d);
        Message a2 = cn.ninegame.aegissdk.b.d.a(hashMap);
        if (aVar.d.intValue() == cn.ninegame.aegissdk.a.a.H5C_RESULTMSG_FOR_H5.d) {
            cn.ninegame.aegissdk.h5challenge.a.a.a(a2);
        } else if (aVar.d.intValue() == cn.ninegame.aegissdk.a.a.H5C_RESULTMSG_FOR_NATIVE.d) {
            cn.ninegame.aegissdk.h5challenge.a.a.b(a2);
        }
        cn.ninegame.aegissdk.b.a.a(aVar.f.f296a);
        aVar.b();
    }
}