Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.applovin.impl.sdk.utils;
import android.content.ContentResolver;
import android.content.Context;
import android.provider.Settings;
import androidx.annotation.Nullable;
import com.applovin.sdk.AppLovinSdkUtils;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import java.util.Collection;
import java.util.HashSet;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class d {
private static boolean a = true;
private static final Object f1405b = new Object();
private static final Collection<CountDownLatch> c = new HashSet();
private static boolean d = false;
private static a e = null;
public static class a {
private boolean a;
private String f1406b = "";
private EnumC0107a c = EnumC0107a.NOT_SET;
public enum EnumC0107a {
NOT_SET("dnt_not_set"),
ON("dnt_on"),
OFF("dnt_off");
private final String d;
EnumC0107a(String str) {
this.d = str;
}
public String a() {
return this.d;
}
}
public void a(EnumC0107a enumC0107a) {
this.c = enumC0107a;
}
public String b() {
return this.f1406b;
}
public EnumC0107a c() {
return this.c;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof a) {
a aVar = (a) obj;
if (aVar.a(this) && a() == aVar.a()) {
String b2 = b();
String b3 = aVar.b();
if (b2 != null ? b2.equals(b3) : b3 == null) {
EnumC0107a c = c();
EnumC0107a c2 = aVar.c();
return c != null ? c.equals(c2) : c2 == null;
}
return false;
}
return false;
}
return false;
}
public int hashCode() {
int i = a() ? 79 : 97;
String b2 = b();
int hashCode = ((i + 59) * 59) + (b2 == null ? 43 : b2.hashCode());
EnumC0107a c = c();
return (hashCode * 59) + (c != null ? c.hashCode() : 43);
}
public String toString() {
return "AdvertisingInfoCollector.AdvertisingIdInformation(adTrackingLimited=" + a() + ", advertisingId=" + b() + ", dntCode=" + c() + ")";
}
public void a(String str) {
this.f1406b = str;
}
public void a(boolean z) {
this.a = z;
}
protected boolean a(Object obj) {
return obj instanceof a;
}
public boolean a() {
return this.a;
}
}
@Nullable
public static a a(Context context) {
return b(context);
}
@Nullable
private static a b(Context context) {
a aVar;
HashSet<CountDownLatch> hashSet;
w.i();
Object obj = f1405b;
synchronized (obj) {
if (d) {
return e;
}
Collection<CountDownLatch> collection = c;
boolean isEmpty = collection.isEmpty();
CountDownLatch countDownLatch = new CountDownLatch(1);
collection.add(countDownLatch);
if (isEmpty) {
a c2 = c(context);
synchronized (obj) {
d = true;
e = c2;
hashSet = new HashSet(collection);
collection.clear();
}
for (CountDownLatch countDownLatch2 : hashSet) {
countDownLatch2.countDown();
}
}
try {
if (!countDownLatch.await(60L, TimeUnit.SECONDS)) {
com.applovin.impl.sdk.y.j("DataCollector", "Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }: collection timeout");
}
} catch (InterruptedException e2) {
com.applovin.impl.sdk.y.c("DataCollector", "Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }", e2);
}
synchronized (f1405b) {
aVar = e;
}
return aVar;
}
}
private static a c(Context context) {
a collectGoogleAdvertisingInfo = collectGoogleAdvertisingInfo(context);
if (collectGoogleAdvertisingInfo == null) {
collectGoogleAdvertisingInfo = collectFireOSAdvertisingInfo(context);
}
return collectGoogleAdvertisingInfo == null ? new a() : collectGoogleAdvertisingInfo;
}
@Nullable
private static a collectFireOSAdvertisingInfo(Context context) {
if (a) {
try {
ContentResolver contentResolver = context.getContentResolver();
a aVar = new a();
aVar.a(StringUtils.emptyIfNull(Settings.Secure.getString(contentResolver, "advertising_id")));
boolean z = Settings.Secure.getInt(contentResolver, "limit_ad_tracking") != 0;
aVar.a(z);
aVar.a(z ? a.EnumC0107a.ON : a.EnumC0107a.OFF);
return aVar;
} catch (Settings.SettingNotFoundException e2) {
com.applovin.impl.sdk.y.c("DataCollector", "Unable to determine if Fire OS limited ad tracking is turned on", e2);
} catch (Throwable th) {
com.applovin.impl.sdk.y.c("DataCollector", "Unable to collect Fire OS IDFA", th);
}
}
a = false;
return null;
}
@Nullable
private static a collectGoogleAdvertisingInfo(Context context) {
w.i();
if (a()) {
try {
a aVar = new a();
AdvertisingIdClient.Info advertisingIdInfo = AdvertisingIdClient.getAdvertisingIdInfo(context);
boolean isLimitAdTrackingEnabled = advertisingIdInfo.isLimitAdTrackingEnabled();
aVar.a(isLimitAdTrackingEnabled);
aVar.a(isLimitAdTrackingEnabled ? a.EnumC0107a.ON : a.EnumC0107a.OFF);
aVar.a(advertisingIdInfo.getId());
return aVar;
} catch (Throwable th) {
if (AppLovinSdkUtils.isFireOS(context)) {
return null;
}
com.applovin.impl.sdk.y.c("DataCollector", "Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }", th);
return null;
}
} else if (AppLovinSdkUtils.isFireOS(context)) {
return null;
} else {
com.applovin.impl.sdk.y.j("DataCollector", "Could not collect Google Advertising ID - this will negatively impact your eCPMs! Please integrate the Google Play Services SDK into your application. More info can be found online at http://developer.android.com/google/play-services/setup.html. If you're sure you've integrated the SDK and are still seeing this message, you may need to add a ProGuard exception: -keep public class com.google.android.gms.** { public protected *; }");
return null;
}
}
public static boolean a() {
return w.b("com.google.android.gms.ads.identifier.AdvertisingIdClient");
}
}