Shinigami ID v1.1.3版本的 MD5 值为:c381e85feac697f048c400ae89b7b92d
以下内容为反编译后的 w2.java 源代码,内容仅作参考
package i4;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.Bundle;
import android.text.TextUtils;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Objects;
public final class w2 extends k3 {
public String A;
public String B;
public long C;
public String D;
public String f7287q;
public String f7288r;
public int f7289s;
public String f7290t;
public long f7291u;
public final long v;
public List f7292w;
public String x;
public int f7293y;
public String f7294z;
public w2(g4 g4Var, long j10) {
super(g4Var);
this.C = 0L;
this.D = null;
this.v = j10;
}
@Override
public final boolean l() {
return true;
}
public final void m() {
String str;
boolean z10;
int n10;
List list;
Bundle t10;
Integer valueOf;
String C;
String str2;
String packageName = this.f6903o.f6918o.getPackageName();
PackageManager packageManager = this.f6903o.f6918o.getPackageManager();
String str3 = "unknown";
String str4 = "Unknown";
int i10 = Integer.MIN_VALUE;
String str5 = "";
if (packageManager == null) {
this.f6903o.a().f6874t.c("PackageManager is null, app identity information might be inaccurate. appId", e3.u(packageName));
} else {
try {
str3 = packageManager.getInstallerPackageName(packageName);
} catch (IllegalArgumentException unused) {
this.f6903o.a().f6874t.c("Error retrieving app installer package name. appId", e3.u(packageName));
}
if (str3 == null) {
str3 = "manual_install";
} else if ("com.android.vending".equals(str3)) {
str3 = "";
}
try {
PackageInfo packageInfo = packageManager.getPackageInfo(this.f6903o.f6918o.getPackageName(), 0);
if (packageInfo != null) {
CharSequence applicationLabel = packageManager.getApplicationLabel(packageInfo.applicationInfo);
String obj = !TextUtils.isEmpty(applicationLabel) ? applicationLabel.toString() : "Unknown";
try {
str4 = packageInfo.versionName;
i10 = packageInfo.versionCode;
} catch (PackageManager.NameNotFoundException unused2) {
str = str4;
str4 = obj;
this.f6903o.a().f6874t.d("Error retrieving package info. appId, appName", e3.u(packageName), str4);
str4 = str;
this.f7287q = packageName;
this.f7290t = str3;
this.f7288r = str4;
this.f7289s = i10;
this.f7291u = 0L;
if (TextUtils.isEmpty(this.f6903o.f6919p)) {
}
n10 = this.f6903o.n();
switch (n10) {
}
this.f7294z = "";
this.A = "";
Objects.requireNonNull(this.f6903o);
if (z10) {
}
list = null;
g4 g4Var = this.f6903o;
C = kb.y.C(g4Var.f6918o, g4Var.G);
if (TextUtils.isEmpty(C)) {
}
this.f7294z = str5;
if (!TextUtils.isEmpty(C)) {
}
if (n10 == 0) {
}
this.f7292w = null;
Objects.requireNonNull(this.f6903o);
f fVar = this.f6903o.f6924u;
Objects.requireNonNull(fVar);
l3.p.e("analytics.safelisted_events");
t10 = fVar.t();
if (t10 != null) {
}
valueOf = null;
if (valueOf != null) {
}
if (list != null) {
}
this.f7292w = list;
if (packageManager == null) {
}
}
}
} catch (PackageManager.NameNotFoundException unused3) {
str = "Unknown";
}
}
this.f7287q = packageName;
this.f7290t = str3;
this.f7288r = str4;
this.f7289s = i10;
this.f7291u = 0L;
z10 = TextUtils.isEmpty(this.f6903o.f6919p) && "am".equals(this.f6903o.f6920q);
n10 = this.f6903o.n();
switch (n10) {
case 0:
this.f6903o.a().B.b("App measurement collection enabled");
break;
case 1:
this.f6903o.a().f6878z.b("App measurement deactivated via the manifest");
break;
case 2:
this.f6903o.a().B.b("App measurement deactivated via the init parameters");
break;
case 3:
this.f6903o.a().f6878z.b("App measurement disabled by setAnalyticsCollectionEnabled(false)");
break;
case 4:
this.f6903o.a().f6878z.b("App measurement disabled via the manifest");
break;
case 5:
this.f6903o.a().B.b("App measurement disabled via the init parameters");
break;
case 6:
this.f6903o.a().f6877y.b("App measurement deactivated via resources. This method is being deprecated. Please refer to https://firebase.google.com/support/guides/disable-analytics");
break;
case 7:
this.f6903o.a().f6878z.b("App measurement disabled via the global data collection setting");
break;
default:
this.f6903o.a().f6878z.b("App measurement disabled due to denied storage consent");
break;
}
this.f7294z = "";
this.A = "";
Objects.requireNonNull(this.f6903o);
if (z10) {
this.A = this.f6903o.f6919p;
}
list = null;
try {
g4 g4Var2 = this.f6903o;
C = kb.y.C(g4Var2.f6918o, g4Var2.G);
if (TextUtils.isEmpty(C)) {
str5 = C;
}
this.f7294z = str5;
if (!TextUtils.isEmpty(C)) {
g4 g4Var3 = this.f6903o;
Context context = g4Var3.f6918o;
String str6 = g4Var3.G;
l3.p.h(context);
Resources resources = context.getResources();
if (TextUtils.isEmpty(str6)) {
str6 = a4.a(context);
}
int identifier = resources.getIdentifier("admob_app_id", "string", str6);
if (identifier != 0) {
try {
str2 = resources.getString(identifier);
} catch (Resources.NotFoundException unused4) {
str2 = null;
}
this.A = str2;
}
str2 = null;
this.A = str2;
}
if (n10 == 0) {
this.f6903o.a().B.d("App measurement enabled for app package, google app id", this.f7287q, TextUtils.isEmpty(this.f7294z) ? this.A : this.f7294z);
}
} catch (IllegalStateException e10) {
this.f6903o.a().f6874t.d("Fetching Google App Id failed with exception. appId", e3.u(packageName), e10);
}
this.f7292w = null;
Objects.requireNonNull(this.f6903o);
f fVar2 = this.f6903o.f6924u;
Objects.requireNonNull(fVar2);
l3.p.e("analytics.safelisted_events");
t10 = fVar2.t();
if (t10 != null) {
fVar2.f6903o.a().f6874t.b("Failed to load metadata: Metadata bundle is null");
} else if (t10.containsKey("analytics.safelisted_events")) {
valueOf = Integer.valueOf(t10.getInt("analytics.safelisted_events"));
if (valueOf != null) {
try {
String[] stringArray = fVar2.f6903o.f6918o.getResources().getStringArray(valueOf.intValue());
if (stringArray != null) {
list = Arrays.asList(stringArray);
}
} catch (Resources.NotFoundException e11) {
fVar2.f6903o.a().f6874t.c("Failed to load string array from metadata: resource not found", e11);
}
}
if (list != null) {
if (list.isEmpty()) {
this.f6903o.a().f6877y.b("Safelisted event list is empty. Ignoring");
} else {
Iterator it = list.iterator();
while (it.hasNext()) {
if (!this.f6903o.B().R("safelisted event", (String) it.next())) {
}
}
}
if (packageManager == null) {
this.f7293y = s3.a.q(this.f6903o.f6918o) ? 1 : 0;
return;
} else {
this.f7293y = 0;
return;
}
}
this.f7292w = list;
if (packageManager == null) {
}
}
valueOf = null;
if (valueOf != null) {
}
if (list != null) {
}
this.f7292w = list;
if (packageManager == null) {
}
}
public final String n() {
j();
l3.p.h(this.f7287q);
return this.f7287q;
}
public final String o() {
i();
j();
l3.p.h(this.f7294z);
return this.f7294z;
}
public final void p() {
String format;
i();
if (this.f6903o.u().q().f(g.ANALYTICS_STORAGE)) {
byte[] bArr = new byte[16];
this.f6903o.B().u().nextBytes(bArr);
format = String.format(Locale.US, "%032x", new BigInteger(1, bArr));
} else {
this.f6903o.a().A.b("Analytics Storage consent is not granted");
format = null;
}
c3 c3Var = this.f6903o.a().A;
Object[] objArr = new Object[1];
objArr[0] = format == null ? "null" : "not null";
c3Var.b(String.format("Resetting session stitching token to %s", objArr));
this.B = format;
Objects.requireNonNull(this.f6903o.B);
this.C = System.currentTimeMillis();
}
}