正在查看: Cantique de Louanges v12 应用的 xh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 xh.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.startapp.sdk.internal;
import android.app.Activity;
import android.app.Application;
import android.app.Service;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import com.startapp.sdk.ads.banner.BannerMetaData;
import com.startapp.sdk.ads.interstitials.OverlayActivity;
import com.startapp.sdk.adsbase.AdsCommonMetaData;
import com.startapp.sdk.adsbase.SDKAdPreferences;
import com.startapp.sdk.adsbase.StartAppAd;
import com.startapp.sdk.adsbase.adinformation.AdInformationMetaData;
import com.startapp.sdk.adsbase.cache.CacheMetaData;
import com.startapp.sdk.adsbase.remoteconfig.MetaData;
import com.startapp.sdk.adsbase.remoteconfig.MetaDataRequest$RequestReason;
import com.startapp.sdk.adsbase.remoteconfig.MraidMetadata;
import java.lang.Thread;
import java.util.HashMap;
import java.util.TreeMap;
import java.util.WeakHashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicBoolean;
public final class xh implements z0 {
public static int u;
public SDKAdPreferences a;
public final boolean b;
public boolean c;
public boolean d;
public boolean e;
public long f;
public Application g;
public final HashMap h;
public vh i;
public final AtomicBoolean j;
public Activity k;
public boolean l;
public boolean m;
public boolean n;
public TreeMap o;
public Bundle p;
public boolean q;
public boolean r;
public y0 s;
public boolean t;
public xh() {
WeakHashMap weakHashMap = gj.a;
this.b = true;
this.c = false;
this.d = false;
this.e = false;
this.h = new HashMap();
this.j = new AtomicBoolean();
this.l = false;
this.m = true;
this.n = false;
this.p = null;
}
public static void c(Context context) {
final Context b = a1.b(context);
v8 v8Var = (v8) com.startapp.sdk.components.a.a(b).y.a();
v8Var.a.post(new Runnable() {
@Override
public final void run() {
xh.e(b);
}
});
}
public static boolean d(Context context) {
SharedPreferences sharedPreferences = (SharedPreferences) com.startapp.sdk.components.a.a(context).H.a();
if (sharedPreferences.contains("isma")) {
return sharedPreferences.getBoolean("isma", false) ? sharedPreferences.contains("iscd") && !sharedPreferences.getBoolean("iscd", false) : (sharedPreferences.contains("iscd") && sharedPreferences.getBoolean("iscd", false)) ? false : true;
}
if (sharedPreferences.contains("iscd")) {
return !sharedPreferences.getBoolean("iscd", false);
}
return true;
}
public static void e(Context context) {
wh.a.a(context, null, null, null, null, true);
}
public final void a(Context context, final String str, final String str2, final SDKAdPreferences sDKAdPreferences, final Runnable runnable) {
final Context b = a1.b(context);
try {
((hg) com.startapp.sdk.components.a.a(b).u.a()).a(256);
} catch (Throwable unused) {
}
v8 v8Var = (v8) com.startapp.sdk.components.a.a(b).y.a();
v8Var.a.post(new Runnable() {
@Override
public final void run() {
xh.this.b(b, str, str2, sDKAdPreferences, runnable);
}
});
}
public final void b(Context context, String str, String str2, SDKAdPreferences sDKAdPreferences, Runnable runnable) {
a(context, str, str2, sDKAdPreferences, runnable, false);
}
public final void f(Context context) {
kg kgVar = (kg) com.startapp.sdk.components.a.a(context).F.a();
int i = kgVar.getInt("shared_prefs_app_version_id", -1);
int a = s0.a(context);
if (i > 0 && a > i) {
this.n = true;
}
jg edit = kgVar.edit();
edit.a("shared_prefs_app_version_id", Integer.valueOf(a));
edit.a.putInt("shared_prefs_app_version_id", a);
edit.apply();
}
public final void g(Context context) {
com.startapp.sdk.components.a a = com.startapp.sdk.components.a.a(context);
jg edit = ((kg) a.F.a()).edit();
Boolean bool = Boolean.FALSE;
edit.a("periodicInfoEventPaused", bool);
edit.a.putBoolean("periodicInfoEventPaused", false);
edit.a("periodicMetadataPaused", bool);
edit.a.putBoolean("periodicMetadataPaused", false);
edit.apply();
th thVar = new th(this, context, a);
if (MetaData.C().l0()) {
thVar.a(null, false);
} else {
MetaData.C().a(thVar);
}
}
public final void b(Context context) {
Context a = a1.a(context);
Application application = a instanceof Application ? (Application) a : context instanceof Application ? (Application) context : context instanceof Activity ? ((Activity) context).getApplication() : context instanceof Service ? ((Service) context).getApplication() : null;
if (application == null || this.s != null) {
return;
}
y0 y0Var = new y0(this);
this.s = y0Var;
application.registerActivityLifecycleCallbacks(y0Var);
try {
cg cgVar = ((hg) com.startapp.sdk.components.a.a(context).u.a()).e;
if (cgVar == null) {
throw new RuntimeException();
}
application.registerActivityLifecycleCallbacks(cgVar);
} catch (Throwable unused) {
}
}
public final void a(Context context, String str, String str2, SDKAdPreferences sDKAdPreferences, Runnable runnable, boolean z) {
boolean z2;
MetaDataRequest$RequestReason metaDataRequest$RequestReason;
boolean z3;
boolean z4;
String c;
boolean contains;
WeakHashMap weakHashMap = gj.a;
int i = u;
boolean z5 = false;
if (i == 0 && z) {
nc ncVar = new nc(context);
if (ncVar.c != null || ncVar.d != null) {
jg edit = ((kg) com.startapp.sdk.components.a.a(context).H.a()).edit();
Boolean bool = ncVar.c;
if (bool != null) {
boolean equals = Boolean.TRUE.equals(bool);
edit.a("isma", Boolean.valueOf(equals));
edit.a.putBoolean("isma", equals);
}
Boolean bool2 = ncVar.d;
if (bool2 != null) {
boolean equals2 = Boolean.TRUE.equals(bool2);
edit.a("iscd", Boolean.valueOf(equals2));
edit.a.putBoolean("iscd", equals2);
}
edit.apply();
}
StartAppAd.enableConsent(context, ncVar.b);
str2 = ncVar.a;
if (TextUtils.isEmpty(str2)) {
t0 t0Var = (t0) com.startapp.sdk.components.a.a(context).m.a();
synchronized (t0Var.a) {
contains = t0Var.b.contains("2696a7f502faed4b");
}
if (contains) {
str2 = t0Var.a();
}
}
if (!TextUtils.isEmpty(str2)) {
z = false;
}
}
int i2 = z ? 1 : 2;
if (i2 > i) {
u = i2;
if (z) {
metaDataRequest$RequestReason = MetaDataRequest$RequestReason.IMPLICIT_LAUNCH;
} else {
MetaDataRequest$RequestReason metaDataRequest$RequestReason2 = MetaDataRequest$RequestReason.LAUNCH;
if (TextUtils.isEmpty(str2)) {
if (!gj.e(context)) {
int i3 = s0.a;
try {
z3 = i7.a(context);
} catch (Throwable unused) {
z3 = false;
}
if (!z3) {
Log.w("StartAppSDK", new IllegalArgumentException("\n+-------------------------------------------------------------+\n| S T A R T A P P |\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\n| Invalid App ID passed to init, please provide valid App ID |\n| |\n| https://support.start.io/hc/en-us/articles/360014774799 |\n+-------------------------------------------------------------+\n"));
}
}
throw new IllegalArgumentException("\n+-------------------------------------------------------------+\n| S T A R T A P P |\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\n| Invalid App ID passed to init, please provide valid App ID |\n| |\n| https://support.start.io/hc/en-us/articles/360014774799 |\n+-------------------------------------------------------------+\n");
}
((t0) com.startapp.sdk.components.a.a(context).m.a()).a(str, str2);
this.a = sDKAdPreferences;
p7.b(context, "shared_prefs_sdk_ad_prefs", sDKAdPreferences);
metaDataRequest$RequestReason = metaDataRequest$RequestReason2;
}
if (i == 0) {
if (Math.random() < 0.0d) {
Log.i("StartAppSDK", "!SDK-VERSION-STRING!:com.startapp.startappsdk:inapp-sdk:5.1.0");
}
try {
com.startapp.sdk.components.a a = com.startapp.sdk.components.a.a(context);
a.K.a();
l0 l0Var = (l0) a.I.a();
try {
Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
if (!(defaultUncaughtExceptionHandler instanceof l0)) {
Thread.setDefaultUncaughtExceptionHandler(l0Var);
l0Var.a = defaultUncaughtExceptionHandler;
}
} catch (Throwable th) {
o9.a(th);
}
x0 x0Var = (x0) a.P.a();
x0Var.a.getClass();
long elapsedRealtime = SystemClock.elapsedRealtime();
x0Var.d = elapsedRealtime;
x0Var.e = elapsedRealtime;
((fa) a.q.a()).a();
((m0) a.a.a()).a();
if (!s0.a(context, "android.permission.INTERNET") || !s0.a(context, "android.permission.ACCESS_NETWORK_STATE")) {
gj.a(context, 6, "Please grant the mandatory permissions : INTERNET & ACCESS_NETWORK_STATE, SDK could not be initialized.", true);
}
try {
ActivityInfo[] activityInfoArr = context.getPackageManager().getPackageInfo(context.getPackageName(), 1).activities;
z4 = false;
int i4 = 0;
while (!z4) {
try {
if (i4 >= activityInfoArr.length) {
break;
}
int i5 = i4 + 1;
ActivityInfo activityInfo = activityInfoArr[i4];
if (activityInfo.name.equals(OverlayActivity.class.getName())) {
int i6 = activityInfo.flags & 512;
i4 = i5;
z4 = i6 == 0;
} else {
i4 = i5;
}
} catch (PackageManager.NameNotFoundException | Exception unused2) {
}
}
} catch (PackageManager.NameNotFoundException | Exception unused3) {
z4 = false;
}
this.m = !z4;
((com.startapp.sdk.common.advertisingid.b) a.h.a()).a(d(context));
((kl) ((dl) a.b.a())).a();
b(context);
com.startapp.sdk.adsbase.f.c(context);
((ti) a.R.a()).b();
jd jdVar = (jd) a.S.a();
MraidMetadata mraidMetadata = (MraidMetadata) jdVar.c.a();
if (mraidMetadata != null && (c = mraidMetadata.c()) != null) {
((Executor) jdVar.a.a()).execute(new id(jdVar, c, mraidMetadata.d()));
}
a.G.a();
MetaData.C().a((t6) a.j.a());
WeakHashMap weakHashMap2 = gj.a;
MetaData.c(context);
AdsCommonMetaData.a(context);
BannerMetaData.a(context);
if (this.b) {
CacheMetaData.a(context);
}
AdInformationMetaData.a(context);
v6.a(context);
f(context);
a(context);
g(context);
if (context instanceof Application) {
Application application = (Application) context;
this.g = application;
if (this.j.compareAndSet(false, true) && this.i == null) {
vh vhVar = new vh();
application.registerActivityLifecycleCallbacks(vhVar);
this.i = vhVar;
}
}
gj.a(context, 4, "StartApp SDK initialized", true);
} catch (Throwable th2) {
o9.a(th2);
}
}
eh.d.a(context, metaDataRequest$RequestReason);
} else if (!z && !TextUtils.isEmpty(str2)) {
if (TextUtils.isEmpty(str2)) {
if (!gj.e(context)) {
int i7 = s0.a;
try {
z2 = i7.a(context);
} catch (Throwable unused4) {
z2 = false;
}
if (!z2) {
Log.w("StartAppSDK", new IllegalArgumentException("\n+-------------------------------------------------------------+\n| S T A R T A P P |\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\n| Invalid App ID passed to init, please provide valid App ID |\n| |\n| https://support.start.io/hc/en-us/articles/360014774799 |\n+-------------------------------------------------------------+\n"));
}
}
throw new IllegalArgumentException("\n+-------------------------------------------------------------+\n| S T A R T A P P |\n| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |\n| Invalid App ID passed to init, please provide valid App ID |\n| |\n| https://support.start.io/hc/en-us/articles/360014774799 |\n+-------------------------------------------------------------+\n");
}
z5 = ((t0) com.startapp.sdk.components.a.a(context).m.a()).a(str, str2);
if (z5) {
eh.d.a(context, MetaDataRequest$RequestReason.LAUNCH);
}
}
j0.a(runnable);
}
public static void a(android.content.Context r13) {
throw new UnsupportedOperationException("Method not decompiled: com.startapp.sdk.internal.xh.a(android.content.Context):void");
}
}