package com.tencent.bugly.crashreport.biz; import android.app.Application; import android.content.Context; import android.os.Build; import com.tencent.bugly.BuglyStrategy; import com.tencent.bugly.crashreport.biz.a.AnonymousClass2; import com.tencent.bugly.crashreport.common.strategy.StrategyBean; import com.tencent.bugly.proguard.w; import com.tencent.bugly.proguard.x; import com.tencent.bugly.proguard.z; /* compiled from: BUGLY */ /* loaded from: classes.dex */ public class b { public static a a = null; private static boolean b = false; private static int c = 10; private static long d = 300000; private static long e = 30000; private static long f = 0; private static int g = 0; private static long h = 0; private static long i = 0; private static long j = 0; private static Application.ActivityLifecycleCallbacks k = null; private static Class l = null; private static boolean m = true; static /* synthetic */ String a(String str, String str2) { return z.a() + " " + str + " " + str2 + "\n"; } static /* synthetic */ int g() { int i2 = g; g = i2 + 1; return i2; } public static void a(final Context context, final BuglyStrategy buglyStrategy) { long j2; if (b) { return; } m = com.tencent.bugly.crashreport.common.info.a.a(context).e; a = new a(context, m); b = true; if (buglyStrategy != null) { l = buglyStrategy.getUserInfoActivity(); j2 = buglyStrategy.getAppReportDelay(); } else { j2 = 0; } if (j2 <= 0) { c(context, buglyStrategy); } else { w.a().a(new Runnable() { // from class: com.tencent.bugly.crashreport.biz.b.1 @Override // java.lang.Runnable public final void run() { b.c(context, buglyStrategy); } }, j2); } } /* JADX INFO: Access modifiers changed from: private */ /* JADX WARN: Removed duplicated region for block: B:27:0x0068 A[RETURN] */ /* JADX WARN: Removed duplicated region for block: B:29:0x0069 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public static void c(android.content.Context r14, com.tencent.bugly.BuglyStrategy r15) { /* Method dump skipped, instructions count: 273 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: com.tencent.bugly.crashreport.biz.b.c(android.content.Context, com.tencent.bugly.BuglyStrategy):void"); } public static void a(long j2) { if (j2 < 0) { j2 = com.tencent.bugly.crashreport.common.strategy.a.a().c().q; } f = j2; } public static void a(StrategyBean strategyBean, boolean z) { w a2; a aVar = a; if (aVar != null && !z && (a2 = w.a()) != null) { a2.a(aVar.new AnonymousClass2()); } if (strategyBean == null) { return; } long j2 = strategyBean.q; if (j2 > 0) { e = j2; } int i2 = strategyBean.w; if (i2 > 0) { c = i2; } long j3 = strategyBean.x; if (j3 > 0) { d = j3; } } public static void a() { a aVar = a; if (aVar != null) { aVar.a(2, false, 0L); } } public static void a(Context context) { if (!b || context == null) { return; } if (Build.VERSION.SDK_INT >= 14) { Application application = context.getApplicationContext() instanceof Application ? (Application) context.getApplicationContext() : null; if (application != null) { try { if (k != null) { application.unregisterActivityLifecycleCallbacks(k); } } catch (Exception e2) { if (!x.a(e2)) { e2.printStackTrace(); } } } } b = false; } }