导航菜单

页面标题

页面副标题

Kickcash v16.1 - a.java 源代码

正在查看: Kickcash v16.1 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.microsoft.codepush.react;

import android.content.Context;
import android.content.pm.PackageManager;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.devsupport.DevInternalSettings;
import com.facebook.react.devsupport.interfaces.DevSupportManager;
import com.facebook.react.uimanager.ViewManager;
import com.microsoft.clarity.nc.l;
import com.microsoft.clarity.nc.p;
import java.io.File;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;

public class a implements p {
    private static boolean i = false;
    private static boolean j = false;
    private static boolean k = false;
    private static String l = null;
    private static String m = "https://codepush.appcenter.ms/";
    private static String n;
    private static a o;
    private boolean a = false;
    private String b;
    private c c;
    private com.microsoft.clarity.un.e d;
    private i e;
    private String f;
    private Context g;
    private final boolean h;

    public a(String str, Context context, boolean z) {
        this.g = context.getApplicationContext();
        this.c = new c(context.getFilesDir().getAbsolutePath());
        this.d = new com.microsoft.clarity.un.e(this.g);
        this.f = str;
        this.h = z;
        this.e = new i(this.g);
        if (l == null) {
            try {
                l = this.g.getPackageManager().getPackageInfo(this.g.getPackageName(), 0).versionName;
            } catch (PackageManager.NameNotFoundException e) {
                throw new b("Unable to get package info for " + this.g.getPackageName(), e);
            }
        }
        o = this;
        String g = g("PublicKey");
        if (g != null) {
            n = g;
        }
        String g2 = g("ServerUrl");
        if (g2 != null) {
            m = g2;
        }
        a(null);
        p();
    }

    private String g(String str) {
        String packageName = this.g.getPackageName();
        int identifier = this.g.getResources().getIdentifier("CodePush" + str, "string", packageName);
        if (identifier == 0) {
            return null;
        }
        String string = this.g.getString(identifier);
        if (!string.isEmpty()) {
            return string;
        }
        e.h("Specified " + str + " is empty");
        return null;
    }

    public static String i() {
        return j("index.android.bundle");
    }

    public static String j(String str) {
        a aVar = o;
        if (aVar != null) {
            return aVar.k(str);
        }
        throw new com.microsoft.clarity.un.d("A CodePush instance has not been created yet. Have you added it to your app's list of ReactPackages?");
    }

    static l m() {
        return null;
    }

    private boolean o(JSONObject jSONObject) {
        return !l.equals(jSONObject.optString("appVersion", null));
    }

    private boolean s(l lVar) {
        DevSupportManager E;
        if (lVar != null && (E = lVar.E()) != null) {
            DevInternalSettings devSettings = E.getDevSettings();
            for (Method method : devSettings.getClass().getMethods()) {
                if (method.getName().equals("isReloadOnJSChangeEnabled")) {
                    try {
                        return ((Boolean) method.invoke(devSettings, new Object[0])).booleanValue();
                    } catch (Exception unused) {
                        return false;
                    }
                }
            }
        }
        return false;
    }

    private boolean t(JSONObject jSONObject) {
        try {
            String optString = jSONObject.optString("binaryModifiedTime", null);
            Long valueOf = optString != null ? Long.valueOf(Long.parseLong(optString)) : null;
            String optString2 = jSONObject.optString("appVersion", null);
            long f = f();
            if (valueOf != null && valueOf.longValue() == f) {
                if (!v()) {
                    if (l.equals(optString2)) {
                    }
                }
                return true;
            }
            return false;
        } catch (NumberFormatException e) {
            throw new b("Error in reading binary modified date from package metadata", e);
        }
    }

    public static boolean v() {
        return k;
    }

    public static void x(String str) {
        l = str;
    }

    private void y() {
        this.e.h(this.c.e());
        this.c.r();
        this.e.g();
    }

    public void a(l lVar) {
        if (this.h && this.e.e(null) && !s(lVar)) {
            File file = new File(this.g.getFilesDir(), "ReactNativeDevBundle.js");
            if (file.exists()) {
                file.delete();
            }
        }
    }

    public void b() {
        this.c.a();
        this.e.g();
        this.e.f();
    }

    public boolean c() {
        return this.a;
    }

    public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) {
        CodePushNativeModule codePushNativeModule = new CodePushNativeModule(reactApplicationContext, this, this.c, this.d, this.e);
        CodePushDialog codePushDialog = new CodePushDialog(reactApplicationContext);
        ArrayList arrayList = new ArrayList();
        arrayList.add(codePushNativeModule);
        arrayList.add(codePushDialog);
        return arrayList;
    }

    public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {
        return new ArrayList();
    }

    public String d() {
        return l;
    }

    public String e() {
        return this.b;
    }

    long f() {
        try {
            return Long.parseLong(this.g.getResources().getString(this.g.getResources().getIdentifier("CODE_PUSH_APK_BUILD_TIME", "string", this.g.getPackageName())).replaceAll("\"", ""));
        } catch (Exception e) {
            throw new b("Error in getting binary resources modified time", e);
        }
    }

    public String h() {
        return this.f;
    }

    public String k(String str) {
        String str2;
        this.b = str;
        String str3 = "assets://" + str;
        try {
            str2 = this.c.f(this.b);
        } catch (com.microsoft.clarity.un.c e) {
            e.h(e.getMessage());
            b();
            str2 = null;
        }
        if (str2 == null) {
            e.j(str3);
            i = true;
            return str3;
        }
        JSONObject e2 = this.c.e();
        if (t(e2)) {
            e.j(str2);
            i = false;
            return str2;
        }
        this.a = false;
        if (!this.h || o(e2)) {
            b();
        }
        e.j(str3);
        i = true;
        return str3;
    }

    public String l() {
        return n;
    }

    public String n() {
        return m;
    }

    void p() {
        this.a = false;
        JSONObject c = this.e.c();
        if (c != null) {
            JSONObject e = this.c.e();
            if (e == null || (!t(e) && o(e))) {
                e.h("Skipping initializeUpdateAfterRestart(), binary version is newer");
                return;
            }
            try {
                if (c.getBoolean("isLoading")) {
                    e.h("Update did not finish loading the last time, rolling back to a previous version.");
                    j = true;
                    y();
                } else {
                    this.a = true;
                    this.e.i(c.getString("hash"), true);
                }
            } catch (JSONException e2) {
                throw new b("Unable to read pending update metadata stored in SharedPreferences", e2);
            }
        }
    }

    void q() {
        o = null;
    }

    boolean r() {
        return this.h;
    }

    boolean u() {
        return i;
    }

    boolean w() {
        return j;
    }

    public void z(boolean z) {
        j = z;
    }
}