atsameip v0.1版本的 MD5 值为:28547cf98b0a2d02acb37969dcfb83e9
以下内容为反编译后的 c.java 源代码,内容仅作参考
package com.applovin.impl.sdk.utils;
import android.content.ContentResolver;
import android.content.Context;
import android.provider.Settings;
import com.applovin.impl.sdk.p;
import com.applovin.impl.sdk.w;
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 c {
private static boolean a = true;
private static final Object b = new Object();
private static final Collection<CountDownLatch> c = new HashSet();
private static boolean d = false;
private static p.a e = null;
public static p.a a(Context context) {
return b(context);
}
public static boolean a() {
return Utils.checkClassExistence("com.google.android.gms.ads.identifier.AdvertisingIdClient");
}
private static p.a b(Context context) {
p.a aVar;
HashSet<CountDownLatch> hashSet;
synchronized (b) {
if (d) {
return e;
}
boolean isEmpty = c.isEmpty();
CountDownLatch countDownLatch = new CountDownLatch(1);
c.add(countDownLatch);
if (isEmpty) {
p.a c2 = c(context);
synchronized (b) {
d = true;
e = c2;
hashSet = new HashSet(c);
c.clear();
}
for (CountDownLatch countDownLatch2 : hashSet) {
countDownLatch2.countDown();
}
}
try {
if (!countDownLatch.await(60L, TimeUnit.SECONDS) && w.a()) {
w.i("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) {
if (w.a()) {
w.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 (b) {
aVar = e;
}
return aVar;
}
}
private static p.a c(Context context) {
p.a d2 = d(context);
if (d2 == null) {
d2 = e(context);
}
return d2 == null ? new p.a() : d2;
}
private static p.a d(Context context) {
if (!a()) {
if (AppLovinSdkUtils.isFireOS(context) || !w.a()) {
return null;
}
w.i("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;
}
try {
p.a aVar = new p.a();
AdvertisingIdClient.Info advertisingIdInfo = AdvertisingIdClient.getAdvertisingIdInfo(context);
aVar.a = advertisingIdInfo.isLimitAdTrackingEnabled();
aVar.b = advertisingIdInfo.getId();
return aVar;
} catch (Throwable th) {
if (AppLovinSdkUtils.isFireOS(context) || !w.a()) {
return null;
}
w.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;
}
}
private static p.a e(Context context) {
String str;
if (a) {
try {
ContentResolver contentResolver = context.getContentResolver();
p.a aVar = new p.a();
aVar.b = StringUtils.emptyIfNull(Settings.Secure.getString(contentResolver, "advertising_id"));
aVar.a = Settings.Secure.getInt(contentResolver, "limit_ad_tracking") != 0;
return aVar;
} catch (Settings.SettingNotFoundException e2) {
e = e2;
if (w.a()) {
str = "Unable to determine if Fire OS limited ad tracking is turned on";
w.c("DataCollector", str, e);
}
} catch (Throwable th) {
e = th;
if (w.a()) {
str = "Unable to collect Fire OS IDFA";
w.c("DataCollector", str, e);
}
}
}
a = false;
return null;
}
}