硬汉视频 v2.6.9版本的 MD5 值为:ce2c2cd97c55025851728167c03886bc

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


package tv.i999.inhand.Core;

import android.app.ActivityManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Process;
import android.provider.Settings;
import android.text.TextUtils;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.igexin.sdk.PushManager;
import e.b.a.b;
import tv.i999.inhand.Service.PushIntentService;
import tv.i999.inhand.Service.PushService;
import tv.i999.inhand.Utils.Drm;
public class BG8Application extends d.i.b {
    public static boolean a = false;
    public static int b = 0;
    public static boolean f6686i = false;
    private static String f6687j = null;
    private static String k = "";
    private static BG8Application l;
    private static Boolean m;

    public class a implements f.a.o.c<Throwable> {
        a(BG8Application bG8Application) {
        }

        @Override
        public void a(Throwable th) throws Exception {
            tv.i999.inhand.Utils.c.e("DEBUG", "RxError:" + th.getMessage());
            FirebaseCrashlytics.getInstance().recordException(th);
        }
    }

    public static String B() {
        return f6687j;
    }

    public static int C() {
        return g().getSharedPreferences("member_account", 0).getInt("VIDEO_WATCH_COUNT", 0);
    }

    public static Boolean D() {
        SharedPreferences sharedPreferences = g().getSharedPreferences("once", 0);
        return Boolean.valueOf(sharedPreferences.getBoolean("VIP_LAST_DAY_" + b.b().p(), false));
    }

    public static boolean F() {
        if (m == null) {
            Double valueOf = Double.valueOf(tv.i999.inhand.MVVM.b.d.getmApiConfig().e().getData().getTestSpeedRatio());
            m = Boolean.valueOf(valueOf != null && valueOf.doubleValue() >= Double.valueOf(Math.random()).doubleValue());
        }
        return m.booleanValue();
    }

    private void G() {
        f.a.q.a.u(new a(this));
    }

    public static void H(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("member_account", 0).edit();
        edit.putString("API_HOST", str);
        edit.commit();
    }

    private void I() {
        try {
            b = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;
            f6687j = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
            getResources().getConfiguration().locale.getCountry();
            String str = Build.MANUFACTURER;
            String str2 = Build.MODEL;
            k = b(str) + " " + str2;
            if (str2.startsWith(str)) {
                k = b(str2);
            }
            if (getResources().getConfiguration().locale.getCountry().toUpperCase().equals("CN")) {
                f6686i = true;
            } else {
                f6686i = false;
            }
        } catch (Exception unused) {
            b = 0;
            f6687j = "1.0.0";
            f6686i = true;
        }
    }

    public static void J(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putString("CHANNEL_CODE", str);
        edit.commit();
    }

    public static Boolean K(boolean z) {
        SharedPreferences.Editor edit = g().getSharedPreferences("IS_DEBUG_HOST", 0).edit();
        edit.putBoolean("IS_DEBUG_HOST", z);
        return Boolean.valueOf(edit.commit());
    }

    public static void L(int i2) {
        g().getSharedPreferences("announce", 0).edit().putInt("jsonAnnounce", i2).commit();
    }

    public static void M(boolean z) {
    }

    public static void N() {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putBoolean("MemberTutorialDialog", true);
        edit.apply();
    }

    public static void Q(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("member_account", 0).edit();
        edit.putString("memberEmail", str);
        edit.commit();
    }

    public static void R(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("member_account", 0).edit();
        edit.putString("memberPhone", str);
        edit.commit();
    }

    public static void T(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("rawApiConfig", 0).edit();
        edit.putString("apiConfig", str);
        edit.commit();
    }

    public static void V() {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putLong("REPORT_LAST_TIME", System.currentTimeMillis());
        edit.commit();
    }

    public static void W(String str, Integer num) {
        SharedPreferences.Editor edit = g().getSharedPreferences("announce", 0).edit();
        edit.putInt(str, num.intValue());
        edit.commit();
    }

    public static void X(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("rawApiConfig", 0).edit();
        edit.putString("SYSTEM_CONFIG", str);
        edit.apply();
    }

    public static void Y(String str) {
        SharedPreferences.Editor edit = g().getSharedPreferences("member_account", 0).edit();
        edit.putString("TOKEN", str);
        edit.commit();
    }

    public static void a() {
        SharedPreferences.Editor edit = g().getSharedPreferences("member_account", 0).edit();
        edit.putInt("VIDEO_WATCH_COUNT", C() + 1);
        edit.commit();
    }

    public static void a0(Boolean bool) {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putBoolean("VIP_LAST_DAY_" + b.b().p(), bool.booleanValue());
        edit.commit();
    }

    private String b(String str) {
        char[] charArray;
        if (TextUtils.isEmpty(str)) {
            return str;
        }
        String str2 = "";
        boolean z = true;
        for (char c : str.toCharArray()) {
            if (z && Character.isLetter(c)) {
                str2 = str2 + Character.toUpperCase(c);
                z = false;
            } else {
                if (Character.isWhitespace(c)) {
                    z = true;
                }
                str2 = str2 + c;
            }
        }
        return str2;
    }

    private static boolean c(String str) {
        if (str == null || str.isEmpty()) {
            return false;
        }
        for (char c : str.toCharArray()) {
            if (c != '0') {
                return true;
            }
        }
        return false;
    }

    public static String e() {
        try {
            String string = Settings.Secure.getString(g().getContentResolver(), "android_id");
            if (c(string)) {
                return string;
            }
        } catch (Exception e2) {
            e2.printStackTrace();
        }
        try {
            String drmDeviceID = Drm.INSTANCE.getDrmDeviceID();
            if (c(drmDeviceID)) {
                return drmDeviceID;
            }
        } catch (Exception e3) {
            e3.printStackTrace();
        }
        try {
            String customUUID = Drm.INSTANCE.getCustomUUID();
            if (c(customUUID)) {
                return customUUID;
            }
        } catch (Exception e4) {
            e4.printStackTrace();
        }
        return Drm.INSTANCE.getCustomUUID();
    }

    public static String f() {
        return g().getSharedPreferences("member_account", 0).getString("API_HOST", "https://api.api98.xyz/s1/");
    }

    public static Context g() {
        BG8Application bG8Application = l;
        if (bG8Application != null) {
            return bG8Application.getApplicationContext();
        }
        return null;
    }

    public static String h() {
        return g().getSharedPreferences("once", 0).getString("CHANNEL_CODE", "");
    }

    public static String i() {
        return "";
    }

    public static Boolean k() {
        return Boolean.valueOf(g().getSharedPreferences("IS_DEBUG_HOST", 0).getBoolean("IS_DEBUG_HOST", false));
    }

    public static int l() {
        return g().getSharedPreferences("announce", 0).getInt("jsonAnnounce", 0);
    }

    public static Boolean m() {
        return Boolean.valueOf(g().getSharedPreferences("once", 0).getBoolean("MemberTutorialDialog", false));
    }

    public static String q() {
        return g().getSharedPreferences("member_account", 0).getString("memberEmail", "");
    }

    public static String r() {
        return g().getSharedPreferences("member_account", 0).getString("memberPhone", "");
    }

    public static String t() {
        return g().getSharedPreferences("rawApiConfig", 0).getString("apiConfig", "");
    }

    public static Long v() {
        return Long.valueOf(g().getSharedPreferences("once", 0).getLong("REPORT_LAST_TIME", 0L));
    }

    public static int w(String str) {
        return g().getSharedPreferences("announce", 0).getInt(str, 0);
    }

    public static String x() {
        return g().getSharedPreferences("rawApiConfig", 0).getString("SYSTEM_CONFIG", "");
    }

    public static int y() {
        return (int) (System.currentTimeMillis() / 1000);
    }

    public static String z() {
        return g().getSharedPreferences("member_account", 0).getString("TOKEN", "");
    }

    public Boolean A() {
        return Boolean.valueOf(g().getSharedPreferences("once", 0).getBoolean("TUTORIAL_NEXT_2.6.9", false));
    }

    public boolean E() {
        int myPid = Process.myPid();
        for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : ((ActivityManager) getSystemService("activity")).getRunningAppProcesses()) {
            if (runningAppProcessInfo.pid == myPid) {
                return getApplicationInfo().packageName.equals(runningAppProcessInfo.processName);
            }
        }
        return false;
    }

    public void O(Long l2) {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putLong("OPEN_INSTALL_TIME", l2.longValue());
        edit.commit();
    }

    public void P(int i2) {
        g().getSharedPreferences("announce", 0).edit().putInt("operation", i2).apply();
    }

    public void S(String str) {
        getSharedPreferences("QRCodeScreenshot", 0).edit().putString("qrCodeUrl", str).apply();
    }

    public void U(boolean z) {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putBoolean("RECORD_ACTIVE_USER", z);
        edit.commit();
    }

    public void Z() {
        SharedPreferences.Editor edit = g().getSharedPreferences("once", 0).edit();
        edit.putBoolean("TUTORIAL_NEXT_2.6.9", true);
        edit.apply();
    }

    public int b0() {
        return b;
    }

    public String c0() {
        return f6687j;
    }

    public String d() {
        return k;
    }

    public String j() {
        return f6686i ? "CN" : "NO";
    }

    public String n() {
        NetworkInfo.State state = ((ConnectivityManager) getSystemService("connectivity")).getNetworkInfo(1).getState();
        return (state == NetworkInfo.State.CONNECTED || state == NetworkInfo.State.CONNECTING) ? "wifi" : "";
    }

    public Long o() {
        return Long.valueOf(g().getSharedPreferences("once", 0).getLong("OPEN_INSTALL_TIME", 0L));
    }

    @Override
    public void onCreate() {
        super.onCreate();
        registerActivityLifecycleCallbacks(new c());
        l = this;
        I();
        b.c cVar = new b.c();
        cVar.b(true);
        cVar.c(true);
        cVar.d(true);
        cVar.a(this, "T297RPXYBC9YVPHMD7K7");
        G();
        if (E()) {
            System.loadLibrary("native-lib");
        }
        PushManager.getInstance().registerPushIntentService(getApplicationContext(), PushIntentService.class);
        PushManager.getInstance().initialize(getApplicationContext(), PushService.class);
    }

    public int p() {
        return g().getSharedPreferences("announce", 0).getInt("operation", 0);
    }

    public String s() {
        return getSharedPreferences("QRCodeScreenshot", 0).getString("qrCodeUrl", "");
    }

    public boolean u() {
        return g().getSharedPreferences("once", 0).getBoolean("RECORD_ACTIVE_USER", false);
    }
}