Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97

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


package com.ironsource.sdk.b;

import android.os.Build;
import android.util.Log;
import android.webkit.WebView;
import org.json.JSONException;
import org.json.JSONObject;
public class b {
    public a a;
    public WebView c;
    public String d;
    public String e = b.class.getSimpleName();
    private String[] gt65QHUX = {"handleGetViewVisibility"};
    private final String[] jB = {"loadWithUrl", "updateAd", "isExternalAdViewInitiated", "handleGetViewVisibility", "sendMessage"};
    public d f3546b = new d();

    public final class gt65QHUX implements Runnable {
        private String O2WW392N;
        private String VJ;

        gt65QHUX(String str, String str2) {
            this.VJ = str;
            this.O2WW392N = str2;
        }

        @Override
        public final void run() {
            try {
                if (Build.VERSION.SDK_INT >= 19) {
                    b.this.c.evaluateJavascript(this.VJ, null);
                } else {
                    b.this.c.loadUrl(this.VJ);
                }
            } catch (Throwable unused) {
                String str = b.this.e;
                Log.e(str, "injectJavaScriptIntoWebView | Error while trying inject JS into external adUnit: " + this.O2WW392N + "Android API level: " + Build.VERSION.SDK_INT);
            }
        }
    }

    private void Bcny5qC1(String str) {
        com.ironsource.environment.thread.a.a.a(new gt65QHUX("javascript:try{" + str + "}catch(e){console.log(\"JS exception: \" + JSON.stringify(e));}", str));
    }

    private static String g8(String str) {
        return String.format("window.ssa.onMessageReceived(%1$s)", str);
    }

    public final JSONObject a() {
        JSONObject jSONObject = new JSONObject();
        try {
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put("visibilityParams", this.f3546b.a());
            jSONObject.put("configs", jSONObject2);
            jSONObject.put("adViewId", this.d);
            return jSONObject;
        } catch (JSONException e) {
            e.printStackTrace();
            return new JSONObject();
        }
    }

    public JSONObject a(JSONObject jSONObject) {
        JSONObject jSONObject2 = new JSONObject();
        try {
            jSONObject2.put("id", jSONObject.getString("id"));
            jSONObject2.put("data", this.f3546b.a());
        } catch (Exception e) {
            String str = this.e;
            Log.e(str, "Error while trying execute method buildVisibilityMessageForAdUnit | params: " + jSONObject);
            e.printStackTrace();
        }
        return jSONObject2;
    }

    public final void a(String str) {
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("adViewId", this.d);
            a(str, jSONObject);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }

    public final void a(String str, int i, boolean z) {
        d dVar = this.f3546b;
        if (dVar.gt65QHUX.containsKey(str)) {
            dVar.gt65QHUX.put(str, Boolean.valueOf(i == 0));
        }
        dVar.gt65QHUX.put("isShown", Boolean.valueOf(z));
        dVar.gt65QHUX.put("isViewVisible", Boolean.valueOf((dVar.gt65QHUX.get("isWindowVisible").booleanValue() || dVar.gt65QHUX.get("isVisible").booleanValue()) && dVar.gt65QHUX.get("isShown").booleanValue()));
        if (!(Build.VERSION.SDK_INT <= 22 ? str.equalsIgnoreCase("isWindowVisible") : str.equalsIgnoreCase("isVisible")) || this.a == null || this.f3546b == null) {
            return;
        }
        a("containerIsVisible", a());
    }

    public final void a(String str, String str2) {
        a aVar = this.a;
        if (aVar != null) {
            aVar.a(str, str2, this.d);
        }
    }

    public final void a(String str, String str2, String str3) {
        if (this.c == null) {
            String str4 = "No external adUnit attached to ISNAdView while trying to send message: " + str;
            Log.e(this.e, str4);
            this.a.a(str3, str4, this.d);
            return;
        }
        try {
            new JSONObject(str);
        } catch (JSONException unused) {
            str = "\"" + str + "\"";
        }
        Bcny5qC1(g8(str));
        JSONObject jSONObject = new JSONObject();
        jSONObject.put("adViewId", this.d);
        a(str2, jSONObject);
    }

    public final void a(String str, JSONObject jSONObject) {
        a aVar = this.a;
        if (aVar != null) {
            aVar.a(str, jSONObject);
        }
    }

    public final void b(String str) {
        JSONObject a = this.f3546b.a();
        a.put("adViewId", this.d);
        a(str, a);
    }

    public boolean c(String str) {
        for (String str2 : this.gt65QHUX) {
            if (str2.equalsIgnoreCase(str)) {
                return true;
            }
        }
        return false;
    }
}