Ice Scream Tycoon v1.0.4版本的 MD5 值为:f589390679eebf9f2a1d825e8c8a632e

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


package com.safedk.android.internal;

import android.os.Bundle;
import com.safedk.android.SafeDK;
import com.safedk.android.analytics.AppLovinBridge;
import com.safedk.android.analytics.brandsafety.BrandSafetyUtils;
import com.safedk.android.utils.Logger;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.json.JSONObject;

public class d {
    public static final String A = "videoMimeTypesList";
    public static final String B = "audioMimeTypesList";
    public static final String C = "https://edge.safedk.com";
    public static final String D = "https://edge.safedk.com";
    public static final String E = "apng;bmp;gif;x-icon;x-icon;png;svg+xml;tiff";
    public static final String F = "wave;wav;x-wav;x-pn-wav;webm;ogg;";
    private static final String G = "SafeDKConfiguration";
    private static final String H = "settings";
    private static final String I = "android";
    private static final String J = "images";
    private static final String K = "adCaching";
    private static final String L = "general";
    private static final String M = "timers";
    private static final String N = "redirectClickTimeout";
    private static final int O = 30000;

    public static final int f5583a = 300;
    private static final int af = 8192;
    private static final int ah = 540;
    private static final float aj = 40.0f;
    private static final float al = 90.0f;
    private static final int an = 5;
    private static final int ap = 25000;
    private static final boolean ar = false;
    private static final int at = 10000;
    private static final int av = 15000;
    private static final int ax = 15000;
    public static final int b = 5000;
    public static final int c = 500;
    public static final String d = "minValidImageSize";
    public static final String e = "interstitialDimensionsMaxSize";
    public static final String f = "maxUniformPixelsPercentageToStopSampling";
    public static final String g = "maxImagesToStoreOnDevice";
    public static final String h = "minImageSizeToStopSampling";
    public static final String i = "minUniformPixelsPercentageForUniformImage";
    public static final String j = "awsUploadTimeout";
    public static final String k = "resolveUrlTimeout";
    public static final String l = "clickValidityTimeout";
    public static final String m = "interstitialActivitiesToInclude";
    public static final String n = "interstitialActivitiesToExclude";
    public static final String o = "edgeServerUrl";
    public static final String p = "backupEdgeServerUrl";
    public static final String q = "devicesWithDebugLog";
    public static final String r = "cachedCreativeInfoMaxAge";
    public static final String s = "cachedMaxNumberOfItems";
    public static final String t = "cacheSupportingSdkUUIDs";
    public static final String u = "safeDKDeactivation";
    public static final String v = "activePercentage";
    public static final String w = "deactivated";
    public static final String x = "alwaysTakeScreenshot";
    public static final String y = "disableWebViewTracking";
    public static final String z = "imageMimeTypesList";
    private boolean P = false;
    private int Q = 300;
    private boolean R = false;
    private int S = 5000;
    private int T = 500;
    private int U = 30000;
    private boolean V = false;
    private boolean W = false;
    private int X = 2;
    private boolean Y = true;
    private boolean Z = false;
    private boolean aa = false;
    private JSONObject ab = new JSONObject();
    private JSONObject ac = new JSONObject();
    private ArrayList<String> ad = new ArrayList<>(Arrays.asList(com.safedk.android.utils.d.d, com.safedk.android.utils.d.t, com.safedk.android.utils.d.b));
    private boolean ae = false;
    private int ag = 8192;
    private int ai = ah;
    private float ak = aj;
    private float am = al;
    private int ao = 5;
    private long aq = 25000;
    private boolean as = false;
    private int au = 10000;
    private int aw = 15000;
    private int ay = 15000;
    private ArrayList<String> az = new ArrayList<>();
    private ArrayList<String> aA = new ArrayList<>();
    private String aB = "https://edge.safedk.com";
    private String aC = "https://edge.safedk.com";
    private ArrayList<String> aD = new ArrayList<>();
    private ArrayList<String> aE = new ArrayList<>();
    private final long aF = 604800000;
    private long aG = 604800000;
    private final int aH = 50;
    private int aI = 50;
    private final int aJ = 100;
    private int aK = 100;
    private final boolean aL = false;
    private List<String> aM = Arrays.asList(E.split(";"));
    private List<String> aN = Arrays.asList(F.split(";"));
    private boolean aO = false;

    public int a() {
        return this.U;
    }

    public boolean b() {
        return this.ae;
    }

    public int c() {
        return this.ag;
    }

    public int d() {
        return this.ai;
    }

    public float e() {
        return this.ak;
    }

    public float f() {
        return this.am;
    }

    public boolean g() {
        return this.as;
    }

    public int h() {
        return this.ao;
    }

    public long i() {
        return this.aq;
    }

    public int j() {
        return this.au;
    }

    public int k() {
        return this.aw;
    }

    public int l() {
        return this.ay;
    }

    public List<String> m() {
        return this.aM;
    }

    public List<String> n() {
        return this.aN;
    }

    public void a(boolean z2) {
        this.aO = z2;
    }

    public boolean o() {
        return this.aa;
    }

    public boolean p() {
        return !this.aO;
    }

    public void b(boolean z2) {
        this.P = z2;
    }

    public boolean q() {
        return this.P;
    }

    public int r() {
        return this.Q;
    }

    public void a(int i2) {
        this.S = i2;
    }

    public void b(int i2) {
        this.T = i2;
    }

    public boolean s() {
        return this.V;
    }

    public boolean t() {
        return this.W;
    }

    public int u() {
        return this.X;
    }

    public boolean v() {
        return this.R;
    }

    public int w() {
        return this.S;
    }

    public int x() {
        return this.T;
    }

    public JSONObject y() {
        return this.ab;
    }

    public JSONObject z() {
        return this.ac;
    }

    public Set<String> A() {
        return new HashSet(this.aD);
    }

    public boolean B() {
        return this.Z;
    }

    public int C() {
        return this.aK;
    }

    public boolean a(Bundle bundle, boolean z2) {
        Logger.d(G, "parseSettings started , bundle : " + (bundle == null ? "null" : bundle.toString()));
        Bundle bundle2 = bundle.getBundle(H);
        if (bundle2 == null) {
            if (!z2) {
                return false;
            }
            Logger.e(G, "Settings bundle is null, cannot parse settings. Saved settings will be used");
            return false;
        }
        Logger.d(G, "parseSettings starting DEACTIVATION");
        if (bundle2.containsKey(u)) {
            Bundle bundle3 = bundle2.getBundle(u);
            if (bundle3.containsKey(w)) {
                this.aO = bundle3.getBoolean(w, false);
            } else {
                this.aO = false;
            }
            Logger.d(G, "parseSettings deactivated " + this.aO);
            if (bundle3.containsKey(v)) {
                this.aK = (int) bundle3.getDouble(v, 100.0d);
            } else {
                this.aK = 100;
            }
            Logger.d(G, "parseSettings activePercentage " + this.aK);
            if (!this.aO && this.aK != 100) {
                Logger.d(G, "Checking active percentage");
                this.aO = !a(Double.valueOf((double) this.aK), SafeDK.getInstance().getUserId());
                Logger.d(G, "After active percentage deactivated=" + this.aO);
            }
        } else {
            this.aO = false;
            this.aK = 100;
            Logger.d(G, "parseSettings SAFE_DK_DEACTIVATION settings block does not exist. Default configuration values will be used.");
        }
        Logger.d(G, "parseSettings starting IMAGES");
        if (bundle2 != null && bundle2.containsKey(J)) {
            Bundle bundle4 = bundle2.getBundle(J);
            if (bundle4.containsKey(d)) {
                this.ag = bundle4.getInt(d, 8192);
            } else {
                this.ag = 8192;
            }
            Logger.d(G, "parseSettings minValidImageSize " + this.ag);
            if (bundle4.containsKey(e)) {
                this.ai = bundle4.getInt(e, ah);
            } else {
                this.ai = ah;
            }
            Logger.d(G, "parseSettings interstitialDimensionsMaxSize " + this.ai);
            if (bundle4.containsKey(f)) {
                this.ak = (float) bundle4.getDouble(f, 40.0d);
            } else {
                this.ak = aj;
            }
            Logger.d(G, "parseSettings maxUniformPixelsPercentageToStopSampling " + this.ak);
            if (bundle4.containsKey(g)) {
                this.ao = bundle4.getInt(g, 5);
            } else {
                this.ao = 5;
            }
            Logger.d(G, "parseSettings maxImagesToStoreOnDevice " + this.ao);
            if (bundle4.containsKey(h)) {
                this.aq = bundle4.getInt(h, ap);
            } else {
                this.aq = 25000L;
            }
            Logger.d(G, "parseSettings minImageSizeToStopSampling " + this.aq);
            if (bundle4.containsKey(i)) {
                this.am = (float) bundle4.getDouble(i, 90.0d);
            } else {
                this.am = al;
            }
            Logger.d(G, "parseSettings minUniformPixelsPercentageForUniformImage " + this.am);
            if (bundle4.containsKey(x)) {
                this.as = bundle4.getBoolean(x, false);
            } else {
                this.as = false;
            }
            Logger.d(G, "parseSettings alwaysTakeScreenshot " + this.as);
        } else {
            this.ag = 8192;
            this.ai = ah;
            this.ak = aj;
            this.ao = 5;
            this.aq = 25000L;
            this.am = al;
            this.as = false;
            Logger.d(G, "parseSettings IMAGES settings block does not exist. Default configuration values will be used.");
        }
        Logger.d(G, "parseSettings starting TIMERS");
        if (bundle2.containsKey(M)) {
            Bundle bundle5 = bundle2.getBundle(M);
            if (bundle5.containsKey(j)) {
                this.au = (int) bundle5.getDouble(j, 10000.0d);
                if (z2) {
                    this.au *= 1000;
                }
            } else {
                this.au = 10000;
            }
            Logger.d(G, "parseSettings awsUploadTimeout (ms) " + this.au);
            if (bundle5.containsKey(k)) {
                this.aw = (int) bundle5.getDouble(k, 15000.0d);
                if (z2) {
                    this.aw *= 1000;
                }
            } else {
                this.aw = 15000;
            }
            Logger.d(G, "parseSettings resolveUrlTimeout (ms) " + this.aw);
            if (bundle5.containsKey(l)) {
                this.ay = ((int) bundle5.getDouble(l, 15000.0d)) * 1000;
                if (z2) {
                    this.ay *= 1000;
                }
            } else {
                this.ay = 15000;
            }
            Logger.d(G, "parseSettings clickValidityTimeout (ms) " + this.ay);
            if (bundle5.containsKey(N)) {
                this.U = bundle5.getInt(N, 30) * 1000;
                Logger.d(G, "parseSettings redirectClickTimeout value is " + this.U + ", isFromServer=" + z2);
            } else {
                this.U = 30000;
            }
            Logger.d(G, "parseSettings redirectClickTimeout (ms) " + this.U);
        } else {
            this.au = 10000;
            this.aw = 15000;
            this.ay = 15000;
            this.U = 30000;
            Logger.d(G, "parseSettings TIMERS settings block does not exist. Default configuration values will be used.");
        }
        Logger.d(G, "parseSettings starting ANDROID");
        if (bundle2.containsKey("android")) {
            Bundle bundle6 = bundle2.getBundle("android");
            if (bundle6.containsKey(m)) {
                this.az = bundle6.getStringArrayList(m);
                Logger.d(G, "parseSettings interstitialActivitiesToInclude " + this.az);
            }
            if (bundle6.containsKey(n)) {
                this.aA = bundle6.getStringArrayList(n);
                Logger.d(G, "parseSettings interstitialActivitiesToExclude " + this.aA);
            }
            if ((this.az != null && this.az.size() > 0) || (this.aA != null && this.aA.size() > 0)) {
                Iterator<String> it = this.az.iterator();
                while (it.hasNext()) {
                    BrandSafetyUtils.h(it.next());
                }
                Iterator<String> it2 = this.aA.iterator();
                while (it2.hasNext()) {
                    BrandSafetyUtils.i(it2.next());
                }
            }
            if (bundle6.containsKey(y)) {
                this.ae = bundle6.getBoolean(y, false);
                Logger.d(G, "parseSettings disableWebViewTracking " + this.ae);
            }
        } else {
            Logger.d(G, "parseSettings ANDROID settings block does not exist. Default configuration values will be used.");
        }
        Logger.d(G, "parseSettings starting GENERAL");
        if (bundle2.containsKey(L)) {
            Bundle bundle7 = bundle2.getBundle(L);
            if (bundle7.containsKey(o)) {
                this.aB = bundle7.getString(o, "https://edge.safedk.com");
                this.aB = a(this.aB);
            } else {
                this.aB = "https://edge.safedk.com";
            }
            Logger.d(G, "parseSettings edgeServerUrl " + this.aB);
            if (bundle7.containsKey(p)) {
                this.aC = bundle7.getString(p, "https://edge.safedk.com");
                this.aC = a(this.aC);
            } else {
                this.aC = "https://edge.safedk.com";
            }
            Logger.d(G, "parseSettings backupEdgeServerUrl " + this.aC);
            AppLovinBridge.receiveEdgeUrls(this.aB, this.aC);
            if (bundle7.containsKey(q)) {
                this.aD = bundle7.getStringArrayList(q);
                Logger.d(G, "parseSettings devicesWithDebugLog " + this.aD);
            }
        } else {
            Logger.d(G, "parseSettings GENERAL settings block does not exist. Default configuration values will be used.");
        }
        Logger.d(G, "parseSettings starting Ad CACHING");
        if (bundle2.containsKey(K)) {
            Bundle bundle8 = bundle2.getBundle(K);
            if (bundle8.containsKey(r)) {
                this.aG = (int) bundle8.getDouble(r, 6.048E8d);
                Logger.d(G, "parseSettings cachedCreativeInfoMaxAge " + this.aG);
            } else {
                this.aG = 604800000L;
            }
            if (bundle8.containsKey(s)) {
                this.aI = bundle8.getInt(s);
                Logger.d(G, "parseSettings cachedMaxNumberOfItems " + this.aI);
            } else {
                this.aI = 50;
            }
            if (bundle8.containsKey(t)) {
                this.aE = bundle8.getStringArrayList(t);
                Logger.d(G, "parseSettings cacheSupportingSdkUUIDs " + this.aE);
            }
            if (this.aE != null && this.aE.size() > 0) {
                a(this.aE);
            }
        } else {
            this.aG = 604800000L;
            this.aI = 50;
            Logger.d(G, "parseSettings AD_CACHING settings block does not exist. Default configuration values will be used.");
        }
        return true;
    }

    private void a(Bundle bundle) {
        Logger.d(G, "processSdkVersionsBundle started, bundle=" + bundle.toString());
    }

    private void a(ArrayList<String> arrayList) {
        this.ad.clear();
        Iterator<String> it = arrayList.iterator();
        while (it.hasNext()) {
            String next = it.next();
            Logger.d(G, "Adding cacheSupportingSDKUUID " + next + " to cacheSupportedSdk List");
            this.ad.add(next);
        }
    }

    private String a(String str) {
        if (str != null && str.length() > 0) {
            try {
                URL url = new URL(str);
                String protocol = url.getProtocol();
                String host = url.getHost();
                int port = url.getPort();
                if (port == -1) {
                    str = String.format("%s://%s", protocol, host);
                } else {
                    str = String.format("%s://%s:%d", protocol, host, Integer.valueOf(port));
                }
            } catch (MalformedURLException e2) {
                Logger.e(G, "Exception sanitizing server url:" + e2.getMessage(), e2);
            }
        }
        return str;
    }

    private boolean a(Double d2, String str) {
        Logger.d(G, "checkActivePercent started, activePercent=" + d2 + ", userId=" + str);
        float a2 = DeviceData.a("", str);
        Logger.d(G, "checkActivePercent hashValue ==" + a2);
        return ((double) a2) <= d2.doubleValue();
    }

    public long D() {
        return this.aG;
    }

    public int E() {
        return this.aI;
    }

    public ArrayList<String> F() {
        return this.ad;
    }
}