Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,320 @@
package com.google.android.gms.ads.identifier;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.os.SystemClock;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.work.WorkRequest;
import com.google.android.gms.common.BlockingServiceConnection;
import com.google.android.gms.common.GoogleApiAvailabilityLight;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.GooglePlayServicesUtilLight;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.annotation.KeepForSdkWithMembers;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.ShowFirstParty;
import com.google.android.gms.common.stats.ConnectionTracker;
import com.google.android.gms.common.util.VisibleForTesting;
import com.google.android.gms.internal.ads_identifier.zze;
import com.google.android.gms.internal.ads_identifier.zzf;
import com.ironsource.v8;
import java.io.IOException;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
@KeepForSdk
/* loaded from: classes2.dex */
public class AdvertisingIdClient {
@Nullable
BlockingServiceConnection zza;
@Nullable
zzf zzb;
boolean zzc;
final Object zzd;
@Nullable
zzb zze;
final long zzf;
private final Context zzg;
@KeepForSdkWithMembers
public static final class Info {
@Nullable
private final String zza;
private final boolean zzb;
@Deprecated
public Info(@Nullable String str, boolean z) {
this.zza = str;
this.zzb = z;
}
@Nullable
public String getId() {
return this.zza;
}
public boolean isLimitAdTrackingEnabled() {
return this.zzb;
}
@NonNull
public String toString() {
String str = this.zza;
boolean z = this.zzb;
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 7);
sb.append("{");
sb.append(str);
sb.append("}");
sb.append(z);
return sb.toString();
}
}
@KeepForSdk
public AdvertisingIdClient(@NonNull Context context) {
this(context, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, false, false);
}
@NonNull
@KeepForSdk
public static Info getAdvertisingIdInfo(@NonNull Context context) throws IOException, IllegalStateException, GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {
AdvertisingIdClient advertisingIdClient = new AdvertisingIdClient(context, -1L, true, false);
try {
long elapsedRealtime = SystemClock.elapsedRealtime();
advertisingIdClient.zzb(false);
Info zzd = advertisingIdClient.zzd(-1);
advertisingIdClient.zzc(zzd, true, 0.0f, SystemClock.elapsedRealtime() - elapsedRealtime, "", null);
return zzd;
} finally {
}
}
@KeepForSdk
public static boolean getIsAdIdFakeForDebugLogging(@NonNull Context context) throws IOException, GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {
boolean zzd;
AdvertisingIdClient advertisingIdClient = new AdvertisingIdClient(context, -1L, false, false);
try {
advertisingIdClient.zzb(false);
Preconditions.checkNotMainThread("Calling this from your main thread can lead to deadlock");
synchronized (advertisingIdClient) {
try {
if (!advertisingIdClient.zzc) {
synchronized (advertisingIdClient.zzd) {
zzb zzbVar = advertisingIdClient.zze;
if (zzbVar == null || !zzbVar.zzb) {
throw new IOException("AdvertisingIdClient is not connected.");
}
}
try {
advertisingIdClient.zzb(false);
if (!advertisingIdClient.zzc) {
throw new IOException("AdvertisingIdClient cannot reconnect.");
}
} catch (Exception e) {
throw new IOException("AdvertisingIdClient cannot reconnect.", e);
}
}
Preconditions.checkNotNull(advertisingIdClient.zza);
Preconditions.checkNotNull(advertisingIdClient.zzb);
try {
zzd = advertisingIdClient.zzb.zzd();
} catch (RemoteException unused) {
throw new IOException("Remote exception");
}
} catch (Throwable th) {
throw th;
}
}
advertisingIdClient.zze();
return zzd;
} finally {
advertisingIdClient.zza();
}
}
@ShowFirstParty
@KeepForSdk
public static void setShouldSkipGmsCoreVersionCheck(boolean z) {
}
private final Info zzd(int i) throws IOException {
Info info;
Preconditions.checkNotMainThread("Calling this from your main thread can lead to deadlock");
synchronized (this) {
try {
if (!this.zzc) {
synchronized (this.zzd) {
zzb zzbVar = this.zze;
if (zzbVar == null || !zzbVar.zzb) {
throw new IOException("AdvertisingIdClient is not connected.");
}
}
try {
zzb(false);
if (!this.zzc) {
throw new IOException("AdvertisingIdClient cannot reconnect.");
}
} catch (Exception e) {
throw new IOException("AdvertisingIdClient cannot reconnect.", e);
}
}
Preconditions.checkNotNull(this.zza);
Preconditions.checkNotNull(this.zzb);
try {
info = new Info(this.zzb.zzc(), this.zzb.zze(true));
} catch (RemoteException unused) {
throw new IOException("Remote exception");
}
} catch (Throwable th) {
throw th;
}
}
zze();
return info;
}
private final void zze() {
synchronized (this.zzd) {
zzb zzbVar = this.zze;
if (zzbVar != null) {
zzbVar.zza.countDown();
try {
this.zze.join();
} catch (InterruptedException unused) {
}
}
long j = this.zzf;
if (j > 0) {
this.zze = new zzb(this, j);
}
}
}
public final void finalize() throws Throwable {
zza();
super.finalize();
}
@NonNull
@KeepForSdk
public Info getInfo() throws IOException {
return zzd(-1);
}
@KeepForSdk
public void start() throws IOException, IllegalStateException, GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {
zzb(true);
}
public final void zza() {
Preconditions.checkNotMainThread("Calling this from your main thread can lead to deadlock");
synchronized (this) {
try {
if (this.zzg == null || this.zza == null) {
return;
}
try {
if (this.zzc) {
ConnectionTracker.getInstance().unbindService(this.zzg, this.zza);
}
} catch (Throwable unused) {
}
this.zzc = false;
this.zzb = null;
this.zza = null;
} catch (Throwable th) {
throw th;
}
}
}
@VisibleForTesting
public final void zzb(boolean z) throws IOException, IllegalStateException, GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {
Preconditions.checkNotMainThread("Calling this from your main thread can lead to deadlock");
synchronized (this) {
try {
if (this.zzc) {
zza();
}
Context context = this.zzg;
try {
context.getPackageManager().getPackageInfo("com.android.vending", 0);
int isGooglePlayServicesAvailable = GoogleApiAvailabilityLight.getInstance().isGooglePlayServicesAvailable(context, GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE);
if (isGooglePlayServicesAvailable != 0 && isGooglePlayServicesAvailable != 2) {
throw new IOException("Google Play services not available");
}
BlockingServiceConnection blockingServiceConnection = new BlockingServiceConnection();
Intent intent = new Intent("com.google.android.gms.ads.identifier.service.START");
intent.setPackage("com.google.android.gms");
try {
if (!ConnectionTracker.getInstance().bindService(context, intent, blockingServiceConnection, 1)) {
throw new IOException("Connection failure");
}
this.zza = blockingServiceConnection;
try {
this.zzb = zze.zza(blockingServiceConnection.getServiceWithTimeout(WorkRequest.MIN_BACKOFF_MILLIS, TimeUnit.MILLISECONDS));
this.zzc = true;
if (z) {
zze();
}
} catch (InterruptedException unused) {
throw new IOException("Interrupted exception");
} catch (Throwable th) {
throw new IOException(th);
}
} finally {
IOException iOException = new IOException(th);
}
} catch (PackageManager.NameNotFoundException unused2) {
throw new GooglePlayServicesNotAvailableException(9);
}
} catch (Throwable th2) {
throw th2;
}
}
}
@VisibleForTesting
public final boolean zzc(@Nullable Info info, boolean z, float f, long j, String str, @Nullable Throwable th) {
if (Math.random() > 0.0d) {
return false;
}
HashMap hashMap = new HashMap();
hashMap.put(v8.h.L0, "1");
if (info != null) {
hashMap.put("limit_ad_tracking", true != info.isLimitAdTrackingEnabled() ? "0" : "1");
String id = info.getId();
if (id != null) {
hashMap.put("ad_id_size", Integer.toString(id.length()));
}
}
if (th != null) {
hashMap.put("error", th.getClass().getName());
}
hashMap.put("tag", "AdvertisingIdClient");
hashMap.put("time_spent", Long.toString(j));
new zza(this, hashMap).start();
return true;
}
@VisibleForTesting
public AdvertisingIdClient(@NonNull Context context, long j, boolean z, boolean z2) {
Context applicationContext;
this.zzd = new Object();
Preconditions.checkNotNull(context);
if (z && (applicationContext = context.getApplicationContext()) != null) {
context = applicationContext;
}
this.zzg = context;
this.zzc = false;
this.zzf = j;
}
}

View File

@@ -0,0 +1,23 @@
package com.google.android.gms.ads.identifier;
import android.net.Uri;
import java.util.Map;
/* loaded from: classes2.dex */
final class zza extends Thread {
final /* synthetic */ Map zza;
public zza(AdvertisingIdClient advertisingIdClient, Map map) {
this.zza = map;
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
Map map = this.zza;
Uri.Builder buildUpon = Uri.parse("https://pagead2.googlesyndication.com/pagead/gen_204?id=gmob-apps").buildUpon();
for (String str : map.keySet()) {
buildUpon.appendQueryParameter(str, (String) map.get(str));
}
zzc.zza(buildUpon.build().toString());
}
}

View File

@@ -0,0 +1,41 @@
package com.google.android.gms.ads.identifier;
import com.google.android.gms.common.util.VisibleForTesting;
import java.lang.ref.WeakReference;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@VisibleForTesting
/* loaded from: classes2.dex */
final class zzb extends Thread {
final CountDownLatch zza = new CountDownLatch(1);
boolean zzb = false;
private final WeakReference<AdvertisingIdClient> zzc;
private final long zzd;
public zzb(AdvertisingIdClient advertisingIdClient, long j) {
this.zzc = new WeakReference<>(advertisingIdClient);
this.zzd = j;
start();
}
private final void zza() {
AdvertisingIdClient advertisingIdClient = this.zzc.get();
if (advertisingIdClient != null) {
advertisingIdClient.zza();
this.zzb = true;
}
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
try {
if (this.zza.await(this.zzd, TimeUnit.MILLISECONDS)) {
return;
}
zza();
} catch (InterruptedException unused) {
zza();
}
}
}

View File

@@ -0,0 +1,67 @@
package com.google.android.gms.ads.identifier;
import android.util.Log;
import androidx.annotation.WorkerThread;
import com.google.android.gms.internal.ads_identifier.zzi;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
/* loaded from: classes2.dex */
public final class zzc {
@WorkerThread
public static final void zza(String str) {
try {
try {
zzi.zzb(263);
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
try {
int responseCode = httpURLConnection.getResponseCode();
if (responseCode < 200 || responseCode >= 300) {
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 65);
sb.append("Received non-success response code ");
sb.append(responseCode);
sb.append(" from pinging URL: ");
sb.append(str);
Log.w("HttpUrlPinger", sb.toString());
}
zzi.zza();
} finally {
httpURLConnection.disconnect();
}
} catch (IOException e) {
e = e;
String message = e.getMessage();
StringBuilder sb2 = new StringBuilder(String.valueOf(str).length() + 27 + String.valueOf(message).length());
sb2.append("Error while pinging URL: ");
sb2.append(str);
sb2.append(". ");
sb2.append(message);
Log.w("HttpUrlPinger", sb2.toString(), e);
zzi.zza();
} catch (IndexOutOfBoundsException e2) {
String message2 = e2.getMessage();
StringBuilder sb3 = new StringBuilder(String.valueOf(str).length() + 32 + String.valueOf(message2).length());
sb3.append("Error while parsing ping URL: ");
sb3.append(str);
sb3.append(". ");
sb3.append(message2);
Log.w("HttpUrlPinger", sb3.toString(), e2);
zzi.zza();
} catch (RuntimeException e3) {
e = e3;
String message3 = e.getMessage();
StringBuilder sb22 = new StringBuilder(String.valueOf(str).length() + 27 + String.valueOf(message3).length());
sb22.append("Error while pinging URL: ");
sb22.append(str);
sb22.append(". ");
sb22.append(message3);
Log.w("HttpUrlPinger", sb22.toString(), e);
zzi.zza();
}
} catch (Throwable th) {
zzi.zza();
throw th;
}
}
}