Life Simulator: Game Dev v0.6版本的 MD5 值为:ecca8c682c00d3b861fbed7f58e41c8d

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


package com.chartboost.sdk.impl;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import com.amazon.device.ads.WebRequest;
import com.chartboost.sdk.Libraries.CBLogging;
import com.chartboost.sdk.Libraries.CBUtility;
import com.cmcm.utils.ReportFactory;
import org.json.JSONObject;

@SuppressLint({"ViewConstructor"})
public class w extends s {
    View.OnClickListener a;
    private final WebView b;

    public w(z zVar, Context context) {
        super(context);
        this.a = null;
        this.b = new WebView(context);
        addView(this.b, new LinearLayout.LayoutParams(-1, -1));
        this.b.setBackgroundColor(0);
        this.b.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                if (url == null) {
                    return false;
                }
                if (url.contains("chartboost") && url.contains(ReportFactory.CLICK) && w.this.a != null) {
                    w.this.a.onClick(w.this);
                }
                return true;
            }
        });
    }

    @Override
    public void setOnClickListener(View.OnClickListener clickListener) {
        super.setOnClickListener(clickListener);
        this.a = clickListener;
    }

    @Override
    public void a(JSONObject jSONObject, int i) {
        String optString = jSONObject.optString("html");
        if (!optString.isEmpty()) {
            try {
                this.b.loadDataWithBaseURL("file:///android_res/", optString, WebRequest.CONTENT_TYPE_HTML, WebRequest.CHARSET_UTF_8, null);
            } catch (Exception e) {
                CBLogging.b("AppCellWebView", "Exception raised loading data into webview", e);
                com.chartboost.sdk.Tracking.a.a(getClass(), "prepareWithCellMeta", e);
            }
        }
    }

    @Override
    public int a() {
        return CBUtility.a(100, getContext());
    }
}