Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.google.android.datatransport.cct;
|
||||
|
||||
import X1.b;
|
||||
import X1.c;
|
||||
import X1.h;
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
@Keep
|
||||
/* loaded from: classes3.dex */
|
||||
public class CctBackendFactory {
|
||||
public h create(c cVar) {
|
||||
b bVar = (b) cVar;
|
||||
return new U1.c(bVar.f2012a, bVar.f2013b, bVar.f2014c);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.google.android.datatransport.runtime.backends;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class TransportBackendDiscovery extends Service {
|
||||
@Override // android.app.Service
|
||||
public final IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.datatransport.runtime.scheduling.jobscheduling;
|
||||
|
||||
import R0.h;
|
||||
import W1.j;
|
||||
import W1.t;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Base64;
|
||||
import c2.k;
|
||||
import c2.l;
|
||||
import g2.AbstractC0377a;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class AlarmManagerSchedulerBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public static final /* synthetic */ int f5509a = 0;
|
||||
|
||||
/* JADX WARN: Type inference failed for: r0v3, types: [java.lang.Object, java.lang.Runnable] */
|
||||
@Override // android.content.BroadcastReceiver
|
||||
public final void onReceive(Context context, Intent intent) {
|
||||
String queryParameter = intent.getData().getQueryParameter("backendName");
|
||||
String queryParameter2 = intent.getData().getQueryParameter("extras");
|
||||
int intValue = Integer.valueOf(intent.getData().getQueryParameter("priority")).intValue();
|
||||
int i = intent.getExtras().getInt("attemptNumber");
|
||||
t.b(context);
|
||||
h a2 = j.a();
|
||||
a2.o(queryParameter);
|
||||
a2.f1415c = AbstractC0377a.b(intValue);
|
||||
if (queryParameter2 != null) {
|
||||
a2.f1414b = Base64.decode(queryParameter2, 0);
|
||||
}
|
||||
l lVar = t.a().f1961d;
|
||||
j b4 = a2.b();
|
||||
?? obj = new Object();
|
||||
lVar.getClass();
|
||||
lVar.f4271e.execute(new k(lVar, b4, i, obj));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.google.android.datatransport.runtime.scheduling.jobscheduling;
|
||||
|
||||
import F.n;
|
||||
import R0.h;
|
||||
import W1.j;
|
||||
import W1.t;
|
||||
import android.app.job.JobParameters;
|
||||
import android.app.job.JobService;
|
||||
import android.util.Base64;
|
||||
import c2.k;
|
||||
import c2.l;
|
||||
import g2.AbstractC0377a;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class JobInfoSchedulerService extends JobService {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public static final /* synthetic */ int f5510a = 0;
|
||||
|
||||
@Override // android.app.job.JobService
|
||||
public final boolean onStartJob(JobParameters jobParameters) {
|
||||
String string = jobParameters.getExtras().getString("backendName");
|
||||
String string2 = jobParameters.getExtras().getString("extras");
|
||||
int i = jobParameters.getExtras().getInt("priority");
|
||||
int i4 = jobParameters.getExtras().getInt("attemptNumber");
|
||||
t.b(getApplicationContext());
|
||||
h a2 = j.a();
|
||||
a2.o(string);
|
||||
a2.f1415c = AbstractC0377a.b(i);
|
||||
if (string2 != null) {
|
||||
a2.f1414b = Base64.decode(string2, 0);
|
||||
}
|
||||
l lVar = t.a().f1961d;
|
||||
j b4 = a2.b();
|
||||
n nVar = new n(3, this, jobParameters);
|
||||
lVar.getClass();
|
||||
lVar.f4271e.execute(new k(lVar, b4, i4, nVar));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // android.app.job.JobService
|
||||
public final boolean onStopJob(JobParameters jobParameters) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.actions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ItemListIntents {
|
||||
public static final String ACTION_ACCEPT_ITEM = "com.google.android.gms.actions.ACCEPT_ITEM";
|
||||
public static final String ACTION_APPEND_ITEM_LIST = "com.google.android.gms.actions.APPEND_ITEM_LIST";
|
||||
public static final String ACTION_CREATE_ITEM_LIST = "com.google.android.gms.actions.CREATE_ITEM_LIST";
|
||||
public static final String ACTION_DELETE_ITEM = "com.google.android.gms.actions.DELETE_ITEM";
|
||||
public static final String ACTION_DELETE_ITEM_LIST = "com.google.android.gms.actions.DELETE_ITEM_LIST";
|
||||
public static final String ACTION_REJECT_ITEM = "com.google.android.gms.actions.REJECT_ITEM";
|
||||
public static final String EXTRA_ITEM_NAME = "com.google.android.gms.actions.extra.ITEM_NAME";
|
||||
public static final String EXTRA_ITEM_NAMES = "com.google.android.gms.actions.extra.ITEM_NAMES";
|
||||
public static final String EXTRA_ITEM_QUERY = "com.google.android.gms.actions.extra.ITEM_QUERY";
|
||||
public static final String EXTRA_LIST_NAME = "com.google.android.gms.actions.extra.LIST_NAME";
|
||||
public static final String EXTRA_LIST_QUERY = "com.google.android.gms.actions.extra.LIST_QUERY";
|
||||
|
||||
private ItemListIntents() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.actions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class NoteIntents {
|
||||
public static final String ACTION_APPEND_NOTE = "com.google.android.gms.actions.APPEND_NOTE";
|
||||
public static final String ACTION_CREATE_NOTE = "com.google.android.gms.actions.CREATE_NOTE";
|
||||
public static final String ACTION_DELETE_NOTE = "com.google.android.gms.actions.DELETE_NOTE";
|
||||
public static final String EXTRA_NAME = "com.google.android.gms.actions.extra.NAME";
|
||||
public static final String EXTRA_NOTE_QUERY = "com.google.android.gms.actions.extra.NOTE_QUERY";
|
||||
public static final String EXTRA_TEXT = "com.google.android.gms.actions.extra.TEXT";
|
||||
|
||||
private NoteIntents() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.actions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ReserveIntents {
|
||||
public static final String ACTION_RESERVE_TAXI_RESERVATION = "com.google.android.gms.actions.RESERVE_TAXI_RESERVATION";
|
||||
|
||||
private ReserveIntents() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.actions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class SearchIntents {
|
||||
public static final String ACTION_SEARCH = "com.google.android.gms.actions.SEARCH_ACTION";
|
||||
public static final String EXTRA_QUERY = "query";
|
||||
|
||||
private SearchIntents() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
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 android.util.Log;
|
||||
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.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class AdvertisingIdClient {
|
||||
BlockingServiceConnection zza;
|
||||
zzf zzb;
|
||||
boolean zzc;
|
||||
final Object zzd;
|
||||
zzb zze;
|
||||
final long zzf;
|
||||
private final Context zzg;
|
||||
|
||||
@KeepForSdkWithMembers
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Info {
|
||||
private final String zza;
|
||||
private final boolean zzb;
|
||||
|
||||
@Deprecated
|
||||
public Info(String str, boolean z3) {
|
||||
this.zza = str;
|
||||
this.zzb = z3;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public boolean isLimitAdTrackingEnabled() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String str = this.zza;
|
||||
boolean z3 = this.zzb;
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 7);
|
||||
sb.append("{");
|
||||
sb.append(str);
|
||||
sb.append("}");
|
||||
sb.append(z3);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public AdvertisingIdClient(Context context) {
|
||||
this(context, 30000L, false, false);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Info getAdvertisingIdInfo(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, BitmapDescriptorFactory.HUE_RED, SystemClock.elapsedRealtime() - elapsedRealtime, "", null);
|
||||
return zzd;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static boolean getIsAdIdFakeForDebugLogging(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 e4) {
|
||||
throw new IOException("AdvertisingIdClient cannot reconnect.", e4);
|
||||
}
|
||||
}
|
||||
Preconditions.checkNotNull(advertisingIdClient.zza);
|
||||
Preconditions.checkNotNull(advertisingIdClient.zzb);
|
||||
try {
|
||||
zzd = advertisingIdClient.zzb.zzd();
|
||||
} catch (RemoteException e5) {
|
||||
Log.i("AdvertisingIdClient", "GMS remote exception ", e5);
|
||||
throw new IOException("Remote exception");
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
advertisingIdClient.zze();
|
||||
advertisingIdClient.zza();
|
||||
return zzd;
|
||||
} catch (Throwable th2) {
|
||||
advertisingIdClient.zza();
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static void setShouldSkipGmsCoreVersionCheck(boolean z3) {
|
||||
}
|
||||
|
||||
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 e4) {
|
||||
throw new IOException("AdvertisingIdClient cannot reconnect.", e4);
|
||||
}
|
||||
}
|
||||
Preconditions.checkNotNull(this.zza);
|
||||
Preconditions.checkNotNull(this.zzb);
|
||||
try {
|
||||
info = new Info(this.zzb.zzc(), this.zzb.zze(true));
|
||||
} catch (RemoteException e5) {
|
||||
Log.i("AdvertisingIdClient", "GMS remote exception ", e5);
|
||||
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 j4 = this.zzf;
|
||||
if (j4 > 0) {
|
||||
this.zze = new zzb(this, j4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void finalize() throws Throwable {
|
||||
zza();
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
@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 th) {
|
||||
Log.i("AdvertisingIdClient", "AdvertisingIdClient unbindService failed.", th);
|
||||
}
|
||||
this.zzc = false;
|
||||
this.zzb = null;
|
||||
this.zza = null;
|
||||
} catch (Throwable th2) {
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public final void zzb(boolean z3) 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(10000L, TimeUnit.MILLISECONDS));
|
||||
this.zzc = true;
|
||||
if (z3) {
|
||||
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(Info info, boolean z3, float f2, long j4, String str, Throwable th) {
|
||||
if (Math.random() > FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE) {
|
||||
return false;
|
||||
}
|
||||
HashMap hashMap = new HashMap();
|
||||
hashMap.put("app_context", "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(Constants.IPC_BUNDLE_KEY_SEND_ERROR, th.getClass().getName());
|
||||
}
|
||||
hashMap.put("tag", "AdvertisingIdClient");
|
||||
hashMap.put("time_spent", Long.toString(j4));
|
||||
new zza(this, hashMap).start();
|
||||
return true;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public AdvertisingIdClient(Context context, long j4, boolean z3, boolean z4) {
|
||||
Context applicationContext;
|
||||
this.zzd = new Object();
|
||||
Preconditions.checkNotNull(context);
|
||||
if (z3 && (applicationContext = context.getApplicationContext()) != null) {
|
||||
context = applicationContext;
|
||||
}
|
||||
this.zzg = context;
|
||||
this.zzc = false;
|
||||
this.zzf = j4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.google.android.gms.ads.identifier;
|
||||
|
||||
import android.net.Uri;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes3.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());
|
||||
}
|
||||
}
|
||||
@@ -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: classes3.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 j4) {
|
||||
this.zzc = new WeakReference<>(advertisingIdClient);
|
||||
this.zzd = j4;
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.google.android.gms.ads.identifier;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.internal.ads_identifier.zzi;
|
||||
import java.io.IOException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzc {
|
||||
public static final void zza(String str) {
|
||||
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());
|
||||
}
|
||||
} finally {
|
||||
httpURLConnection.disconnect();
|
||||
}
|
||||
} catch (IndexOutOfBoundsException e4) {
|
||||
String message = e4.getMessage();
|
||||
StringBuilder sb2 = new StringBuilder(String.valueOf(str).length() + 32 + String.valueOf(message).length());
|
||||
sb2.append("Error while parsing ping URL: ");
|
||||
sb2.append(str);
|
||||
sb2.append(". ");
|
||||
sb2.append(message);
|
||||
Log.w("HttpUrlPinger", sb2.toString(), e4);
|
||||
} catch (IOException | RuntimeException e5) {
|
||||
String message2 = e5.getMessage();
|
||||
StringBuilder sb3 = new StringBuilder(String.valueOf(str).length() + 27 + String.valueOf(message2).length());
|
||||
sb3.append("Error while pinging URL: ");
|
||||
sb3.append(str);
|
||||
sb3.append(". ");
|
||||
sb3.append(message2);
|
||||
Log.w("HttpUrlPinger", sb3.toString(), e5);
|
||||
} finally {
|
||||
zzi.zza();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.ads_identifier;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,287 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import com.adif.elcanomovil.commonNavGraph.arguments.NavArguments;
|
||||
import com.google.android.gms.common.Scopes;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.AccountType;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ReflectedParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import com.google.android.gms.common.util.Clock;
|
||||
import com.google.android.gms.common.util.DefaultClock;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import s.f;
|
||||
|
||||
@SafeParcelable.Class(creator = "GoogleSignInAccountCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleSignInAccount extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public static final Parcelable.Creator<GoogleSignInAccount> CREATOR = new zab();
|
||||
|
||||
@VisibleForTesting
|
||||
public static Clock zaa = DefaultClock.getInstance();
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zab;
|
||||
|
||||
@SafeParcelable.Field(id = 10)
|
||||
List zac;
|
||||
|
||||
@SafeParcelable.Field(getter = "getId", id = 2)
|
||||
private String zad;
|
||||
|
||||
@SafeParcelable.Field(getter = "getIdToken", id = 3)
|
||||
private String zae;
|
||||
|
||||
@SafeParcelable.Field(getter = "getEmail", id = 4)
|
||||
private String zaf;
|
||||
|
||||
@SafeParcelable.Field(getter = "getDisplayName", id = 5)
|
||||
private String zag;
|
||||
|
||||
@SafeParcelable.Field(getter = "getPhotoUrl", id = 6)
|
||||
private Uri zah;
|
||||
|
||||
@SafeParcelable.Field(getter = "getServerAuthCode", id = 7)
|
||||
private String zai;
|
||||
|
||||
@SafeParcelable.Field(getter = "getExpirationTimeSecs", id = 8)
|
||||
private long zaj;
|
||||
|
||||
@SafeParcelable.Field(getter = "getObfuscatedIdentifier", id = 9)
|
||||
private String zak;
|
||||
|
||||
@SafeParcelable.Field(getter = "getGivenName", id = 11)
|
||||
private String zal;
|
||||
|
||||
@SafeParcelable.Field(getter = "getFamilyName", id = 12)
|
||||
private String zam;
|
||||
private Set zan = new HashSet();
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public GoogleSignInAccount(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) String str, @SafeParcelable.Param(id = 3) String str2, @SafeParcelable.Param(id = 4) String str3, @SafeParcelable.Param(id = 5) String str4, @SafeParcelable.Param(id = 6) Uri uri, @SafeParcelable.Param(id = 7) String str5, @SafeParcelable.Param(id = 8) long j4, @SafeParcelable.Param(id = 9) String str6, @SafeParcelable.Param(id = 10) List list, @SafeParcelable.Param(id = 11) String str7, @SafeParcelable.Param(id = 12) String str8) {
|
||||
this.zab = i;
|
||||
this.zad = str;
|
||||
this.zae = str2;
|
||||
this.zaf = str3;
|
||||
this.zag = str4;
|
||||
this.zah = uri;
|
||||
this.zai = str5;
|
||||
this.zaj = j4;
|
||||
this.zak = str6;
|
||||
this.zac = list;
|
||||
this.zal = str7;
|
||||
this.zam = str8;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static GoogleSignInAccount createDefault() {
|
||||
return zae(new Account("<<default account>>", AccountType.GOOGLE), new HashSet());
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static GoogleSignInAccount fromAccount(Account account) {
|
||||
return zae(account, new f(0));
|
||||
}
|
||||
|
||||
public static GoogleSignInAccount zaa(String str, String str2, String str3, String str4, String str5, String str6, Uri uri, Long l4, String str7, Set set) {
|
||||
return new GoogleSignInAccount(3, str, str2, str3, str4, uri, null, l4.longValue(), Preconditions.checkNotEmpty(str7), new ArrayList((Collection) Preconditions.checkNotNull(set)), str5, str6);
|
||||
}
|
||||
|
||||
public static GoogleSignInAccount zab(String str) throws JSONException {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
return null;
|
||||
}
|
||||
JSONObject jSONObject = new JSONObject(str);
|
||||
String optString = jSONObject.optString("photoUrl");
|
||||
Uri parse = !TextUtils.isEmpty(optString) ? Uri.parse(optString) : null;
|
||||
long parseLong = Long.parseLong(jSONObject.getString("expirationTime"));
|
||||
HashSet hashSet = new HashSet();
|
||||
JSONArray jSONArray = jSONObject.getJSONArray("grantedScopes");
|
||||
int length = jSONArray.length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
hashSet.add(new Scope(jSONArray.getString(i)));
|
||||
}
|
||||
GoogleSignInAccount zaa2 = zaa(jSONObject.optString(NavArguments.ARG_TYPE_NOTIFICATION_JSON_MESSAGE_TRAIN), jSONObject.has("tokenId") ? jSONObject.optString("tokenId") : null, jSONObject.has(Scopes.EMAIL) ? jSONObject.optString(Scopes.EMAIL) : null, jSONObject.has("displayName") ? jSONObject.optString("displayName") : null, jSONObject.has("givenName") ? jSONObject.optString("givenName") : null, jSONObject.has("familyName") ? jSONObject.optString("familyName") : null, parse, Long.valueOf(parseLong), jSONObject.getString("obfuscatedIdentifier"), hashSet);
|
||||
zaa2.zai = jSONObject.has("serverAuthCode") ? jSONObject.optString("serverAuthCode") : null;
|
||||
return zaa2;
|
||||
}
|
||||
|
||||
private static GoogleSignInAccount zae(Account account, Set set) {
|
||||
return zaa(null, null, account.name, null, null, null, null, 0L, account.name, set);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof GoogleSignInAccount)) {
|
||||
return false;
|
||||
}
|
||||
GoogleSignInAccount googleSignInAccount = (GoogleSignInAccount) obj;
|
||||
return googleSignInAccount.zak.equals(this.zak) && googleSignInAccount.getRequestedScopes().equals(getRequestedScopes());
|
||||
}
|
||||
|
||||
public Account getAccount() {
|
||||
String str = this.zaf;
|
||||
if (str == null) {
|
||||
return null;
|
||||
}
|
||||
return new Account(str, AccountType.GOOGLE);
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return this.zag;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return this.zaf;
|
||||
}
|
||||
|
||||
public String getFamilyName() {
|
||||
return this.zam;
|
||||
}
|
||||
|
||||
public String getGivenName() {
|
||||
return this.zal;
|
||||
}
|
||||
|
||||
public Set<Scope> getGrantedScopes() {
|
||||
return new HashSet(this.zac);
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
public String getIdToken() {
|
||||
return this.zae;
|
||||
}
|
||||
|
||||
public Uri getPhotoUrl() {
|
||||
return this.zah;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Set<Scope> getRequestedScopes() {
|
||||
HashSet hashSet = new HashSet(this.zac);
|
||||
hashSet.addAll(this.zan);
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
public String getServerAuthCode() {
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return getRequestedScopes().hashCode() + a.d(this.zak, 527, 31);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isExpired() {
|
||||
return zaa.currentTimeMillis() / 1000 >= this.zaj + (-300);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleSignInAccount requestExtraScopes(Scope... scopeArr) {
|
||||
if (scopeArr != null) {
|
||||
Collections.addAll(this.zan, scopeArr);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zab);
|
||||
SafeParcelWriter.writeString(parcel, 2, getId(), false);
|
||||
SafeParcelWriter.writeString(parcel, 3, getIdToken(), false);
|
||||
SafeParcelWriter.writeString(parcel, 4, getEmail(), false);
|
||||
SafeParcelWriter.writeString(parcel, 5, getDisplayName(), false);
|
||||
SafeParcelWriter.writeParcelable(parcel, 6, getPhotoUrl(), i, false);
|
||||
SafeParcelWriter.writeString(parcel, 7, getServerAuthCode(), false);
|
||||
SafeParcelWriter.writeLong(parcel, 8, this.zaj);
|
||||
SafeParcelWriter.writeString(parcel, 9, this.zak, false);
|
||||
SafeParcelWriter.writeTypedList(parcel, 10, this.zac, false);
|
||||
SafeParcelWriter.writeString(parcel, 11, getGivenName(), false);
|
||||
SafeParcelWriter.writeString(parcel, 12, getFamilyName(), false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public final String zac() {
|
||||
return this.zak;
|
||||
}
|
||||
|
||||
public final String zad() {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
try {
|
||||
if (getId() != null) {
|
||||
jSONObject.put(NavArguments.ARG_TYPE_NOTIFICATION_JSON_MESSAGE_TRAIN, getId());
|
||||
}
|
||||
if (getIdToken() != null) {
|
||||
jSONObject.put("tokenId", getIdToken());
|
||||
}
|
||||
if (getEmail() != null) {
|
||||
jSONObject.put(Scopes.EMAIL, getEmail());
|
||||
}
|
||||
if (getDisplayName() != null) {
|
||||
jSONObject.put("displayName", getDisplayName());
|
||||
}
|
||||
if (getGivenName() != null) {
|
||||
jSONObject.put("givenName", getGivenName());
|
||||
}
|
||||
if (getFamilyName() != null) {
|
||||
jSONObject.put("familyName", getFamilyName());
|
||||
}
|
||||
Uri photoUrl = getPhotoUrl();
|
||||
if (photoUrl != null) {
|
||||
jSONObject.put("photoUrl", photoUrl.toString());
|
||||
}
|
||||
if (getServerAuthCode() != null) {
|
||||
jSONObject.put("serverAuthCode", getServerAuthCode());
|
||||
}
|
||||
jSONObject.put("expirationTime", this.zaj);
|
||||
jSONObject.put("obfuscatedIdentifier", this.zak);
|
||||
JSONArray jSONArray = new JSONArray();
|
||||
List list = this.zac;
|
||||
Scope[] scopeArr = (Scope[]) list.toArray(new Scope[list.size()]);
|
||||
Arrays.sort(scopeArr, new Comparator() { // from class: com.google.android.gms.auth.api.signin.zaa
|
||||
@Override // java.util.Comparator
|
||||
public final int compare(Object obj, Object obj2) {
|
||||
Parcelable.Creator<GoogleSignInAccount> creator = GoogleSignInAccount.CREATOR;
|
||||
return ((Scope) obj).getScopeUri().compareTo(((Scope) obj2).getScopeUri());
|
||||
}
|
||||
});
|
||||
for (Scope scope : scopeArr) {
|
||||
jSONArray.put(scope.getScopeUri());
|
||||
}
|
||||
jSONObject.put("grantedScopes", jSONArray);
|
||||
jSONObject.remove("serverAuthCode");
|
||||
return jSONObject.toString();
|
||||
} catch (JSONException e4) {
|
||||
throw new RuntimeException(e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,465 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.auth.api.signin.internal.GoogleSignInOptionsExtensionParcelable;
|
||||
import com.google.android.gms.auth.api.signin.internal.HashAccumulator;
|
||||
import com.google.android.gms.common.Scopes;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.AccountType;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ReflectedParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@SafeParcelable.Class(creator = "GoogleSignInOptionsCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleSignInOptions extends AbstractSafeParcelable implements Api.ApiOptions.Optional, ReflectedParcelable {
|
||||
public static final Parcelable.Creator<GoogleSignInOptions> CREATOR;
|
||||
public static final GoogleSignInOptions DEFAULT_GAMES_SIGN_IN;
|
||||
public static final GoogleSignInOptions DEFAULT_SIGN_IN;
|
||||
|
||||
@VisibleForTesting
|
||||
public static final Scope zaa = new Scope(Scopes.PROFILE);
|
||||
|
||||
@VisibleForTesting
|
||||
public static final Scope zab = new Scope(Scopes.EMAIL);
|
||||
|
||||
@VisibleForTesting
|
||||
public static final Scope zac = new Scope(Scopes.OPEN_ID);
|
||||
|
||||
@VisibleForTesting
|
||||
public static final Scope zad;
|
||||
|
||||
@VisibleForTesting
|
||||
public static final Scope zae;
|
||||
private static Comparator zag;
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zaf;
|
||||
|
||||
@SafeParcelable.Field(getter = "getScopes", id = 2)
|
||||
private final ArrayList zah;
|
||||
|
||||
@SafeParcelable.Field(getter = "getAccount", id = 3)
|
||||
private Account zai;
|
||||
|
||||
@SafeParcelable.Field(getter = "isIdTokenRequested", id = 4)
|
||||
private boolean zaj;
|
||||
|
||||
@SafeParcelable.Field(getter = "isServerAuthCodeRequested", id = 5)
|
||||
private final boolean zak;
|
||||
|
||||
@SafeParcelable.Field(getter = "isForceCodeForRefreshToken", id = 6)
|
||||
private final boolean zal;
|
||||
|
||||
@SafeParcelable.Field(getter = "getServerClientId", id = 7)
|
||||
private String zam;
|
||||
|
||||
@SafeParcelable.Field(getter = "getHostedDomain", id = 8)
|
||||
private String zan;
|
||||
|
||||
@SafeParcelable.Field(getter = "getExtensions", id = 9)
|
||||
private ArrayList zao;
|
||||
|
||||
@SafeParcelable.Field(getter = "getLogSessionId", id = 10)
|
||||
private String zap;
|
||||
private Map zaq;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder {
|
||||
private Set zaa;
|
||||
private boolean zab;
|
||||
private boolean zac;
|
||||
private boolean zad;
|
||||
private String zae;
|
||||
private Account zaf;
|
||||
private String zag;
|
||||
private Map zah;
|
||||
private String zai;
|
||||
|
||||
public Builder() {
|
||||
this.zaa = new HashSet();
|
||||
this.zah = new HashMap();
|
||||
}
|
||||
|
||||
private final String zaa(String str) {
|
||||
Preconditions.checkNotEmpty(str);
|
||||
String str2 = this.zae;
|
||||
boolean z3 = true;
|
||||
if (str2 != null && !str2.equals(str)) {
|
||||
z3 = false;
|
||||
}
|
||||
Preconditions.checkArgument(z3, "two different server client ids provided");
|
||||
return str;
|
||||
}
|
||||
|
||||
public Builder addExtension(GoogleSignInOptionsExtension googleSignInOptionsExtension) {
|
||||
if (this.zah.containsKey(Integer.valueOf(googleSignInOptionsExtension.getExtensionType()))) {
|
||||
throw new IllegalStateException("Only one extension per type may be added");
|
||||
}
|
||||
List<Scope> impliedScopes = googleSignInOptionsExtension.getImpliedScopes();
|
||||
if (impliedScopes != null) {
|
||||
this.zaa.addAll(impliedScopes);
|
||||
}
|
||||
this.zah.put(Integer.valueOf(googleSignInOptionsExtension.getExtensionType()), new GoogleSignInOptionsExtensionParcelable(googleSignInOptionsExtension));
|
||||
return this;
|
||||
}
|
||||
|
||||
public GoogleSignInOptions build() {
|
||||
if (this.zaa.contains(GoogleSignInOptions.zae)) {
|
||||
Set set = this.zaa;
|
||||
Scope scope = GoogleSignInOptions.zad;
|
||||
if (set.contains(scope)) {
|
||||
this.zaa.remove(scope);
|
||||
}
|
||||
}
|
||||
if (this.zad && (this.zaf == null || !this.zaa.isEmpty())) {
|
||||
requestId();
|
||||
}
|
||||
return new GoogleSignInOptions(new ArrayList(this.zaa), this.zaf, this.zad, this.zab, this.zac, this.zae, this.zag, this.zah, this.zai);
|
||||
}
|
||||
|
||||
public Builder requestEmail() {
|
||||
this.zaa.add(GoogleSignInOptions.zab);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestId() {
|
||||
this.zaa.add(GoogleSignInOptions.zac);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestIdToken(String str) {
|
||||
this.zad = true;
|
||||
zaa(str);
|
||||
this.zae = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestProfile() {
|
||||
this.zaa.add(GoogleSignInOptions.zaa);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestScopes(Scope scope, Scope... scopeArr) {
|
||||
this.zaa.add(scope);
|
||||
this.zaa.addAll(Arrays.asList(scopeArr));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestServerAuthCode(String str) {
|
||||
requestServerAuthCode(str, false);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAccountName(String str) {
|
||||
this.zaf = new Account(Preconditions.checkNotEmpty(str), AccountType.GOOGLE);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHostedDomain(String str) {
|
||||
this.zag = Preconditions.checkNotEmpty(str);
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder setLogSessionId(String str) {
|
||||
this.zai = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder requestServerAuthCode(String str, boolean z3) {
|
||||
this.zab = true;
|
||||
zaa(str);
|
||||
this.zae = str;
|
||||
this.zac = z3;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder(GoogleSignInOptions googleSignInOptions) {
|
||||
this.zaa = new HashSet();
|
||||
this.zah = new HashMap();
|
||||
Preconditions.checkNotNull(googleSignInOptions);
|
||||
this.zaa = new HashSet(googleSignInOptions.zah);
|
||||
this.zab = googleSignInOptions.zak;
|
||||
this.zac = googleSignInOptions.zal;
|
||||
this.zad = googleSignInOptions.zaj;
|
||||
this.zae = googleSignInOptions.zam;
|
||||
this.zaf = googleSignInOptions.zai;
|
||||
this.zag = googleSignInOptions.zan;
|
||||
this.zah = GoogleSignInOptions.zam(googleSignInOptions.zao);
|
||||
this.zai = googleSignInOptions.zap;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
Scope scope = new Scope(Scopes.GAMES_LITE);
|
||||
zad = scope;
|
||||
zae = new Scope(Scopes.GAMES);
|
||||
Builder builder = new Builder();
|
||||
builder.requestId();
|
||||
builder.requestProfile();
|
||||
DEFAULT_SIGN_IN = builder.build();
|
||||
Builder builder2 = new Builder();
|
||||
builder2.requestScopes(scope, new Scope[0]);
|
||||
DEFAULT_GAMES_SIGN_IN = builder2.build();
|
||||
CREATOR = new zae();
|
||||
zag = new zac();
|
||||
}
|
||||
|
||||
public static GoogleSignInOptions zab(String str) throws JSONException {
|
||||
if (TextUtils.isEmpty(str)) {
|
||||
return null;
|
||||
}
|
||||
JSONObject jSONObject = new JSONObject(str);
|
||||
HashSet hashSet = new HashSet();
|
||||
JSONArray jSONArray = jSONObject.getJSONArray("scopes");
|
||||
int length = jSONArray.length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
hashSet.add(new Scope(jSONArray.getString(i)));
|
||||
}
|
||||
String optString = jSONObject.has("accountName") ? jSONObject.optString("accountName") : null;
|
||||
return new GoogleSignInOptions(3, new ArrayList(hashSet), !TextUtils.isEmpty(optString) ? new Account(optString, AccountType.GOOGLE) : null, jSONObject.getBoolean("idTokenRequested"), jSONObject.getBoolean("serverAuthRequested"), jSONObject.getBoolean("forceCodeForRefreshToken"), jSONObject.has("serverClientId") ? jSONObject.optString("serverClientId") : null, jSONObject.has("hostedDomain") ? jSONObject.optString("hostedDomain") : null, new HashMap(), (String) null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static Map zam(List list) {
|
||||
HashMap hashMap = new HashMap();
|
||||
if (list != null) {
|
||||
Iterator it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
GoogleSignInOptionsExtensionParcelable googleSignInOptionsExtensionParcelable = (GoogleSignInOptionsExtensionParcelable) it.next();
|
||||
hashMap.put(Integer.valueOf(googleSignInOptionsExtensionParcelable.getType()), googleSignInOptionsExtensionParcelable);
|
||||
}
|
||||
}
|
||||
return hashMap;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:40:0x0048, code lost:
|
||||
|
||||
if (r1.equals(r4.getAccount()) != false) goto L22;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public boolean equals(java.lang.Object r4) {
|
||||
/*
|
||||
r3 = this;
|
||||
r0 = 0
|
||||
if (r4 != 0) goto L4
|
||||
return r0
|
||||
L4:
|
||||
com.google.android.gms.auth.api.signin.GoogleSignInOptions r4 = (com.google.android.gms.auth.api.signin.GoogleSignInOptions) r4 // Catch: java.lang.ClassCastException -> L90
|
||||
java.util.ArrayList r1 = r3.zao // Catch: java.lang.ClassCastException -> L90
|
||||
int r1 = r1.size() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 > 0) goto L90
|
||||
java.util.ArrayList r1 = r4.zao // Catch: java.lang.ClassCastException -> L90
|
||||
int r1 = r1.size() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 <= 0) goto L18
|
||||
goto L90
|
||||
L18:
|
||||
java.util.ArrayList r1 = r3.zah // Catch: java.lang.ClassCastException -> L90
|
||||
int r1 = r1.size() // Catch: java.lang.ClassCastException -> L90
|
||||
java.util.ArrayList r2 = r4.getScopes() // Catch: java.lang.ClassCastException -> L90
|
||||
int r2 = r2.size() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != r2) goto L90
|
||||
java.util.ArrayList r1 = r3.zah // Catch: java.lang.ClassCastException -> L90
|
||||
java.util.ArrayList r2 = r4.getScopes() // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r1 = r1.containsAll(r2) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != 0) goto L35
|
||||
goto L90
|
||||
L35:
|
||||
android.accounts.Account r1 = r3.zai // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != 0) goto L40
|
||||
android.accounts.Account r1 = r4.getAccount() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != 0) goto L90
|
||||
goto L4a
|
||||
L40:
|
||||
android.accounts.Account r2 = r4.getAccount() // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r1 = r1.equals(r2) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 == 0) goto L90
|
||||
L4a:
|
||||
java.lang.String r1 = r3.zam // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r1 = android.text.TextUtils.isEmpty(r1) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 == 0) goto L5d
|
||||
java.lang.String r1 = r4.getServerClientId() // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r1 = android.text.TextUtils.isEmpty(r1) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 == 0) goto L90
|
||||
goto L6a
|
||||
L5d:
|
||||
java.lang.String r1 = r3.zam // Catch: java.lang.ClassCastException -> L90
|
||||
java.lang.String r2 = r4.getServerClientId() // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r1 = r1.equals(r2) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != 0) goto L6a
|
||||
goto L90
|
||||
L6a:
|
||||
boolean r1 = r3.zal // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r2 = r4.isForceCodeForRefreshToken() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != r2) goto L90
|
||||
boolean r1 = r3.zaj // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r2 = r4.isIdTokenRequested() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != r2) goto L90
|
||||
boolean r1 = r3.zak // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r2 = r4.isServerAuthCodeRequested() // Catch: java.lang.ClassCastException -> L90
|
||||
if (r1 != r2) goto L90
|
||||
java.lang.String r3 = r3.zap // Catch: java.lang.ClassCastException -> L90
|
||||
java.lang.String r4 = r4.getLogSessionId() // Catch: java.lang.ClassCastException -> L90
|
||||
boolean r3 = android.text.TextUtils.equals(r3, r4) // Catch: java.lang.ClassCastException -> L90
|
||||
if (r3 == 0) goto L90
|
||||
r3 = 1
|
||||
return r3
|
||||
L90:
|
||||
return r0
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.auth.api.signin.GoogleSignInOptions.equals(java.lang.Object):boolean");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Account getAccount() {
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ArrayList<GoogleSignInOptionsExtensionParcelable> getExtensions() {
|
||||
return this.zao;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getLogSessionId() {
|
||||
return this.zap;
|
||||
}
|
||||
|
||||
public Scope[] getScopeArray() {
|
||||
ArrayList arrayList = this.zah;
|
||||
return (Scope[]) arrayList.toArray(new Scope[arrayList.size()]);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ArrayList<Scope> getScopes() {
|
||||
return new ArrayList<>(this.zah);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getServerClientId() {
|
||||
return this.zam;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
ArrayList arrayList2 = this.zah;
|
||||
int size = arrayList2.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
arrayList.add(((Scope) arrayList2.get(i)).getScopeUri());
|
||||
}
|
||||
Collections.sort(arrayList);
|
||||
HashAccumulator hashAccumulator = new HashAccumulator();
|
||||
hashAccumulator.addObject(arrayList);
|
||||
hashAccumulator.addObject(this.zai);
|
||||
hashAccumulator.addObject(this.zam);
|
||||
hashAccumulator.zaa(this.zal);
|
||||
hashAccumulator.zaa(this.zaj);
|
||||
hashAccumulator.zaa(this.zak);
|
||||
hashAccumulator.addObject(this.zap);
|
||||
return hashAccumulator.hash();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isForceCodeForRefreshToken() {
|
||||
return this.zal;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isIdTokenRequested() {
|
||||
return this.zaj;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isServerAuthCodeRequested() {
|
||||
return this.zak;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zaf);
|
||||
SafeParcelWriter.writeTypedList(parcel, 2, getScopes(), false);
|
||||
SafeParcelWriter.writeParcelable(parcel, 3, getAccount(), i, false);
|
||||
SafeParcelWriter.writeBoolean(parcel, 4, isIdTokenRequested());
|
||||
SafeParcelWriter.writeBoolean(parcel, 5, isServerAuthCodeRequested());
|
||||
SafeParcelWriter.writeBoolean(parcel, 6, isForceCodeForRefreshToken());
|
||||
SafeParcelWriter.writeString(parcel, 7, getServerClientId(), false);
|
||||
SafeParcelWriter.writeString(parcel, 8, this.zan, false);
|
||||
SafeParcelWriter.writeTypedList(parcel, 9, getExtensions(), false);
|
||||
SafeParcelWriter.writeString(parcel, 10, getLogSessionId(), false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public final String zaf() {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
try {
|
||||
JSONArray jSONArray = new JSONArray();
|
||||
Collections.sort(this.zah, zag);
|
||||
Iterator it = this.zah.iterator();
|
||||
while (it.hasNext()) {
|
||||
jSONArray.put(((Scope) it.next()).getScopeUri());
|
||||
}
|
||||
jSONObject.put("scopes", jSONArray);
|
||||
Account account = this.zai;
|
||||
if (account != null) {
|
||||
jSONObject.put("accountName", account.name);
|
||||
}
|
||||
jSONObject.put("idTokenRequested", this.zaj);
|
||||
jSONObject.put("forceCodeForRefreshToken", this.zal);
|
||||
jSONObject.put("serverAuthRequested", this.zak);
|
||||
if (!TextUtils.isEmpty(this.zam)) {
|
||||
jSONObject.put("serverClientId", this.zam);
|
||||
}
|
||||
if (!TextUtils.isEmpty(this.zan)) {
|
||||
jSONObject.put("hostedDomain", this.zan);
|
||||
}
|
||||
return jSONObject.toString();
|
||||
} catch (JSONException e4) {
|
||||
throw new RuntimeException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public GoogleSignInOptions(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) ArrayList arrayList, @SafeParcelable.Param(id = 3) Account account, @SafeParcelable.Param(id = 4) boolean z3, @SafeParcelable.Param(id = 5) boolean z4, @SafeParcelable.Param(id = 6) boolean z5, @SafeParcelable.Param(id = 7) String str, @SafeParcelable.Param(id = 8) String str2, @SafeParcelable.Param(id = 9) ArrayList arrayList2, @SafeParcelable.Param(id = 10) String str3) {
|
||||
this(i, arrayList, account, z3, z4, z5, str, str2, zam(arrayList2), str3);
|
||||
}
|
||||
|
||||
private GoogleSignInOptions(int i, ArrayList arrayList, Account account, boolean z3, boolean z4, boolean z5, String str, String str2, Map map, String str3) {
|
||||
this.zaf = i;
|
||||
this.zah = arrayList;
|
||||
this.zai = account;
|
||||
this.zaj = z3;
|
||||
this.zak = z4;
|
||||
this.zal = z5;
|
||||
this.zam = str;
|
||||
this.zan = str2;
|
||||
this.zao = new ArrayList(map.values());
|
||||
this.zaq = map;
|
||||
this.zap = str3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface GoogleSignInOptionsExtension {
|
||||
|
||||
@KeepForSdk
|
||||
public static final int FITNESS = 3;
|
||||
|
||||
@KeepForSdk
|
||||
public static final int GAMES = 1;
|
||||
|
||||
@KeepForSdk
|
||||
int getExtensionType();
|
||||
|
||||
@KeepForSdk
|
||||
List<Scope> getImpliedScopes();
|
||||
|
||||
@KeepForSdk
|
||||
Bundle toBundle();
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.google.android.gms.auth.api.signin.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInOptionsExtension;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
|
||||
@SafeParcelable.Class(creator = "GoogleSignInOptionsExtensionCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleSignInOptionsExtensionParcelable extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<GoogleSignInOptionsExtensionParcelable> CREATOR = new zaa();
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zaa;
|
||||
|
||||
@SafeParcelable.Field(getter = "getType", id = 2)
|
||||
private int zab;
|
||||
|
||||
@SafeParcelable.Field(getter = "getBundle", id = 3)
|
||||
private Bundle zac;
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public GoogleSignInOptionsExtensionParcelable(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) int i4, @SafeParcelable.Param(id = 3) Bundle bundle) {
|
||||
this.zaa = i;
|
||||
this.zab = i4;
|
||||
this.zac = bundle;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getType() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zaa);
|
||||
SafeParcelWriter.writeInt(parcel, 2, getType());
|
||||
SafeParcelWriter.writeBundle(parcel, 3, this.zac, false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public GoogleSignInOptionsExtensionParcelable(GoogleSignInOptionsExtension googleSignInOptionsExtension) {
|
||||
this(1, googleSignInOptionsExtension.getExtensionType(), googleSignInOptionsExtension.toBundle());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.google.android.gms.auth.api.signin.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class HashAccumulator {
|
||||
|
||||
@VisibleForTesting
|
||||
static int zaa = 31;
|
||||
private int zab = 1;
|
||||
|
||||
@KeepForSdk
|
||||
public HashAccumulator addObject(Object obj) {
|
||||
this.zab = (zaa * this.zab) + (obj == null ? 0 : obj.hashCode());
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int hash() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public final HashAccumulator zaa(boolean z3) {
|
||||
this.zab = (zaa * this.zab) + (z3 ? 1 : 0);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.google.android.gms.auth.api.signin.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import org.json.JSONException;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class Storage {
|
||||
private static final Lock zaa = new ReentrantLock();
|
||||
private static Storage zab;
|
||||
private final Lock zac = new ReentrantLock();
|
||||
private final SharedPreferences zad;
|
||||
|
||||
@VisibleForTesting
|
||||
public Storage(Context context) {
|
||||
this.zad = context.getSharedPreferences("com.google.android.gms.signin", 0);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Storage getInstance(Context context) {
|
||||
Preconditions.checkNotNull(context);
|
||||
Lock lock = zaa;
|
||||
lock.lock();
|
||||
try {
|
||||
if (zab == null) {
|
||||
zab = new Storage(context.getApplicationContext());
|
||||
}
|
||||
Storage storage = zab;
|
||||
lock.unlock();
|
||||
return storage;
|
||||
} catch (Throwable th) {
|
||||
zaa.unlock();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
private static final String zae(String str, String str2) {
|
||||
return str + ":" + str2;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void clear() {
|
||||
this.zac.lock();
|
||||
try {
|
||||
this.zad.edit().clear().apply();
|
||||
} finally {
|
||||
this.zac.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleSignInAccount getSavedDefaultGoogleSignInAccount() {
|
||||
String zaa2;
|
||||
String zaa3 = zaa("defaultGoogleSignInAccount");
|
||||
if (!TextUtils.isEmpty(zaa3) && (zaa2 = zaa(zae("googleSignInAccount", zaa3))) != null) {
|
||||
try {
|
||||
return GoogleSignInAccount.zab(zaa2);
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleSignInOptions getSavedDefaultGoogleSignInOptions() {
|
||||
String zaa2;
|
||||
String zaa3 = zaa("defaultGoogleSignInAccount");
|
||||
if (!TextUtils.isEmpty(zaa3) && (zaa2 = zaa(zae("googleSignInOptions", zaa3))) != null) {
|
||||
try {
|
||||
return GoogleSignInOptions.zab(zaa2);
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getSavedRefreshToken() {
|
||||
return zaa("refreshToken");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void saveDefaultGoogleSignInAccount(GoogleSignInAccount googleSignInAccount, GoogleSignInOptions googleSignInOptions) {
|
||||
Preconditions.checkNotNull(googleSignInAccount);
|
||||
Preconditions.checkNotNull(googleSignInOptions);
|
||||
zad("defaultGoogleSignInAccount", googleSignInAccount.zac());
|
||||
Preconditions.checkNotNull(googleSignInAccount);
|
||||
Preconditions.checkNotNull(googleSignInOptions);
|
||||
String zac = googleSignInAccount.zac();
|
||||
zad(zae("googleSignInAccount", zac), googleSignInAccount.zad());
|
||||
zad(zae("googleSignInOptions", zac), googleSignInOptions.zaf());
|
||||
}
|
||||
|
||||
public final String zaa(String str) {
|
||||
this.zac.lock();
|
||||
try {
|
||||
return this.zad.getString(str, null);
|
||||
} finally {
|
||||
this.zac.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public final void zab(String str) {
|
||||
this.zac.lock();
|
||||
try {
|
||||
this.zad.edit().remove(str).apply();
|
||||
} finally {
|
||||
this.zac.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public final void zac() {
|
||||
String zaa2 = zaa("defaultGoogleSignInAccount");
|
||||
zab("defaultGoogleSignInAccount");
|
||||
if (TextUtils.isEmpty(zaa2)) {
|
||||
return;
|
||||
}
|
||||
zab(zae("googleSignInAccount", zaa2));
|
||||
zab(zae("googleSignInOptions", zaa2));
|
||||
}
|
||||
|
||||
public final void zad(String str, String str2) {
|
||||
this.zac.lock();
|
||||
try {
|
||||
this.zad.edit().putString(str, str2).apply();
|
||||
} finally {
|
||||
this.zac.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.auth.api.signin.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaa implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
int i = 0;
|
||||
Bundle bundle = null;
|
||||
int i4 = 0;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
int fieldId = SafeParcelReader.getFieldId(readHeader);
|
||||
if (fieldId == 1) {
|
||||
i = SafeParcelReader.readInt(parcel, readHeader);
|
||||
} else if (fieldId == 2) {
|
||||
i4 = SafeParcelReader.readInt(parcel, readHeader);
|
||||
} else if (fieldId != 3) {
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
} else {
|
||||
bundle = SafeParcelReader.createBundle(parcel, readHeader);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new GoogleSignInOptionsExtensionParcelable(i, i4, bundle);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new GoogleSignInOptionsExtensionParcelable[i];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zab implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
int i = 0;
|
||||
String str = null;
|
||||
String str2 = null;
|
||||
String str3 = null;
|
||||
String str4 = null;
|
||||
Uri uri = null;
|
||||
String str5 = null;
|
||||
String str6 = null;
|
||||
ArrayList arrayList = null;
|
||||
String str7 = null;
|
||||
String str8 = null;
|
||||
long j4 = 0;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
switch (SafeParcelReader.getFieldId(readHeader)) {
|
||||
case 1:
|
||||
i = SafeParcelReader.readInt(parcel, readHeader);
|
||||
break;
|
||||
case 2:
|
||||
str = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 3:
|
||||
str2 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 4:
|
||||
str3 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 5:
|
||||
str4 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 6:
|
||||
uri = (Uri) SafeParcelReader.createParcelable(parcel, readHeader, Uri.CREATOR);
|
||||
break;
|
||||
case 7:
|
||||
str5 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 8:
|
||||
j4 = SafeParcelReader.readLong(parcel, readHeader);
|
||||
break;
|
||||
case 9:
|
||||
str6 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 10:
|
||||
arrayList = SafeParcelReader.createTypedList(parcel, readHeader, Scope.CREATOR);
|
||||
break;
|
||||
case 11:
|
||||
str7 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 12:
|
||||
str8 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
default:
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new GoogleSignInAccount(i, str, str2, str3, str4, uri, str5, j4, str6, arrayList, str7, str8);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new GoogleSignInAccount[i];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import java.util.Comparator;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zac implements Comparator {
|
||||
@Override // java.util.Comparator
|
||||
public final /* bridge */ /* synthetic */ int compare(Object obj, Object obj2) {
|
||||
return ((Scope) obj).getScopeUri().compareTo(((Scope) obj2).getScopeUri());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.google.android.gms.auth.api.signin;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.auth.api.signin.internal.GoogleSignInOptionsExtensionParcelable;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zae implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
int i = 0;
|
||||
boolean z3 = false;
|
||||
boolean z4 = false;
|
||||
boolean z5 = false;
|
||||
ArrayList arrayList = null;
|
||||
Account account = null;
|
||||
String str = null;
|
||||
String str2 = null;
|
||||
ArrayList arrayList2 = null;
|
||||
String str3 = null;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
switch (SafeParcelReader.getFieldId(readHeader)) {
|
||||
case 1:
|
||||
i = SafeParcelReader.readInt(parcel, readHeader);
|
||||
break;
|
||||
case 2:
|
||||
arrayList = SafeParcelReader.createTypedList(parcel, readHeader, Scope.CREATOR);
|
||||
break;
|
||||
case 3:
|
||||
account = (Account) SafeParcelReader.createParcelable(parcel, readHeader, Account.CREATOR);
|
||||
break;
|
||||
case 4:
|
||||
z3 = SafeParcelReader.readBoolean(parcel, readHeader);
|
||||
break;
|
||||
case 5:
|
||||
z4 = SafeParcelReader.readBoolean(parcel, readHeader);
|
||||
break;
|
||||
case 6:
|
||||
z5 = SafeParcelReader.readBoolean(parcel, readHeader);
|
||||
break;
|
||||
case 7:
|
||||
str = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 8:
|
||||
str2 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
case 9:
|
||||
arrayList2 = SafeParcelReader.createTypedList(parcel, readHeader, GoogleSignInOptionsExtensionParcelable.CREATOR);
|
||||
break;
|
||||
case 10:
|
||||
str3 = SafeParcelReader.createString(parcel, readHeader);
|
||||
break;
|
||||
default:
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new GoogleSignInOptions(i, arrayList, account, z3, z4, z5, str, str2, arrayList2, str3);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new GoogleSignInOptions[i];
|
||||
}
|
||||
}
|
||||
122
apk_decompiled/sources/com/google/android/gms/base/R.java
Normal file
122
apk_decompiled/sources/com/google/android/gms/base/R.java
Normal file
@@ -0,0 +1,122 @@
|
||||
package com.google.android.gms.base;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class attr {
|
||||
public static final int buttonSize = 0x7f0300a5;
|
||||
public static final int circleCrop = 0x7f0300e9;
|
||||
public static final int colorScheme = 0x7f030135;
|
||||
public static final int imageAspectRatio = 0x7f030271;
|
||||
public static final int imageAspectRatioAdjust = 0x7f030272;
|
||||
public static final int scopeUris = 0x7f03041a;
|
||||
|
||||
private attr() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class color {
|
||||
public static final int common_google_signin_btn_text_dark = 0x7f050045;
|
||||
public static final int common_google_signin_btn_text_dark_default = 0x7f050046;
|
||||
public static final int common_google_signin_btn_text_dark_disabled = 0x7f050047;
|
||||
public static final int common_google_signin_btn_text_dark_focused = 0x7f050048;
|
||||
public static final int common_google_signin_btn_text_dark_pressed = 0x7f050049;
|
||||
public static final int common_google_signin_btn_text_light = 0x7f05004a;
|
||||
public static final int common_google_signin_btn_text_light_default = 0x7f05004b;
|
||||
public static final int common_google_signin_btn_text_light_disabled = 0x7f05004c;
|
||||
public static final int common_google_signin_btn_text_light_focused = 0x7f05004d;
|
||||
public static final int common_google_signin_btn_text_light_pressed = 0x7f05004e;
|
||||
public static final int common_google_signin_btn_tint = 0x7f05004f;
|
||||
|
||||
private color() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class drawable {
|
||||
public static final int common_full_open_on_phone = 0x7f07008b;
|
||||
public static final int common_google_signin_btn_icon_dark = 0x7f07008c;
|
||||
public static final int common_google_signin_btn_icon_dark_focused = 0x7f07008d;
|
||||
public static final int common_google_signin_btn_icon_dark_normal = 0x7f07008e;
|
||||
public static final int common_google_signin_btn_icon_dark_normal_background = 0x7f07008f;
|
||||
public static final int common_google_signin_btn_icon_disabled = 0x7f070090;
|
||||
public static final int common_google_signin_btn_icon_light = 0x7f070091;
|
||||
public static final int common_google_signin_btn_icon_light_focused = 0x7f070092;
|
||||
public static final int common_google_signin_btn_icon_light_normal = 0x7f070093;
|
||||
public static final int common_google_signin_btn_icon_light_normal_background = 0x7f070094;
|
||||
public static final int common_google_signin_btn_text_dark = 0x7f070095;
|
||||
public static final int common_google_signin_btn_text_dark_focused = 0x7f070096;
|
||||
public static final int common_google_signin_btn_text_dark_normal = 0x7f070097;
|
||||
public static final int common_google_signin_btn_text_dark_normal_background = 0x7f070098;
|
||||
public static final int common_google_signin_btn_text_disabled = 0x7f070099;
|
||||
public static final int common_google_signin_btn_text_light = 0x7f07009a;
|
||||
public static final int common_google_signin_btn_text_light_focused = 0x7f07009b;
|
||||
public static final int common_google_signin_btn_text_light_normal = 0x7f07009c;
|
||||
public static final int common_google_signin_btn_text_light_normal_background = 0x7f07009d;
|
||||
public static final int googleg_disabled_color_18 = 0x7f0700ac;
|
||||
public static final int googleg_standard_color_18 = 0x7f0700ad;
|
||||
|
||||
private drawable() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class id {
|
||||
public static final int adjust_height = 0x7f090058;
|
||||
public static final int adjust_width = 0x7f090059;
|
||||
public static final int auto = 0x7f090072;
|
||||
public static final int dark = 0x7f0900ea;
|
||||
public static final int icon_only = 0x7f090198;
|
||||
public static final int light = 0x7f0901e7;
|
||||
public static final int none = 0x7f090264;
|
||||
public static final int standard = 0x7f090321;
|
||||
public static final int wide = 0x7f090401;
|
||||
|
||||
private id() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class string {
|
||||
public static final int common_google_play_services_enable_button = 0x7f1300b4;
|
||||
public static final int common_google_play_services_enable_text = 0x7f1300b5;
|
||||
public static final int common_google_play_services_enable_title = 0x7f1300b6;
|
||||
public static final int common_google_play_services_install_button = 0x7f1300b7;
|
||||
public static final int common_google_play_services_install_text = 0x7f1300b8;
|
||||
public static final int common_google_play_services_install_title = 0x7f1300b9;
|
||||
public static final int common_google_play_services_notification_channel_name = 0x7f1300ba;
|
||||
public static final int common_google_play_services_notification_ticker = 0x7f1300bb;
|
||||
public static final int common_google_play_services_unsupported_text = 0x7f1300bd;
|
||||
public static final int common_google_play_services_update_button = 0x7f1300be;
|
||||
public static final int common_google_play_services_update_text = 0x7f1300bf;
|
||||
public static final int common_google_play_services_update_title = 0x7f1300c0;
|
||||
public static final int common_google_play_services_updating_text = 0x7f1300c1;
|
||||
public static final int common_google_play_services_wear_update_text = 0x7f1300c2;
|
||||
public static final int common_open_on_phone = 0x7f1300c4;
|
||||
public static final int common_signin_button_text = 0x7f1300c5;
|
||||
public static final int common_signin_button_text_long = 0x7f1300c6;
|
||||
|
||||
private string() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class styleable {
|
||||
public static final int LoadingImageView_circleCrop = 0x00000000;
|
||||
public static final int LoadingImageView_imageAspectRatio = 0x00000001;
|
||||
public static final int LoadingImageView_imageAspectRatioAdjust = 0x00000002;
|
||||
public static final int SignInButton_buttonSize = 0x00000000;
|
||||
public static final int SignInButton_colorScheme = 0x00000001;
|
||||
public static final int SignInButton_scopeUris = 0x00000002;
|
||||
public static final int[] LoadingImageView = {com.adif.elcanomovil.R.attr.circleCrop, com.adif.elcanomovil.R.attr.imageAspectRatio, com.adif.elcanomovil.R.attr.imageAspectRatioAdjust};
|
||||
public static final int[] SignInButton = {com.adif.elcanomovil.R.attr.buttonSize, com.adif.elcanomovil.R.attr.colorScheme, com.adif.elcanomovil.R.attr.scopeUris};
|
||||
|
||||
private styleable() {
|
||||
}
|
||||
}
|
||||
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.Map;
|
||||
import s.j;
|
||||
|
||||
@SafeParcelable.Class(creator = "CloudMessageCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class CloudMessage extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<CloudMessage> CREATOR = new zzb();
|
||||
public static final int PRIORITY_HIGH = 1;
|
||||
public static final int PRIORITY_NORMAL = 2;
|
||||
public static final int PRIORITY_UNKNOWN = 0;
|
||||
|
||||
@SafeParcelable.Field(id = 1)
|
||||
final Intent zza;
|
||||
private Map zzb;
|
||||
|
||||
@Target({ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface MessagePriority {
|
||||
}
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public CloudMessage(@SafeParcelable.Param(id = 1) Intent intent) {
|
||||
this.zza = intent;
|
||||
}
|
||||
|
||||
private static int zzb(String str) {
|
||||
if (zza.zza(str, "high")) {
|
||||
return 1;
|
||||
}
|
||||
return zza.zza(str, "normal") ? 2 : 0;
|
||||
}
|
||||
|
||||
public String getCollapseKey() {
|
||||
return this.zza.getStringExtra(Constants.MessagePayloadKeys.COLLAPSE_KEY);
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r1v0, types: [java.util.Map, s.j] */
|
||||
public synchronized Map<String, String> getData() {
|
||||
try {
|
||||
if (this.zzb == null) {
|
||||
Bundle extras = this.zza.getExtras();
|
||||
?? jVar = new j(0);
|
||||
if (extras != null) {
|
||||
for (String str : extras.keySet()) {
|
||||
Object obj = extras.get(str);
|
||||
if (obj instanceof String) {
|
||||
String str2 = (String) obj;
|
||||
if (!str.startsWith(Constants.MessagePayloadKeys.RESERVED_PREFIX) && !str.equals(Constants.MessagePayloadKeys.FROM) && !str.equals(Constants.MessagePayloadKeys.MESSAGE_TYPE) && !str.equals(Constants.MessagePayloadKeys.COLLAPSE_KEY)) {
|
||||
jVar.put(str, str2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.zzb = jVar;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public String getFrom() {
|
||||
return this.zza.getStringExtra(Constants.MessagePayloadKeys.FROM);
|
||||
}
|
||||
|
||||
public Intent getIntent() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public String getMessageId() {
|
||||
String stringExtra = this.zza.getStringExtra(Constants.MessagePayloadKeys.MSGID);
|
||||
return stringExtra == null ? this.zza.getStringExtra(Constants.MessagePayloadKeys.MSGID_SERVER) : stringExtra;
|
||||
}
|
||||
|
||||
public String getMessageType() {
|
||||
return this.zza.getStringExtra(Constants.MessagePayloadKeys.MESSAGE_TYPE);
|
||||
}
|
||||
|
||||
public int getOriginalPriority() {
|
||||
String stringExtra = this.zza.getStringExtra(Constants.MessagePayloadKeys.ORIGINAL_PRIORITY);
|
||||
if (stringExtra == null) {
|
||||
stringExtra = this.zza.getStringExtra(Constants.MessagePayloadKeys.PRIORITY_V19);
|
||||
}
|
||||
return zzb(stringExtra);
|
||||
}
|
||||
|
||||
public int getPriority() {
|
||||
String stringExtra = this.zza.getStringExtra(Constants.MessagePayloadKeys.DELIVERED_PRIORITY);
|
||||
if (stringExtra == null) {
|
||||
if (zza.zza(this.zza.getStringExtra(Constants.MessagePayloadKeys.PRIORITY_REDUCED_V19), "1")) {
|
||||
return 2;
|
||||
}
|
||||
stringExtra = this.zza.getStringExtra(Constants.MessagePayloadKeys.PRIORITY_V19);
|
||||
}
|
||||
return zzb(stringExtra);
|
||||
}
|
||||
|
||||
public byte[] getRawData() {
|
||||
return this.zza.getByteArrayExtra(Constants.MessagePayloadKeys.RAW_DATA);
|
||||
}
|
||||
|
||||
public String getSenderId() {
|
||||
return this.zza.getStringExtra(Constants.MessagePayloadKeys.SENDER_ID);
|
||||
}
|
||||
|
||||
public long getSentTime() {
|
||||
Bundle extras = this.zza.getExtras();
|
||||
Object obj = extras != null ? extras.get(Constants.MessagePayloadKeys.SENT_TIME) : null;
|
||||
if (obj instanceof Long) {
|
||||
return ((Long) obj).longValue();
|
||||
}
|
||||
if (!(obj instanceof String)) {
|
||||
return 0L;
|
||||
}
|
||||
try {
|
||||
return Long.parseLong((String) obj);
|
||||
} catch (NumberFormatException unused) {
|
||||
Log.w("CloudMessage", "Invalid sent time: ".concat(String.valueOf(obj)));
|
||||
return 0L;
|
||||
}
|
||||
}
|
||||
|
||||
public String getTo() {
|
||||
return this.zza.getStringExtra(Constants.MessagePayloadKeys.TO);
|
||||
}
|
||||
|
||||
public int getTtl() {
|
||||
Bundle extras = this.zza.getExtras();
|
||||
Object obj = extras != null ? extras.get(Constants.MessagePayloadKeys.TTL) : null;
|
||||
if (obj instanceof Integer) {
|
||||
return ((Integer) obj).intValue();
|
||||
}
|
||||
if (!(obj instanceof String)) {
|
||||
return 0;
|
||||
}
|
||||
try {
|
||||
return Integer.parseInt((String) obj);
|
||||
} catch (NumberFormatException unused) {
|
||||
Log.w("CloudMessage", "Invalid TTL: ".concat(String.valueOf(obj)));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeParcelable(parcel, 1, this.zza, i, false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public final Integer zza() {
|
||||
if (this.zza.hasExtra(Constants.MessagePayloadKeys.PRODUCT_ID)) {
|
||||
return Integer.valueOf(this.zza.getIntExtra(Constants.MessagePayloadKeys.PRODUCT_ID, 0));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.util.concurrent.NamedThreadFactory;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import com.google.firebase.messaging.ServiceStarter;
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class CloudMessagingReceiver extends BroadcastReceiver {
|
||||
private static SoftReference zza;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class IntentActionKeys {
|
||||
public static final String NOTIFICATION_DISMISS = "com.google.firebase.messaging.NOTIFICATION_DISMISS";
|
||||
public static final String NOTIFICATION_OPEN = "com.google.firebase.messaging.NOTIFICATION_OPEN";
|
||||
|
||||
private IntentActionKeys() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class IntentKeys {
|
||||
public static final String PENDING_INTENT = "pending_intent";
|
||||
public static final String WRAPPED_INTENT = "wrapped_intent";
|
||||
|
||||
private IntentKeys() {
|
||||
}
|
||||
}
|
||||
|
||||
private final int zzb(Context context, Intent intent) {
|
||||
Task zzc;
|
||||
if (intent.getExtras() == null) {
|
||||
return ServiceStarter.ERROR_UNKNOWN;
|
||||
}
|
||||
CloudMessage cloudMessage = new CloudMessage(intent);
|
||||
if (TextUtils.isEmpty(cloudMessage.getMessageId())) {
|
||||
zzc = Tasks.forResult(null);
|
||||
} else {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.MessagePayloadKeys.MSGID, cloudMessage.getMessageId());
|
||||
Integer zza2 = cloudMessage.zza();
|
||||
if (zza2 != null) {
|
||||
bundle.putInt(Constants.MessagePayloadKeys.PRODUCT_ID, zza2.intValue());
|
||||
}
|
||||
bundle.putBoolean("supports_message_handled", true);
|
||||
zzc = zzu.zzb(context).zzc(2, bundle);
|
||||
}
|
||||
int onMessageReceive = onMessageReceive(context, cloudMessage);
|
||||
try {
|
||||
Tasks.await(zzc, TimeUnit.SECONDS.toMillis(1L), TimeUnit.MILLISECONDS);
|
||||
return onMessageReceive;
|
||||
} catch (InterruptedException | ExecutionException | TimeoutException e4) {
|
||||
Log.w("CloudMessagingReceiver", "Message ack failed: ".concat(e4.toString()));
|
||||
return onMessageReceive;
|
||||
}
|
||||
}
|
||||
|
||||
private final int zzc(Context context, Intent intent) {
|
||||
PendingIntent pendingIntent = (PendingIntent) intent.getParcelableExtra(IntentKeys.PENDING_INTENT);
|
||||
if (pendingIntent != null) {
|
||||
try {
|
||||
pendingIntent.send();
|
||||
} catch (PendingIntent.CanceledException unused) {
|
||||
Log.e("CloudMessagingReceiver", "Notification pending intent canceled");
|
||||
}
|
||||
}
|
||||
Bundle extras = intent.getExtras();
|
||||
if (extras != null) {
|
||||
extras.remove(IntentKeys.PENDING_INTENT);
|
||||
} else {
|
||||
extras = new Bundle();
|
||||
}
|
||||
String action = intent.getAction();
|
||||
if (action == IntentActionKeys.NOTIFICATION_DISMISS || (action != null && action.equals(IntentActionKeys.NOTIFICATION_DISMISS))) {
|
||||
onNotificationDismissed(context, extras);
|
||||
return -1;
|
||||
}
|
||||
Log.e("CloudMessagingReceiver", "Unknown notification action");
|
||||
return ServiceStarter.ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
public Executor getBroadcastExecutor() {
|
||||
ExecutorService executorService;
|
||||
synchronized (CloudMessagingReceiver.class) {
|
||||
try {
|
||||
SoftReference softReference = zza;
|
||||
executorService = softReference != null ? (ExecutorService) softReference.get() : null;
|
||||
if (executorService == null) {
|
||||
com.google.android.gms.internal.cloudmessaging.zze.zza();
|
||||
executorService = Executors.unconfigurableExecutorService(Executors.newCachedThreadPool(new NamedThreadFactory("firebase-iid-executor")));
|
||||
zza = new SoftReference(executorService);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return executorService;
|
||||
}
|
||||
|
||||
public abstract int onMessageReceive(Context context, CloudMessage cloudMessage);
|
||||
|
||||
public void onNotificationDismissed(Context context, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.content.BroadcastReceiver
|
||||
public final void onReceive(final Context context, final Intent intent) {
|
||||
if (intent == null) {
|
||||
return;
|
||||
}
|
||||
final boolean isOrderedBroadcast = isOrderedBroadcast();
|
||||
final BroadcastReceiver.PendingResult goAsync = goAsync();
|
||||
getBroadcastExecutor().execute(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzf
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
CloudMessagingReceiver.this.zza(intent, context, isOrderedBroadcast, goAsync);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final /* synthetic */ void zza(Intent intent, Context context, boolean z3, BroadcastReceiver.PendingResult pendingResult) {
|
||||
try {
|
||||
Parcelable parcelableExtra = intent.getParcelableExtra(IntentKeys.WRAPPED_INTENT);
|
||||
Intent intent2 = parcelableExtra instanceof Intent ? (Intent) parcelableExtra : null;
|
||||
int zzc = intent2 != null ? zzc(context, intent2) : zzb(context, intent);
|
||||
if (z3) {
|
||||
pendingResult.setResultCode(zzc);
|
||||
}
|
||||
pendingResult.finish();
|
||||
} catch (Throwable th) {
|
||||
pendingResult.finish();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Message;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
interface IMessengerCompat extends IInterface {
|
||||
public static final String DESCRIPTOR = "com.google.android.gms.iid.IMessengerCompat";
|
||||
public static final int TRANSACTION_SEND = 1;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Impl extends Binder implements IMessengerCompat {
|
||||
@Override // android.os.IInterface
|
||||
public IBinder asBinder() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // android.os.Binder
|
||||
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i4) throws RemoteException {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.IMessengerCompat
|
||||
public void send(Message message) throws RemoteException {
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Proxy implements IMessengerCompat {
|
||||
private final IBinder zza;
|
||||
|
||||
public Proxy(IBinder iBinder) {
|
||||
this.zza = iBinder;
|
||||
}
|
||||
|
||||
@Override // android.os.IInterface
|
||||
public IBinder asBinder() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.IMessengerCompat
|
||||
public void send(Message message) throws RemoteException {
|
||||
Parcel obtain = Parcel.obtain();
|
||||
obtain.writeInterfaceToken(IMessengerCompat.DESCRIPTOR);
|
||||
obtain.writeInt(1);
|
||||
message.writeToParcel(obtain, 0);
|
||||
try {
|
||||
this.zza.transact(1, obtain, null, 1);
|
||||
} finally {
|
||||
obtain.recycle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void send(Message message) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
import android.os.Parcelable;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.Continuation;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.SuccessContinuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import s.j;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Rpc {
|
||||
private static int zza;
|
||||
private static PendingIntent zzb;
|
||||
private static final Executor zzc = new Executor() { // from class: com.google.android.gms.cloudmessaging.zzy
|
||||
@Override // java.util.concurrent.Executor
|
||||
public final void execute(Runnable runnable) {
|
||||
runnable.run();
|
||||
}
|
||||
};
|
||||
private static final Pattern zzd = Pattern.compile("\\|ID\\|([^|]+)\\|:?+(.*)");
|
||||
private final Context zzf;
|
||||
private final zzv zzg;
|
||||
private final ScheduledExecutorService zzh;
|
||||
private Messenger zzj;
|
||||
private zze zzk;
|
||||
private final j zze = new j(0);
|
||||
private final Messenger zzi = new Messenger(new zzad(this, Looper.getMainLooper()));
|
||||
|
||||
public Rpc(Context context) {
|
||||
this.zzf = context;
|
||||
this.zzg = new zzv(context);
|
||||
ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
|
||||
scheduledThreadPoolExecutor.setKeepAliveTime(60L, TimeUnit.SECONDS);
|
||||
scheduledThreadPoolExecutor.allowCoreThreadTimeOut(true);
|
||||
this.zzh = scheduledThreadPoolExecutor;
|
||||
}
|
||||
|
||||
public static /* synthetic */ Task zza(Bundle bundle) throws Exception {
|
||||
return zzi(bundle) ? Tasks.forResult(null) : Tasks.forResult(bundle);
|
||||
}
|
||||
|
||||
public static void zzc(Rpc rpc, Message message) {
|
||||
if (message != null) {
|
||||
Object obj = message.obj;
|
||||
if (obj instanceof Intent) {
|
||||
Intent intent = (Intent) obj;
|
||||
intent.setExtrasClassLoader(new zzd());
|
||||
if (intent.hasExtra("google.messenger")) {
|
||||
Parcelable parcelableExtra = intent.getParcelableExtra("google.messenger");
|
||||
if (parcelableExtra instanceof zze) {
|
||||
rpc.zzk = (zze) parcelableExtra;
|
||||
}
|
||||
if (parcelableExtra instanceof Messenger) {
|
||||
rpc.zzj = (Messenger) parcelableExtra;
|
||||
}
|
||||
}
|
||||
Intent intent2 = (Intent) message.obj;
|
||||
String action = intent2.getAction();
|
||||
if (!zzw.zza(action, "com.google.android.c2dm.intent.REGISTRATION")) {
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Unexpected response action: ".concat(String.valueOf(action)));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
String stringExtra = intent2.getStringExtra("registration_id");
|
||||
if (stringExtra == null) {
|
||||
stringExtra = intent2.getStringExtra("unregistered");
|
||||
}
|
||||
if (stringExtra != null) {
|
||||
Matcher matcher = zzd.matcher(stringExtra);
|
||||
if (!matcher.matches()) {
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Unexpected response string: ".concat(stringExtra));
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
String group = matcher.group(1);
|
||||
String group2 = matcher.group(2);
|
||||
if (group != null) {
|
||||
Bundle extras = intent2.getExtras();
|
||||
extras.putString("registration_id", group2);
|
||||
rpc.zzh(group, extras);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
String stringExtra2 = intent2.getStringExtra(Constants.IPC_BUNDLE_KEY_SEND_ERROR);
|
||||
if (stringExtra2 == null) {
|
||||
Log.w("Rpc", "Unexpected response, no error or registration id ".concat(String.valueOf(intent2.getExtras())));
|
||||
return;
|
||||
}
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Received InstanceID error ".concat(stringExtra2));
|
||||
}
|
||||
if (!stringExtra2.startsWith("|")) {
|
||||
synchronized (rpc.zze) {
|
||||
int i = 0;
|
||||
while (true) {
|
||||
try {
|
||||
j jVar = rpc.zze;
|
||||
if (i < jVar.f8352c) {
|
||||
rpc.zzh((String) jVar.f(i), intent2.getExtras());
|
||||
i++;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
String[] split = stringExtra2.split("\\|");
|
||||
if (split.length <= 2 || !zzw.zza(split[1], "ID")) {
|
||||
Log.w("Rpc", "Unexpected structured response ".concat(stringExtra2));
|
||||
return;
|
||||
}
|
||||
String str = split[2];
|
||||
String str2 = split[3];
|
||||
if (str2.startsWith(":")) {
|
||||
str2 = str2.substring(1);
|
||||
}
|
||||
rpc.zzh(str, intent2.putExtra(Constants.IPC_BUNDLE_KEY_SEND_ERROR, str2).getExtras());
|
||||
return;
|
||||
}
|
||||
}
|
||||
Log.w("Rpc", "Dropping invalid message");
|
||||
}
|
||||
|
||||
private final Task zze(Bundle bundle) {
|
||||
final String zzf = zzf();
|
||||
final TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
synchronized (this.zze) {
|
||||
this.zze.put(zzf, taskCompletionSource);
|
||||
}
|
||||
Intent intent = new Intent();
|
||||
intent.setPackage("com.google.android.gms");
|
||||
if (this.zzg.zzb() == 2) {
|
||||
intent.setAction("com.google.iid.TOKEN_REQUEST");
|
||||
} else {
|
||||
intent.setAction("com.google.android.c2dm.intent.REGISTER");
|
||||
}
|
||||
intent.putExtras(bundle);
|
||||
zzg(this.zzf, intent);
|
||||
intent.putExtra("kid", "|ID|" + zzf + "|");
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Sending ".concat(String.valueOf(intent.getExtras())));
|
||||
}
|
||||
intent.putExtra("google.messenger", this.zzi);
|
||||
if (this.zzj != null || this.zzk != null) {
|
||||
Message obtain = Message.obtain();
|
||||
obtain.obj = intent;
|
||||
try {
|
||||
Messenger messenger = this.zzj;
|
||||
if (messenger != null) {
|
||||
messenger.send(obtain);
|
||||
} else {
|
||||
this.zzk.zzb(obtain);
|
||||
}
|
||||
} catch (RemoteException unused) {
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Messenger failed, fallback to startService");
|
||||
}
|
||||
}
|
||||
final ScheduledFuture<?> schedule = this.zzh.schedule(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzab
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
if (TaskCompletionSource.this.trySetException(new IOException("TIMEOUT"))) {
|
||||
Log.w("Rpc", "No response");
|
||||
}
|
||||
}
|
||||
}, 30L, TimeUnit.SECONDS);
|
||||
taskCompletionSource.getTask().addOnCompleteListener(zzc, new OnCompleteListener() { // from class: com.google.android.gms.cloudmessaging.zzac
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public final void onComplete(Task task) {
|
||||
Rpc.this.zzd(zzf, schedule, task);
|
||||
}
|
||||
});
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
if (this.zzg.zzb() == 2) {
|
||||
this.zzf.sendBroadcast(intent);
|
||||
} else {
|
||||
this.zzf.startService(intent);
|
||||
}
|
||||
final ScheduledFuture schedule2 = this.zzh.schedule(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzab
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
if (TaskCompletionSource.this.trySetException(new IOException("TIMEOUT"))) {
|
||||
Log.w("Rpc", "No response");
|
||||
}
|
||||
}
|
||||
}, 30L, TimeUnit.SECONDS);
|
||||
taskCompletionSource.getTask().addOnCompleteListener(zzc, new OnCompleteListener() { // from class: com.google.android.gms.cloudmessaging.zzac
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public final void onComplete(Task task) {
|
||||
Rpc.this.zzd(zzf, schedule2, task);
|
||||
}
|
||||
});
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
private static synchronized String zzf() {
|
||||
String num;
|
||||
synchronized (Rpc.class) {
|
||||
int i = zza;
|
||||
zza = i + 1;
|
||||
num = Integer.toString(i);
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
private static synchronized void zzg(Context context, Intent intent) {
|
||||
synchronized (Rpc.class) {
|
||||
try {
|
||||
if (zzb == null) {
|
||||
Intent intent2 = new Intent();
|
||||
intent2.setPackage("com.google.example.invalidpackage");
|
||||
zzb = PendingIntent.getBroadcast(context, 0, intent2, com.google.android.gms.internal.cloudmessaging.zza.zza);
|
||||
}
|
||||
intent.putExtra("app", zzb);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void zzh(String str, Bundle bundle) {
|
||||
synchronized (this.zze) {
|
||||
try {
|
||||
TaskCompletionSource taskCompletionSource = (TaskCompletionSource) this.zze.remove(str);
|
||||
if (taskCompletionSource != null) {
|
||||
taskCompletionSource.setResult(bundle);
|
||||
return;
|
||||
}
|
||||
Log.w("Rpc", "Missing callback for " + str);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean zzi(Bundle bundle) {
|
||||
return bundle != null && bundle.containsKey("google.messenger");
|
||||
}
|
||||
|
||||
public Task<Void> messageHandled(CloudMessage cloudMessage) {
|
||||
if (this.zzg.zza() < 233700000) {
|
||||
return Tasks.forException(new IOException("SERVICE_NOT_AVAILABLE"));
|
||||
}
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.MessagePayloadKeys.MSGID, cloudMessage.getMessageId());
|
||||
Integer zza2 = cloudMessage.zza();
|
||||
if (zza2 != null) {
|
||||
bundle.putInt(Constants.MessagePayloadKeys.PRODUCT_ID, zza2.intValue());
|
||||
}
|
||||
return zzu.zzb(this.zzf).zzc(3, bundle);
|
||||
}
|
||||
|
||||
public Task<Bundle> send(final Bundle bundle) {
|
||||
return this.zzg.zza() < 12000000 ? this.zzg.zzb() != 0 ? zze(bundle).continueWithTask(zzc, new Continuation() { // from class: com.google.android.gms.cloudmessaging.zzz
|
||||
@Override // com.google.android.gms.tasks.Continuation
|
||||
public final Object then(Task task) {
|
||||
return Rpc.this.zzb(bundle, task);
|
||||
}
|
||||
}) : Tasks.forException(new IOException("MISSING_INSTANCEID_SERVICE")) : zzu.zzb(this.zzf).zzd(1, bundle).continueWith(zzc, new Continuation() { // from class: com.google.android.gms.cloudmessaging.zzaa
|
||||
@Override // com.google.android.gms.tasks.Continuation
|
||||
public final Object then(Task task) {
|
||||
if (task.isSuccessful()) {
|
||||
return (Bundle) task.getResult();
|
||||
}
|
||||
if (Log.isLoggable("Rpc", 3)) {
|
||||
Log.d("Rpc", "Error making request: ".concat(String.valueOf(task.getException())));
|
||||
}
|
||||
throw new IOException("SERVICE_NOT_AVAILABLE", task.getException());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final /* synthetic */ Task zzb(Bundle bundle, Task task) throws Exception {
|
||||
return (task.isSuccessful() && zzi((Bundle) task.getResult())) ? zze(bundle).onSuccessTask(zzc, new SuccessContinuation() { // from class: com.google.android.gms.cloudmessaging.zzx
|
||||
@Override // com.google.android.gms.tasks.SuccessContinuation
|
||||
public final Task then(Object obj) {
|
||||
return Rpc.zza((Bundle) obj);
|
||||
}
|
||||
}) : task;
|
||||
}
|
||||
|
||||
public final /* synthetic */ void zzd(String str, ScheduledFuture scheduledFuture, Task task) {
|
||||
synchronized (this.zze) {
|
||||
this.zze.remove(str);
|
||||
}
|
||||
scheduledFuture.cancel(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class zza {
|
||||
public static /* synthetic */ boolean zza(Object obj, Object obj2) {
|
||||
if (obj != obj2) {
|
||||
return obj != null && obj.equals(obj2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zzad extends com.google.android.gms.internal.cloudmessaging.zzf {
|
||||
final /* synthetic */ Rpc zza;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public zzad(Rpc rpc, Looper looper) {
|
||||
super(looper);
|
||||
this.zza = rpc;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
Rpc.zzc(this.zza, message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzb implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
int validateObjectHeader = SafeParcelReader.validateObjectHeader(parcel);
|
||||
Intent intent = null;
|
||||
while (parcel.dataPosition() < validateObjectHeader) {
|
||||
int readHeader = SafeParcelReader.readHeader(parcel);
|
||||
if (SafeParcelReader.getFieldId(readHeader) != 1) {
|
||||
SafeParcelReader.skipUnknownField(parcel, readHeader);
|
||||
} else {
|
||||
intent = (Intent) SafeParcelReader.createParcelable(parcel, readHeader, Intent.CREATOR);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.ensureAtEnd(parcel, validateObjectHeader);
|
||||
return new CloudMessage(intent);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new CloudMessage[i];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zzc implements Parcelable.Creator {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* bridge */ /* synthetic */ Object createFromParcel(Parcel parcel) {
|
||||
return new zze(parcel.readStrongBinder());
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Object[] newArray(int i) {
|
||||
return new zze[i];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzd extends ClassLoader {
|
||||
@Override // java.lang.ClassLoader
|
||||
public final Class loadClass(String str, boolean z3) throws ClassNotFoundException {
|
||||
if (str != "com.google.android.gms.iid.MessengerCompat" && (str == null || !str.equals("com.google.android.gms.iid.MessengerCompat"))) {
|
||||
return super.loadClass(str, z3);
|
||||
}
|
||||
if (!Log.isLoggable("CloudMessengerCompat", 3)) {
|
||||
return zze.class;
|
||||
}
|
||||
Log.d("CloudMessengerCompat", "Using renamed FirebaseIidMessengerCompat class");
|
||||
return zze.class;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zze implements Parcelable {
|
||||
public static final Parcelable.Creator<zze> CREATOR = new zzc();
|
||||
Messenger zza;
|
||||
IMessengerCompat zzb;
|
||||
|
||||
public zze(IBinder iBinder) {
|
||||
this.zza = new Messenger(iBinder);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
return zza().equals(((zze) obj).zza());
|
||||
} catch (ClassCastException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return zza().hashCode();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
Messenger messenger = this.zza;
|
||||
if (messenger != null) {
|
||||
parcel.writeStrongBinder(messenger.getBinder());
|
||||
} else {
|
||||
parcel.writeStrongBinder(this.zzb.asBinder());
|
||||
}
|
||||
}
|
||||
|
||||
public final IBinder zza() {
|
||||
Messenger messenger = this.zza;
|
||||
return messenger != null ? messenger.getBinder() : this.zzb.asBinder();
|
||||
}
|
||||
|
||||
public final void zzb(Message message) throws RemoteException {
|
||||
Messenger messenger = this.zza;
|
||||
if (messenger != null) {
|
||||
messenger.send(message);
|
||||
} else {
|
||||
this.zzb.send(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,268 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.stats.ConnectionTracker;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Iterator;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzn implements ServiceConnection {
|
||||
zzp zzc;
|
||||
final /* synthetic */ zzu zzf;
|
||||
int zza = 0;
|
||||
final Messenger zzb = new Messenger(new com.google.android.gms.internal.cloudmessaging.zzf(Looper.getMainLooper(), new Handler.Callback() { // from class: com.google.android.gms.cloudmessaging.zzk
|
||||
@Override // android.os.Handler.Callback
|
||||
public final boolean handleMessage(Message message) {
|
||||
int i = message.arg1;
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Received response to request: " + i);
|
||||
}
|
||||
zzn zznVar = zzn.this;
|
||||
synchronized (zznVar) {
|
||||
try {
|
||||
zzr zzrVar = (zzr) zznVar.zze.get(i);
|
||||
if (zzrVar == null) {
|
||||
Log.w("MessengerIpcClient", "Received response for unknown request: " + i);
|
||||
return true;
|
||||
}
|
||||
zznVar.zze.remove(i);
|
||||
zznVar.zzf();
|
||||
Bundle data = message.getData();
|
||||
if (data.getBoolean("unsupported", false)) {
|
||||
zzrVar.zzc(new zzs(4, "Not supported by GmsCore", null));
|
||||
return true;
|
||||
}
|
||||
zzrVar.zza(data);
|
||||
return true;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
final Queue zzd = new ArrayDeque();
|
||||
final SparseArray zze = new SparseArray();
|
||||
|
||||
public /* synthetic */ zzn(zzu zzuVar, zzm zzmVar) {
|
||||
this.zzf = zzuVar;
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceConnected(ComponentName componentName, final IBinder iBinder) {
|
||||
if (Log.isLoggable("MessengerIpcClient", 2)) {
|
||||
Log.v("MessengerIpcClient", "Service connected");
|
||||
}
|
||||
zzu.zze(this.zzf).execute(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzg
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zzn zznVar = zzn.this;
|
||||
IBinder iBinder2 = iBinder;
|
||||
synchronized (zznVar) {
|
||||
if (iBinder2 == null) {
|
||||
zznVar.zza(0, "Null service connection");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
zznVar.zzc = new zzp(iBinder2);
|
||||
zznVar.zza = 2;
|
||||
zznVar.zzc();
|
||||
} catch (RemoteException e4) {
|
||||
zznVar.zza(0, e4.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceDisconnected(ComponentName componentName) {
|
||||
if (Log.isLoggable("MessengerIpcClient", 2)) {
|
||||
Log.v("MessengerIpcClient", "Service disconnected");
|
||||
}
|
||||
zzu.zze(this.zzf).execute(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzj
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zzn.this.zza(2, "Service disconnected");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final synchronized void zza(int i, String str) {
|
||||
zzb(i, str, null);
|
||||
}
|
||||
|
||||
public final synchronized void zzb(int i, String str, Throwable th) {
|
||||
try {
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Disconnected: ".concat(String.valueOf(str)));
|
||||
}
|
||||
int i4 = this.zza;
|
||||
if (i4 == 0) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
if (i4 != 1 && i4 != 2) {
|
||||
if (i4 != 3) {
|
||||
return;
|
||||
}
|
||||
this.zza = 4;
|
||||
return;
|
||||
}
|
||||
if (Log.isLoggable("MessengerIpcClient", 2)) {
|
||||
Log.v("MessengerIpcClient", "Unbinding service");
|
||||
}
|
||||
this.zza = 4;
|
||||
ConnectionTracker.getInstance().unbindService(zzu.zza(this.zzf), this);
|
||||
zzs zzsVar = new zzs(i, str, th);
|
||||
Iterator it = this.zzd.iterator();
|
||||
while (it.hasNext()) {
|
||||
((zzr) it.next()).zzc(zzsVar);
|
||||
}
|
||||
this.zzd.clear();
|
||||
for (int i5 = 0; i5 < this.zze.size(); i5++) {
|
||||
((zzr) this.zze.valueAt(i5)).zzc(zzsVar);
|
||||
}
|
||||
this.zze.clear();
|
||||
} catch (Throwable th2) {
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zzc() {
|
||||
zzu.zze(this.zzf).execute(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzh
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
final zzr zzrVar;
|
||||
while (true) {
|
||||
final zzn zznVar = zzn.this;
|
||||
synchronized (zznVar) {
|
||||
try {
|
||||
if (zznVar.zza != 2) {
|
||||
return;
|
||||
}
|
||||
if (zznVar.zzd.isEmpty()) {
|
||||
zznVar.zzf();
|
||||
return;
|
||||
} else {
|
||||
zzrVar = (zzr) zznVar.zzd.poll();
|
||||
zznVar.zze.put(zzrVar.zza, zzrVar);
|
||||
zzu.zze(zznVar.zzf).schedule(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzl
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zzn.this.zze(zzrVar.zza);
|
||||
}
|
||||
}, 30L, TimeUnit.SECONDS);
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Sending ".concat(String.valueOf(zzrVar)));
|
||||
}
|
||||
zzu zzuVar = zznVar.zzf;
|
||||
Messenger messenger = zznVar.zzb;
|
||||
int i = zzrVar.zzc;
|
||||
Context zza = zzu.zza(zzuVar);
|
||||
Message obtain = Message.obtain();
|
||||
obtain.what = i;
|
||||
obtain.arg1 = zzrVar.zza;
|
||||
obtain.replyTo = messenger;
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putBoolean("oneWay", zzrVar.zzb());
|
||||
bundle.putString("pkg", zza.getPackageName());
|
||||
bundle.putBundle(Constants.ScionAnalytics.MessageType.DATA_MESSAGE, zzrVar.zzd);
|
||||
obtain.setData(bundle);
|
||||
try {
|
||||
zznVar.zzc.zza(obtain);
|
||||
} catch (RemoteException e4) {
|
||||
zznVar.zza(2, e4.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public final synchronized void zzd() {
|
||||
if (this.zza == 1) {
|
||||
zza(1, "Timed out while binding");
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized void zze(int i) {
|
||||
zzr zzrVar = (zzr) this.zze.get(i);
|
||||
if (zzrVar != null) {
|
||||
Log.w("MessengerIpcClient", "Timing out request: " + i);
|
||||
this.zze.remove(i);
|
||||
zzrVar.zzc(new zzs(3, "Timed out waiting for response", null));
|
||||
zzf();
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized void zzf() {
|
||||
try {
|
||||
if (this.zza == 2 && this.zzd.isEmpty() && this.zze.size() == 0) {
|
||||
if (Log.isLoggable("MessengerIpcClient", 2)) {
|
||||
Log.v("MessengerIpcClient", "Finished handling requests, unbinding");
|
||||
}
|
||||
this.zza = 3;
|
||||
ConnectionTracker.getInstance().unbindService(zzu.zza(this.zzf), this);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
public final synchronized boolean zzg(zzr zzrVar) {
|
||||
int i = this.zza;
|
||||
if (i != 0) {
|
||||
if (i == 1) {
|
||||
this.zzd.add(zzrVar);
|
||||
return true;
|
||||
}
|
||||
if (i != 2) {
|
||||
return false;
|
||||
}
|
||||
this.zzd.add(zzrVar);
|
||||
zzc();
|
||||
return true;
|
||||
}
|
||||
this.zzd.add(zzrVar);
|
||||
Preconditions.checkState(this.zza == 0);
|
||||
if (Log.isLoggable("MessengerIpcClient", 2)) {
|
||||
Log.v("MessengerIpcClient", "Starting bind to GmsCore");
|
||||
}
|
||||
this.zza = 1;
|
||||
Intent intent = new Intent("com.google.android.c2dm.intent.REGISTER");
|
||||
intent.setPackage("com.google.android.gms");
|
||||
try {
|
||||
if (ConnectionTracker.getInstance().bindService(zzu.zza(this.zzf), intent, this, 1)) {
|
||||
zzu.zze(this.zzf).schedule(new Runnable() { // from class: com.google.android.gms.cloudmessaging.zzi
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zzn.this.zzd();
|
||||
}
|
||||
}, 30L, TimeUnit.SECONDS);
|
||||
} else {
|
||||
zza(0, "Unable to bind to service");
|
||||
}
|
||||
} catch (SecurityException e4) {
|
||||
zzb(0, "Unable to bind to service", e4);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class zzo {
|
||||
public static /* synthetic */ boolean zza(Object obj, Object obj2) {
|
||||
if (obj != obj2) {
|
||||
return obj != null && obj.equals(obj2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zzp {
|
||||
private final Messenger zza;
|
||||
private final zze zzb;
|
||||
|
||||
public zzp(IBinder iBinder) throws RemoteException {
|
||||
String interfaceDescriptor = iBinder.getInterfaceDescriptor();
|
||||
if (zzo.zza(interfaceDescriptor, "android.os.IMessenger")) {
|
||||
this.zza = new Messenger(iBinder);
|
||||
this.zzb = null;
|
||||
} else {
|
||||
if (!zzo.zza(interfaceDescriptor, IMessengerCompat.DESCRIPTOR)) {
|
||||
Log.w("MessengerIpcClient", "Invalid interface descriptor: ".concat(String.valueOf(interfaceDescriptor)));
|
||||
throw new RemoteException();
|
||||
}
|
||||
this.zzb = new zze(iBinder);
|
||||
this.zza = null;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zza(Message message) throws RemoteException {
|
||||
Messenger messenger = this.zza;
|
||||
if (messenger != null) {
|
||||
messenger.send(message);
|
||||
return;
|
||||
}
|
||||
zze zzeVar = this.zzb;
|
||||
if (zzeVar == null) {
|
||||
throw new IllegalStateException("Both messengers are null");
|
||||
}
|
||||
zzeVar.zzb(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zzq extends zzr {
|
||||
public zzq(int i, int i4, Bundle bundle) {
|
||||
super(i, i4, bundle);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.zzr
|
||||
public final void zza(Bundle bundle) {
|
||||
if (bundle.getBoolean("ack", false)) {
|
||||
zzd(null);
|
||||
} else {
|
||||
zzc(new zzs(4, "Invalid response to one way request", null));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.zzr
|
||||
public final boolean zzb() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class zzr {
|
||||
final int zza;
|
||||
final TaskCompletionSource zzb = new TaskCompletionSource();
|
||||
final int zzc;
|
||||
final Bundle zzd;
|
||||
|
||||
public zzr(int i, int i4, Bundle bundle) {
|
||||
this.zza = i;
|
||||
this.zzc = i4;
|
||||
this.zzd = bundle;
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return "Request { what=" + this.zzc + " id=" + this.zza + " oneWay=" + zzb() + "}";
|
||||
}
|
||||
|
||||
public abstract void zza(Bundle bundle);
|
||||
|
||||
public abstract boolean zzb();
|
||||
|
||||
public final void zzc(zzs zzsVar) {
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Failing " + toString() + " with " + zzsVar.toString());
|
||||
}
|
||||
this.zzb.setException(zzsVar);
|
||||
}
|
||||
|
||||
public final void zzd(Object obj) {
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Finishing " + toString() + " with " + String.valueOf(obj));
|
||||
}
|
||||
this.zzb.setResult(obj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzs extends Exception {
|
||||
public zzs(int i, String str, Throwable th) {
|
||||
super(str, th);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.firebase.messaging.Constants;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zzt extends zzr {
|
||||
public zzt(int i, int i4, Bundle bundle) {
|
||||
super(i, 1, bundle);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.zzr
|
||||
public final void zza(Bundle bundle) {
|
||||
Bundle bundle2 = bundle.getBundle(Constants.ScionAnalytics.MessageType.DATA_MESSAGE);
|
||||
if (bundle2 == null) {
|
||||
bundle2 = Bundle.EMPTY;
|
||||
}
|
||||
zzd(bundle2);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.cloudmessaging.zzr
|
||||
public final boolean zzb() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.util.concurrent.NamedThreadFactory;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzu {
|
||||
private static zzu zza;
|
||||
private final Context zzb;
|
||||
private final ScheduledExecutorService zzc;
|
||||
private zzn zzd = new zzn(this, null);
|
||||
private int zze = 1;
|
||||
|
||||
public zzu(Context context, ScheduledExecutorService scheduledExecutorService) {
|
||||
this.zzc = scheduledExecutorService;
|
||||
this.zzb = context.getApplicationContext();
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ Context zza(zzu zzuVar) {
|
||||
return zzuVar.zzb;
|
||||
}
|
||||
|
||||
public static synchronized zzu zzb(Context context) {
|
||||
zzu zzuVar;
|
||||
synchronized (zzu.class) {
|
||||
try {
|
||||
if (zza == null) {
|
||||
com.google.android.gms.internal.cloudmessaging.zze.zza();
|
||||
zza = new zzu(context, Executors.unconfigurableScheduledExecutorService(Executors.newScheduledThreadPool(1, new NamedThreadFactory("MessengerIpcClient"))));
|
||||
}
|
||||
zzuVar = zza;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return zzuVar;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ ScheduledExecutorService zze(zzu zzuVar) {
|
||||
return zzuVar.zzc;
|
||||
}
|
||||
|
||||
private final synchronized int zzf() {
|
||||
int i;
|
||||
i = this.zze;
|
||||
this.zze = i + 1;
|
||||
return i;
|
||||
}
|
||||
|
||||
private final synchronized Task zzg(zzr zzrVar) {
|
||||
try {
|
||||
if (Log.isLoggable("MessengerIpcClient", 3)) {
|
||||
Log.d("MessengerIpcClient", "Queueing ".concat(zzrVar.toString()));
|
||||
}
|
||||
if (!this.zzd.zzg(zzrVar)) {
|
||||
zzn zznVar = new zzn(this, null);
|
||||
this.zzd = zznVar;
|
||||
zznVar.zzg(zzrVar);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
return zzrVar.zzb.getTask();
|
||||
}
|
||||
|
||||
public final Task zzc(int i, Bundle bundle) {
|
||||
return zzg(new zzq(zzf(), i, bundle));
|
||||
}
|
||||
|
||||
public final Task zzd(int i, Bundle bundle) {
|
||||
return zzg(new zzt(zzf(), 1, bundle));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zzv {
|
||||
private final Context zza;
|
||||
private int zzb;
|
||||
private int zzc = 0;
|
||||
|
||||
public zzv(Context context) {
|
||||
this.zza = context;
|
||||
}
|
||||
|
||||
public final synchronized int zza() {
|
||||
PackageInfo packageInfo;
|
||||
if (this.zzb == 0) {
|
||||
try {
|
||||
packageInfo = Wrappers.packageManager(this.zza).getPackageInfo("com.google.android.gms", 0);
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
Log.w("Metadata", "Failed to find package ".concat(e4.toString()));
|
||||
packageInfo = null;
|
||||
}
|
||||
if (packageInfo != null) {
|
||||
this.zzb = packageInfo.versionCode;
|
||||
}
|
||||
}
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public final synchronized int zzb() {
|
||||
int i = this.zzc;
|
||||
if (i != 0) {
|
||||
return i;
|
||||
}
|
||||
Context context = this.zza;
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
if (Wrappers.packageManager(context).checkPermission("com.google.android.c2dm.permission.SEND", "com.google.android.gms") == -1) {
|
||||
Log.e("Metadata", "Google Play services missing or without correct permission.");
|
||||
return 0;
|
||||
}
|
||||
int i4 = 1;
|
||||
if (!PlatformVersion.isAtLeastO()) {
|
||||
Intent intent = new Intent("com.google.android.c2dm.intent.REGISTER");
|
||||
intent.setPackage("com.google.android.gms");
|
||||
List<ResolveInfo> queryIntentServices = packageManager.queryIntentServices(intent, 0);
|
||||
if (queryIntentServices != null && !queryIntentServices.isEmpty()) {
|
||||
this.zzc = i4;
|
||||
return i4;
|
||||
}
|
||||
}
|
||||
Intent intent2 = new Intent("com.google.iid.TOKEN_REQUEST");
|
||||
intent2.setPackage("com.google.android.gms");
|
||||
List<ResolveInfo> queryBroadcastReceivers = packageManager.queryBroadcastReceivers(intent2, 0);
|
||||
if (queryBroadcastReceivers != null && !queryBroadcastReceivers.isEmpty()) {
|
||||
i4 = 2;
|
||||
this.zzc = i4;
|
||||
return i4;
|
||||
}
|
||||
Log.w("Metadata", "Failed to resolve IID implementation package, falling back");
|
||||
if (true == PlatformVersion.isAtLeastO()) {
|
||||
i4 = 2;
|
||||
}
|
||||
this.zzc = i4;
|
||||
return i4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.cloudmessaging;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class zzw {
|
||||
public static /* synthetic */ boolean zza(Object obj, Object obj2) {
|
||||
if (obj != obj2) {
|
||||
return obj != null && obj.equals(obj2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class AccountPicker {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class AccountChooserOptions {
|
||||
private Account zza;
|
||||
private boolean zzb;
|
||||
private ArrayList zzc;
|
||||
private ArrayList zzd;
|
||||
private boolean zze;
|
||||
private String zzf;
|
||||
private Bundle zzg;
|
||||
private boolean zzh;
|
||||
private int zzi;
|
||||
private String zzj;
|
||||
private boolean zzk;
|
||||
private zza zzl;
|
||||
private String zzm;
|
||||
private boolean zzn;
|
||||
private boolean zzo;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private Account zza;
|
||||
private ArrayList zzb;
|
||||
private ArrayList zzc;
|
||||
private boolean zzd = false;
|
||||
private String zze;
|
||||
private Bundle zzf;
|
||||
|
||||
public AccountChooserOptions build() {
|
||||
Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker");
|
||||
Preconditions.checkArgument(true, "Consent is only valid for account chip styled account picker");
|
||||
AccountChooserOptions accountChooserOptions = new AccountChooserOptions();
|
||||
accountChooserOptions.zzd = this.zzc;
|
||||
accountChooserOptions.zzc = this.zzb;
|
||||
accountChooserOptions.zze = this.zzd;
|
||||
accountChooserOptions.zzl = null;
|
||||
accountChooserOptions.zzj = null;
|
||||
accountChooserOptions.zzg = this.zzf;
|
||||
accountChooserOptions.zza = this.zza;
|
||||
accountChooserOptions.zzb = false;
|
||||
accountChooserOptions.zzh = false;
|
||||
accountChooserOptions.zzm = null;
|
||||
accountChooserOptions.zzi = 0;
|
||||
accountChooserOptions.zzf = this.zze;
|
||||
accountChooserOptions.zzk = false;
|
||||
accountChooserOptions.zzn = false;
|
||||
accountChooserOptions.zzo = false;
|
||||
return accountChooserOptions;
|
||||
}
|
||||
|
||||
public Builder setAllowableAccounts(List<Account> list) {
|
||||
this.zzb = list == null ? null : new ArrayList(list);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAllowableAccountsTypes(List<String> list) {
|
||||
this.zzc = list == null ? null : new ArrayList(list);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAlwaysShowAccountPicker(boolean z3) {
|
||||
this.zzd = z3;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setOptionsForAddingAccount(Bundle bundle) {
|
||||
this.zzf = bundle;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setSelectedAccount(Account account) {
|
||||
this.zza = account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setTitleOverrideText(String str) {
|
||||
this.zze = str;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ boolean zzA(AccountChooserOptions accountChooserOptions) {
|
||||
boolean z3 = accountChooserOptions.zzo;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ boolean zzB(AccountChooserOptions accountChooserOptions) {
|
||||
boolean z3 = accountChooserOptions.zzb;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ boolean zzC(AccountChooserOptions accountChooserOptions) {
|
||||
boolean z3 = accountChooserOptions.zzh;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ boolean zzD(AccountChooserOptions accountChooserOptions) {
|
||||
boolean z3 = accountChooserOptions.zzk;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ int zza(AccountChooserOptions accountChooserOptions) {
|
||||
int i = accountChooserOptions.zzi;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ zza zzd(AccountChooserOptions accountChooserOptions) {
|
||||
zza zzaVar = accountChooserOptions.zzl;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ String zze(AccountChooserOptions accountChooserOptions) {
|
||||
String str = accountChooserOptions.zzj;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ String zzf(AccountChooserOptions accountChooserOptions) {
|
||||
String str = accountChooserOptions.zzm;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ boolean zzz(AccountChooserOptions accountChooserOptions) {
|
||||
boolean z3 = accountChooserOptions.zzn;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private AccountPicker() {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Intent newChooseAccountIntent(Account account, ArrayList<Account> arrayList, String[] strArr, boolean z3, String str, String str2, String[] strArr2, Bundle bundle) {
|
||||
Intent intent = new Intent();
|
||||
Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker");
|
||||
intent.setAction("com.google.android.gms.common.account.CHOOSE_ACCOUNT");
|
||||
intent.setPackage("com.google.android.gms");
|
||||
intent.putExtra("allowableAccounts", arrayList);
|
||||
intent.putExtra("allowableAccountTypes", strArr);
|
||||
intent.putExtra("addAccountOptions", bundle);
|
||||
intent.putExtra("selectedAccount", account);
|
||||
intent.putExtra("alwaysPromptForAccount", z3);
|
||||
intent.putExtra("descriptionTextOverride", str);
|
||||
intent.putExtra("authTokenType", str2);
|
||||
intent.putExtra("addAccountRequiredFeatures", strArr2);
|
||||
intent.putExtra("setGmsCoreAccount", false);
|
||||
intent.putExtra("overrideTheme", 0);
|
||||
intent.putExtra("overrideCustomTheme", 0);
|
||||
intent.putExtra("hostedDomainFilter", (String) null);
|
||||
return intent;
|
||||
}
|
||||
|
||||
public static Intent newChooseAccountIntent(AccountChooserOptions accountChooserOptions) {
|
||||
Intent intent = new Intent();
|
||||
AccountChooserOptions.zzD(accountChooserOptions);
|
||||
AccountChooserOptions.zze(accountChooserOptions);
|
||||
Preconditions.checkArgument(true, "We only support hostedDomain filter for account chip styled account picker");
|
||||
AccountChooserOptions.zzd(accountChooserOptions);
|
||||
Preconditions.checkArgument(true, "Consent is only valid for account chip styled account picker");
|
||||
AccountChooserOptions.zzB(accountChooserOptions);
|
||||
Preconditions.checkArgument(true, "Making the selected account non-clickable is only supported for the theme THEME_DAY_NIGHT_GOOGLE_MATERIAL2");
|
||||
AccountChooserOptions.zzD(accountChooserOptions);
|
||||
intent.setAction("com.google.android.gms.common.account.CHOOSE_ACCOUNT");
|
||||
intent.setPackage("com.google.android.gms");
|
||||
intent.putExtra("allowableAccounts", accountChooserOptions.zzc);
|
||||
if (accountChooserOptions.zzd != null) {
|
||||
intent.putExtra("allowableAccountTypes", (String[]) accountChooserOptions.zzd.toArray(new String[0]));
|
||||
}
|
||||
intent.putExtra("addAccountOptions", accountChooserOptions.zzg);
|
||||
intent.putExtra("selectedAccount", accountChooserOptions.zza);
|
||||
AccountChooserOptions.zzB(accountChooserOptions);
|
||||
intent.putExtra("selectedAccountIsNotClickable", false);
|
||||
intent.putExtra("alwaysPromptForAccount", accountChooserOptions.zze);
|
||||
intent.putExtra("descriptionTextOverride", accountChooserOptions.zzf);
|
||||
AccountChooserOptions.zzC(accountChooserOptions);
|
||||
intent.putExtra("setGmsCoreAccount", false);
|
||||
AccountChooserOptions.zzf(accountChooserOptions);
|
||||
intent.putExtra("realClientPackage", (String) null);
|
||||
AccountChooserOptions.zza(accountChooserOptions);
|
||||
intent.putExtra("overrideTheme", 0);
|
||||
AccountChooserOptions.zzD(accountChooserOptions);
|
||||
intent.putExtra("overrideCustomTheme", 0);
|
||||
AccountChooserOptions.zze(accountChooserOptions);
|
||||
intent.putExtra("hostedDomainFilter", (String) null);
|
||||
Bundle bundle = new Bundle();
|
||||
AccountChooserOptions.zzD(accountChooserOptions);
|
||||
AccountChooserOptions.zzd(accountChooserOptions);
|
||||
AccountChooserOptions.zzz(accountChooserOptions);
|
||||
AccountChooserOptions.zzA(accountChooserOptions);
|
||||
if (!bundle.isEmpty()) {
|
||||
intent.putExtra("first_party_options_bundle", bundle);
|
||||
}
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.IBinder;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class BlockingServiceConnection implements ServiceConnection {
|
||||
boolean zza = false;
|
||||
private final BlockingQueue zzb = new LinkedBlockingQueue();
|
||||
|
||||
@KeepForSdk
|
||||
public IBinder getService() throws InterruptedException {
|
||||
Preconditions.checkNotMainThread("BlockingServiceConnection.getService() called on main thread");
|
||||
if (this.zza) {
|
||||
throw new IllegalStateException("Cannot call get on this connection more than once");
|
||||
}
|
||||
this.zza = true;
|
||||
return (IBinder) this.zzb.take();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public IBinder getServiceWithTimeout(long j4, TimeUnit timeUnit) throws InterruptedException, TimeoutException {
|
||||
Preconditions.checkNotMainThread("BlockingServiceConnection.getServiceWithTimeout() called on main thread");
|
||||
if (this.zza) {
|
||||
throw new IllegalStateException("Cannot call get on this connection more than once");
|
||||
}
|
||||
this.zza = true;
|
||||
IBinder iBinder = (IBinder) this.zzb.poll(j4, timeUnit);
|
||||
if (iBinder != null) {
|
||||
return iBinder;
|
||||
}
|
||||
throw new TimeoutException("Timed out waiting for the service connection");
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||
this.zzb.add(iBinder);
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceDisconnected(ComponentName componentName) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import C.w;
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.IntentSender;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
|
||||
@SafeParcelable.Class(creator = "ConnectionResultCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ConnectionResult extends AbstractSafeParcelable {
|
||||
public static final int API_DISABLED = 23;
|
||||
public static final int API_DISABLED_FOR_CONNECTION = 24;
|
||||
public static final int API_UNAVAILABLE = 16;
|
||||
public static final int CANCELED = 13;
|
||||
public static final int DEVELOPER_ERROR = 10;
|
||||
|
||||
@Deprecated
|
||||
public static final int DRIVE_EXTERNAL_STORAGE_REQUIRED = 1500;
|
||||
public static final int INTERNAL_ERROR = 8;
|
||||
public static final int INTERRUPTED = 15;
|
||||
public static final int INVALID_ACCOUNT = 5;
|
||||
public static final int LICENSE_CHECK_FAILED = 11;
|
||||
public static final int NETWORK_ERROR = 7;
|
||||
public static final int RESOLUTION_ACTIVITY_NOT_FOUND = 22;
|
||||
public static final int RESOLUTION_REQUIRED = 6;
|
||||
public static final int RESTRICTED_PROFILE = 20;
|
||||
public static final int SERVICE_DISABLED = 3;
|
||||
public static final int SERVICE_INVALID = 9;
|
||||
public static final int SERVICE_MISSING = 1;
|
||||
public static final int SERVICE_MISSING_PERMISSION = 19;
|
||||
public static final int SERVICE_UPDATING = 18;
|
||||
public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2;
|
||||
public static final int SIGN_IN_FAILED = 17;
|
||||
public static final int SIGN_IN_REQUIRED = 4;
|
||||
public static final int SUCCESS = 0;
|
||||
public static final int TIMEOUT = 14;
|
||||
|
||||
@KeepForSdk
|
||||
public static final int UNKNOWN = -1;
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zza;
|
||||
|
||||
@SafeParcelable.Field(getter = "getErrorCode", id = 2)
|
||||
private final int zzb;
|
||||
|
||||
@SafeParcelable.Field(getter = "getResolution", id = 3)
|
||||
private final PendingIntent zzc;
|
||||
|
||||
@SafeParcelable.Field(getter = "getErrorMessage", id = 4)
|
||||
private final String zzd;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static final ConnectionResult RESULT_SUCCESS = new ConnectionResult(0);
|
||||
public static final Parcelable.Creator<ConnectionResult> CREATOR = new zzb();
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public ConnectionResult(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) int i4, @SafeParcelable.Param(id = 3) PendingIntent pendingIntent, @SafeParcelable.Param(id = 4) String str) {
|
||||
this.zza = i;
|
||||
this.zzb = i4;
|
||||
this.zzc = pendingIntent;
|
||||
this.zzd = str;
|
||||
}
|
||||
|
||||
public static String zza(int i) {
|
||||
if (i == 99) {
|
||||
return "UNFINISHED";
|
||||
}
|
||||
if (i == 1500) {
|
||||
return "DRIVE_EXTERNAL_STORAGE_REQUIRED";
|
||||
}
|
||||
switch (i) {
|
||||
case -1:
|
||||
return "UNKNOWN";
|
||||
case 0:
|
||||
return "SUCCESS";
|
||||
case 1:
|
||||
return "SERVICE_MISSING";
|
||||
case 2:
|
||||
return "SERVICE_VERSION_UPDATE_REQUIRED";
|
||||
case 3:
|
||||
return "SERVICE_DISABLED";
|
||||
case 4:
|
||||
return "SIGN_IN_REQUIRED";
|
||||
case 5:
|
||||
return "INVALID_ACCOUNT";
|
||||
case 6:
|
||||
return "RESOLUTION_REQUIRED";
|
||||
case 7:
|
||||
return "NETWORK_ERROR";
|
||||
case 8:
|
||||
return "INTERNAL_ERROR";
|
||||
case 9:
|
||||
return "SERVICE_INVALID";
|
||||
case 10:
|
||||
return "DEVELOPER_ERROR";
|
||||
case 11:
|
||||
return "LICENSE_CHECK_FAILED";
|
||||
default:
|
||||
switch (i) {
|
||||
case 13:
|
||||
return "CANCELED";
|
||||
case 14:
|
||||
return "TIMEOUT";
|
||||
case 15:
|
||||
return "INTERRUPTED";
|
||||
case 16:
|
||||
return "API_UNAVAILABLE";
|
||||
case 17:
|
||||
return "SIGN_IN_FAILED";
|
||||
case 18:
|
||||
return "SERVICE_UPDATING";
|
||||
case 19:
|
||||
return "SERVICE_MISSING_PERMISSION";
|
||||
case 20:
|
||||
return "RESTRICTED_PROFILE";
|
||||
case 21:
|
||||
return "API_VERSION_UPDATE_REQUIRED";
|
||||
case 22:
|
||||
return "RESOLUTION_ACTIVITY_NOT_FOUND";
|
||||
case 23:
|
||||
return "API_DISABLED";
|
||||
case 24:
|
||||
return "API_DISABLED_FOR_CONNECTION";
|
||||
default:
|
||||
return w.i(i, "UNKNOWN_ERROR_CODE(", ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ConnectionResult)) {
|
||||
return false;
|
||||
}
|
||||
ConnectionResult connectionResult = (ConnectionResult) obj;
|
||||
return this.zzb == connectionResult.zzb && Objects.equal(this.zzc, connectionResult.zzc) && Objects.equal(this.zzd, connectionResult.zzd);
|
||||
}
|
||||
|
||||
public int getErrorCode() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return this.zzd;
|
||||
}
|
||||
|
||||
public PendingIntent getResolution() {
|
||||
return this.zzc;
|
||||
}
|
||||
|
||||
public boolean hasResolution() {
|
||||
return (this.zzb == 0 || this.zzc == null) ? false : true;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(Integer.valueOf(this.zzb), this.zzc, this.zzd);
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.zzb == 0;
|
||||
}
|
||||
|
||||
public void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
if (hasResolution()) {
|
||||
PendingIntent pendingIntent = this.zzc;
|
||||
Preconditions.checkNotNull(pendingIntent);
|
||||
activity.startIntentSenderForResult(pendingIntent.getIntentSender(), i, null, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Objects.ToStringHelper stringHelper = Objects.toStringHelper(this);
|
||||
stringHelper.add("statusCode", zza(this.zzb));
|
||||
stringHelper.add("resolution", this.zzc);
|
||||
stringHelper.add("message", this.zzd);
|
||||
return stringHelper.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zza);
|
||||
SafeParcelWriter.writeInt(parcel, 2, getErrorCode());
|
||||
SafeParcelWriter.writeParcelable(parcel, 3, getResolution(), i, false);
|
||||
SafeParcelWriter.writeString(parcel, 4, getErrorMessage(), false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public ConnectionResult(int i) {
|
||||
this(i, null, null);
|
||||
}
|
||||
|
||||
public ConnectionResult(int i, PendingIntent pendingIntent) {
|
||||
this(i, pendingIntent, null);
|
||||
}
|
||||
|
||||
public ConnectionResult(int i, PendingIntent pendingIntent, String str) {
|
||||
this(1, i, pendingIntent, str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ErrorDialogFragment extends DialogFragment {
|
||||
private Dialog zaa;
|
||||
private DialogInterface.OnCancelListener zab;
|
||||
private Dialog zac;
|
||||
|
||||
public static ErrorDialogFragment newInstance(Dialog dialog) {
|
||||
return newInstance(dialog, null);
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment, android.content.DialogInterface.OnCancelListener
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
DialogInterface.OnCancelListener onCancelListener = this.zab;
|
||||
if (onCancelListener != null) {
|
||||
onCancelListener.onCancel(dialogInterface);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment
|
||||
public Dialog onCreateDialog(Bundle bundle) {
|
||||
Dialog dialog = this.zaa;
|
||||
if (dialog != null) {
|
||||
return dialog;
|
||||
}
|
||||
setShowsDialog(false);
|
||||
if (this.zac == null) {
|
||||
this.zac = new AlertDialog.Builder((Context) Preconditions.checkNotNull(getActivity())).create();
|
||||
}
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment
|
||||
public void show(FragmentManager fragmentManager, String str) {
|
||||
super.show(fragmentManager, str);
|
||||
}
|
||||
|
||||
public static ErrorDialogFragment newInstance(Dialog dialog, DialogInterface.OnCancelListener onCancelListener) {
|
||||
ErrorDialogFragment errorDialogFragment = new ErrorDialogFragment();
|
||||
Dialog dialog2 = (Dialog) Preconditions.checkNotNull(dialog, "Cannot display null dialog");
|
||||
dialog2.setOnCancelListener(null);
|
||||
dialog2.setOnDismissListener(null);
|
||||
errorDialogFragment.zaa = dialog2;
|
||||
if (onCancelListener != null) {
|
||||
errorDialogFragment.zab = onCancelListener;
|
||||
}
|
||||
return errorDialogFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
|
||||
@KeepForSdk
|
||||
@SafeParcelable.Class(creator = "FeatureCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class Feature extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<Feature> CREATOR = new zzc();
|
||||
|
||||
@SafeParcelable.Field(getter = "getName", id = 1)
|
||||
private final String zza;
|
||||
|
||||
@SafeParcelable.Field(getter = "getOldVersion", id = 2)
|
||||
@Deprecated
|
||||
private final int zzb;
|
||||
|
||||
@SafeParcelable.Field(defaultValue = "-1", getter = "getVersion", id = 3)
|
||||
private final long zzc;
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public Feature(@SafeParcelable.Param(id = 1) String str, @SafeParcelable.Param(id = 2) int i, @SafeParcelable.Param(id = 3) long j4) {
|
||||
this.zza = str;
|
||||
this.zzb = i;
|
||||
this.zzc = j4;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj instanceof Feature) {
|
||||
Feature feature = (Feature) obj;
|
||||
if (((getName() != null && getName().equals(feature.getName())) || (getName() == null && feature.getName() == null)) && getVersion() == feature.getVersion()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getName() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public long getVersion() {
|
||||
long j4 = this.zzc;
|
||||
return j4 == -1 ? this.zzb : j4;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(getName(), Long.valueOf(getVersion()));
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
Objects.ToStringHelper stringHelper = Objects.toStringHelper(this);
|
||||
stringHelper.add(AppMeasurementSdk.ConditionalUserProperty.NAME, getName());
|
||||
stringHelper.add("version", Long.valueOf(getVersion()));
|
||||
return stringHelper.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeString(parcel, 1, getName(), false);
|
||||
SafeParcelWriter.writeInt(parcel, 2, this.zzb);
|
||||
SafeParcelWriter.writeLong(parcel, 3, getVersion());
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Feature(String str, long j4) {
|
||||
this.zza = str;
|
||||
this.zzc = j4;
|
||||
this.zzb = -1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class FirstPartyScopes {
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GAMES_1P = "https://www.googleapis.com/auth/games.firstparty";
|
||||
|
||||
private FirstPartyScopes() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.internal.common.zzag;
|
||||
import com.google.errorprone.annotations.RestrictedInheritance;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@RestrictedInheritance(allowedOnPath = ".*javatests/com/google/android/gmscore/integ/client/common/robolectric/.*", explanation = "Sub classing of GMS Core's APIs are restricted to testing fakes.", link = "go/gmscore-restrictedinheritance")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GmsSignatureVerifier {
|
||||
private static final zzab zza;
|
||||
private static final zzab zzb;
|
||||
private static final HashMap zzc;
|
||||
|
||||
static {
|
||||
zzz zzzVar = new zzz();
|
||||
zzzVar.zzd("com.google.android.gms");
|
||||
zzzVar.zza(204200000L);
|
||||
zzl zzlVar = zzn.zzd;
|
||||
zzzVar.zzc(zzag.zzn(zzlVar.zzf(), zzn.zzb.zzf()));
|
||||
zzl zzlVar2 = zzn.zzc;
|
||||
zzzVar.zzb(zzag.zzn(zzlVar2.zzf(), zzn.zza.zzf()));
|
||||
zza = zzzVar.zze();
|
||||
zzz zzzVar2 = new zzz();
|
||||
zzzVar2.zzd("com.android.vending");
|
||||
zzzVar2.zza(82240000L);
|
||||
zzzVar2.zzc(zzag.zzm(zzlVar.zzf()));
|
||||
zzzVar2.zzb(zzag.zzm(zzlVar2.zzf()));
|
||||
zzb = zzzVar2.zze();
|
||||
zzc = new HashMap();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,363 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import C.o;
|
||||
import C.u;
|
||||
import C.w;
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Resources;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.widget.ProgressBar;
|
||||
import androidx.fragment.app.K;
|
||||
import androidx.fragment.app.P;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.common.api.GoogleApiActivity;
|
||||
import com.google.android.gms.common.api.HasApiKey;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.api.internal.LifecycleFragment;
|
||||
import com.google.android.gms.common.api.internal.zabw;
|
||||
import com.google.android.gms.common.api.internal.zabx;
|
||||
import com.google.android.gms.common.api.internal.zacc;
|
||||
import com.google.android.gms.common.internal.HideFirstParty;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.internal.zag;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.common.wrappers.InstantApps;
|
||||
import com.google.android.gms.internal.base.zad;
|
||||
import com.google.android.gms.internal.base.zae;
|
||||
import com.google.android.gms.internal.base.zao;
|
||||
import com.google.android.gms.internal.base.zap;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
import com.google.android.gms.tasks.SuccessContinuation;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.Tasks;
|
||||
import com.google.errorprone.annotations.RestrictedInheritance;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@RestrictedInheritance(allowedOnPath = ".*java.*/com/google/android/gms.*", allowlistAnnotations = {zad.class, zae.class}, explanation = "Sub classing of GMS Core's APIs are restricted to GMS Core client libs and testing fakes.", link = "go/gmscore-restrictedinheritance")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleApiAvailability extends GoogleApiAvailabilityLight {
|
||||
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
|
||||
private String zac;
|
||||
private static final Object zaa = new Object();
|
||||
private static final GoogleApiAvailability zab = new GoogleApiAvailability();
|
||||
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
|
||||
public static GoogleApiAvailability getInstance() {
|
||||
return zab;
|
||||
}
|
||||
|
||||
public static final Task zai(HasApiKey hasApiKey, HasApiKey... hasApiKeyArr) {
|
||||
Preconditions.checkNotNull(hasApiKey, "Requested API must not be null.");
|
||||
for (HasApiKey hasApiKey2 : hasApiKeyArr) {
|
||||
Preconditions.checkNotNull(hasApiKey2, "Requested API must not be null.");
|
||||
}
|
||||
ArrayList arrayList = new ArrayList(hasApiKeyArr.length + 1);
|
||||
arrayList.add(hasApiKey);
|
||||
arrayList.addAll(Arrays.asList(hasApiKeyArr));
|
||||
return GoogleApiManager.zal().zao(arrayList);
|
||||
}
|
||||
|
||||
public Task<Void> checkApiAvailability(GoogleApi<?> googleApi, GoogleApi<?>... googleApiArr) {
|
||||
return zai(googleApi, googleApiArr).onSuccessTask(new SuccessContinuation() { // from class: com.google.android.gms.common.zab
|
||||
@Override // com.google.android.gms.tasks.SuccessContinuation
|
||||
public final Task then(Object obj) {
|
||||
int i = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public int getClientVersion(Context context) {
|
||||
return super.getClientVersion(context);
|
||||
}
|
||||
|
||||
public Dialog getErrorDialog(Activity activity, int i, int i4) {
|
||||
return getErrorDialog(activity, i, i4, (DialogInterface.OnCancelListener) null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public Intent getErrorResolutionIntent(Context context, int i, String str) {
|
||||
return super.getErrorResolutionIntent(context, i, str);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public PendingIntent getErrorResolutionPendingIntent(Context context, int i, int i4) {
|
||||
return super.getErrorResolutionPendingIntent(context, i, i4);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public final String getErrorString(int i) {
|
||||
return super.getErrorString(i);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
@HideFirstParty
|
||||
public int isGooglePlayServicesAvailable(Context context) {
|
||||
return super.isGooglePlayServicesAvailable(context);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public final boolean isUserResolvableError(int i) {
|
||||
return super.isUserResolvableError(i);
|
||||
}
|
||||
|
||||
public Task<Void> makeGooglePlayServicesAvailable(Activity activity) {
|
||||
int i = GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
Preconditions.checkMainThread("makeGooglePlayServicesAvailable must be called from the main thread");
|
||||
int isGooglePlayServicesAvailable = isGooglePlayServicesAvailable(activity, i);
|
||||
if (isGooglePlayServicesAvailable == 0) {
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
zacc zaa2 = zacc.zaa(activity);
|
||||
zaa2.zah(new ConnectionResult(isGooglePlayServicesAvailable, null), 0);
|
||||
return zaa2.zad();
|
||||
}
|
||||
|
||||
@TargetApi(26)
|
||||
public void setDefaultNotificationChannelId(Context context, String str) {
|
||||
if (PlatformVersion.isAtLeastO()) {
|
||||
Preconditions.checkNotNull(((NotificationManager) Preconditions.checkNotNull(context.getSystemService("notification"))).getNotificationChannel(str));
|
||||
}
|
||||
synchronized (zaa) {
|
||||
this.zac = str;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean showErrorDialogFragment(Activity activity, int i, int i4) {
|
||||
return showErrorDialogFragment(activity, i, i4, null);
|
||||
}
|
||||
|
||||
public void showErrorNotification(Context context, int i) {
|
||||
zae(context, i, null, getErrorResolutionPendingIntent(context, i, 0, "n"));
|
||||
}
|
||||
|
||||
public final Dialog zaa(Context context, int i, zag zagVar, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (i == 0) {
|
||||
return null;
|
||||
}
|
||||
TypedValue typedValue = new TypedValue();
|
||||
context.getTheme().resolveAttribute(android.R.attr.alertDialogTheme, typedValue, true);
|
||||
AlertDialog.Builder builder = "Theme.Dialog.Alert".equals(context.getResources().getResourceEntryName(typedValue.resourceId)) ? new AlertDialog.Builder(context, 5) : null;
|
||||
if (builder == null) {
|
||||
builder = new AlertDialog.Builder(context);
|
||||
}
|
||||
builder.setMessage(com.google.android.gms.common.internal.zac.zad(context, i));
|
||||
if (onCancelListener != null) {
|
||||
builder.setOnCancelListener(onCancelListener);
|
||||
}
|
||||
String zac = com.google.android.gms.common.internal.zac.zac(context, i);
|
||||
if (zac != null) {
|
||||
builder.setPositiveButton(zac, zagVar);
|
||||
}
|
||||
String zag = com.google.android.gms.common.internal.zac.zag(context, i);
|
||||
if (zag != null) {
|
||||
builder.setTitle(zag);
|
||||
}
|
||||
Log.w("GoogleApiAvailability", a.l(i, "Creating dialog for Google Play services availability issue. ConnectionResult="), new IllegalArgumentException());
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
public final Dialog zab(Activity activity, DialogInterface.OnCancelListener onCancelListener) {
|
||||
ProgressBar progressBar = new ProgressBar(activity, null, android.R.attr.progressBarStyleLarge);
|
||||
progressBar.setIndeterminate(true);
|
||||
progressBar.setVisibility(0);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setView(progressBar);
|
||||
builder.setMessage(com.google.android.gms.common.internal.zac.zad(activity, 18));
|
||||
builder.setPositiveButton("", (DialogInterface.OnClickListener) null);
|
||||
AlertDialog create = builder.create();
|
||||
zad(activity, create, "GooglePlayServicesUpdatingDialog", onCancelListener);
|
||||
return create;
|
||||
}
|
||||
|
||||
public final zabx zac(Context context, zabw zabwVar) {
|
||||
IntentFilter intentFilter = new IntentFilter("android.intent.action.PACKAGE_ADDED");
|
||||
intentFilter.addDataScheme("package");
|
||||
zabx zabxVar = new zabx(zabwVar);
|
||||
zao.zaa(context, zabxVar, intentFilter);
|
||||
zabxVar.zaa(context);
|
||||
if (isUninstalledAppPossiblyUpdating(context, "com.google.android.gms")) {
|
||||
return zabxVar;
|
||||
}
|
||||
zabwVar.zaa();
|
||||
zabxVar.zab();
|
||||
return null;
|
||||
}
|
||||
|
||||
public final void zad(Activity activity, Dialog dialog, String str, DialogInterface.OnCancelListener onCancelListener) {
|
||||
try {
|
||||
if (activity instanceof P) {
|
||||
SupportErrorDialogFragment.newInstance(dialog, onCancelListener).show(((P) activity).getSupportFragmentManager(), str);
|
||||
return;
|
||||
}
|
||||
} catch (NoClassDefFoundError unused) {
|
||||
}
|
||||
ErrorDialogFragment.newInstance(dialog, onCancelListener).show(activity.getFragmentManager(), str);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r11v6, types: [C.s, java.lang.Object, C.v] */
|
||||
@TargetApi(20)
|
||||
public final void zae(Context context, int i, String str, PendingIntent pendingIntent) {
|
||||
int i4;
|
||||
String str2;
|
||||
Log.w("GoogleApiAvailability", w.i(i, "GMS core API Availability. ConnectionResult=", ", tag=null"), new IllegalArgumentException());
|
||||
if (i == 18) {
|
||||
zaf(context);
|
||||
return;
|
||||
}
|
||||
if (pendingIntent == null) {
|
||||
if (i == 6) {
|
||||
Log.w("GoogleApiAvailability", "Missing resolution for ConnectionResult.RESOLUTION_REQUIRED. Call GoogleApiAvailability#showErrorNotification(Context, ConnectionResult) instead.");
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
String zaf = com.google.android.gms.common.internal.zac.zaf(context, i);
|
||||
String zae = com.google.android.gms.common.internal.zac.zae(context, i);
|
||||
Resources resources = context.getResources();
|
||||
NotificationManager notificationManager = (NotificationManager) Preconditions.checkNotNull(context.getSystemService("notification"));
|
||||
u uVar = new u(context, null);
|
||||
uVar.f260o = true;
|
||||
uVar.c(true);
|
||||
uVar.f252e = u.b(zaf);
|
||||
?? obj = new Object();
|
||||
obj.f247b = u.b(zae);
|
||||
uVar.e(obj);
|
||||
if (DeviceProperties.isWearable(context)) {
|
||||
Preconditions.checkState(PlatformVersion.isAtLeastKitKatWatch());
|
||||
uVar.f265u.icon = context.getApplicationInfo().icon;
|
||||
uVar.f255j = 2;
|
||||
if (DeviceProperties.isWearableWithoutPlayStore(context)) {
|
||||
uVar.f249b.add(new o(com.google.android.gms.base.R.drawable.common_full_open_on_phone, resources.getString(com.google.android.gms.base.R.string.common_open_on_phone), pendingIntent));
|
||||
} else {
|
||||
uVar.f254g = pendingIntent;
|
||||
}
|
||||
} else {
|
||||
uVar.f265u.icon = android.R.drawable.stat_sys_warning;
|
||||
String string = resources.getString(com.google.android.gms.base.R.string.common_google_play_services_notification_ticker);
|
||||
uVar.f265u.tickerText = u.b(string);
|
||||
uVar.f265u.when = System.currentTimeMillis();
|
||||
uVar.f254g = pendingIntent;
|
||||
uVar.f253f = u.b(zae);
|
||||
}
|
||||
if (PlatformVersion.isAtLeastO()) {
|
||||
Preconditions.checkState(PlatformVersion.isAtLeastO());
|
||||
synchronized (zaa) {
|
||||
str2 = this.zac;
|
||||
}
|
||||
if (str2 == null) {
|
||||
str2 = "com.google.android.gms.availability";
|
||||
NotificationChannel notificationChannel = notificationManager.getNotificationChannel("com.google.android.gms.availability");
|
||||
String zab2 = com.google.android.gms.common.internal.zac.zab(context);
|
||||
if (notificationChannel == null) {
|
||||
notificationManager.createNotificationChannel(new NotificationChannel("com.google.android.gms.availability", zab2, 4));
|
||||
} else if (!zab2.contentEquals(notificationChannel.getName())) {
|
||||
notificationChannel.setName(zab2);
|
||||
notificationManager.createNotificationChannel(notificationChannel);
|
||||
}
|
||||
}
|
||||
uVar.f263s = str2;
|
||||
}
|
||||
Notification a2 = uVar.a();
|
||||
if (i == 1 || i == 2 || i == 3) {
|
||||
GooglePlayServicesUtilLight.sCanceledAvailabilityNotification.set(false);
|
||||
i4 = 10436;
|
||||
} else {
|
||||
i4 = 39789;
|
||||
}
|
||||
notificationManager.notify(i4, a2);
|
||||
}
|
||||
|
||||
public final void zaf(Context context) {
|
||||
new zac(this, context).sendEmptyMessageDelayed(1, 120000L);
|
||||
}
|
||||
|
||||
public final boolean zag(Activity activity, LifecycleFragment lifecycleFragment, int i, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
Dialog zaa2 = zaa(activity, i, zag.zad(lifecycleFragment, getErrorResolutionIntent(activity, i, "d"), 2), onCancelListener);
|
||||
if (zaa2 == null) {
|
||||
return false;
|
||||
}
|
||||
zad(activity, zaa2, GooglePlayServicesUtil.GMS_ERROR_DIALOG, onCancelListener);
|
||||
return true;
|
||||
}
|
||||
|
||||
public final boolean zah(Context context, ConnectionResult connectionResult, int i) {
|
||||
PendingIntent errorResolutionPendingIntent;
|
||||
if (InstantApps.isInstantApp(context) || (errorResolutionPendingIntent = getErrorResolutionPendingIntent(context, connectionResult)) == null) {
|
||||
return false;
|
||||
}
|
||||
zae(context, connectionResult.getErrorCode(), null, PendingIntent.getActivity(context, 0, GoogleApiActivity.zaa(context, errorResolutionPendingIntent, i, true), zap.zaa | 134217728));
|
||||
return true;
|
||||
}
|
||||
|
||||
public Dialog getErrorDialog(Activity activity, int i, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
return zaa(activity, i, zag.zab(activity, getErrorResolutionIntent(activity, i, "d"), i4), onCancelListener);
|
||||
}
|
||||
|
||||
public PendingIntent getErrorResolutionPendingIntent(Context context, ConnectionResult connectionResult) {
|
||||
if (connectionResult.hasResolution()) {
|
||||
return connectionResult.getResolution();
|
||||
}
|
||||
return getErrorResolutionPendingIntent(context, connectionResult.getErrorCode(), 0);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
return super.isGooglePlayServicesAvailable(context, i);
|
||||
}
|
||||
|
||||
public boolean showErrorDialogFragment(Activity activity, int i, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
Dialog errorDialog = getErrorDialog(activity, i, i4, onCancelListener);
|
||||
if (errorDialog == null) {
|
||||
return false;
|
||||
}
|
||||
zad(activity, errorDialog, GooglePlayServicesUtil.GMS_ERROR_DIALOG, onCancelListener);
|
||||
return true;
|
||||
}
|
||||
|
||||
public Task<Void> checkApiAvailability(HasApiKey<?> hasApiKey, HasApiKey<?>... hasApiKeyArr) {
|
||||
return zai(hasApiKey, hasApiKeyArr).onSuccessTask(new SuccessContinuation() { // from class: com.google.android.gms.common.zaa
|
||||
@Override // com.google.android.gms.tasks.SuccessContinuation
|
||||
public final Task then(Object obj) {
|
||||
int i = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
return Tasks.forResult(null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void showErrorNotification(Context context, ConnectionResult connectionResult) {
|
||||
zae(context, connectionResult.getErrorCode(), null, getErrorResolutionPendingIntent(context, connectionResult));
|
||||
}
|
||||
|
||||
public Dialog getErrorDialog(K k4, int i, int i4) {
|
||||
return getErrorDialog(k4, i, i4, (DialogInterface.OnCancelListener) null);
|
||||
}
|
||||
|
||||
public Dialog getErrorDialog(K k4, int i, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
return zaa(k4.requireContext(), i, zag.zac(k4, getErrorResolutionIntent(k4.requireContext(), i, "d"), i4), onCancelListener);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.HideFirstParty;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleApiAvailabilityLight {
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
|
||||
|
||||
@KeepForSdk
|
||||
static final String TRACKING_SOURCE_DIALOG = "d";
|
||||
|
||||
@KeepForSdk
|
||||
static final String TRACKING_SOURCE_NOTIFICATION = "n";
|
||||
|
||||
@KeepForSdk
|
||||
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
private static final GoogleApiAvailabilityLight zza = new GoogleApiAvailabilityLight();
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleApiAvailabilityLight() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static GoogleApiAvailabilityLight getInstance() {
|
||||
return zza;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void cancelAvailabilityErrorNotifications(Context context) {
|
||||
GooglePlayServicesUtilLight.cancelAvailabilityErrorNotifications(context);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public int getApkVersion(Context context) {
|
||||
return GooglePlayServicesUtilLight.getApkVersion(context);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public int getClientVersion(Context context) {
|
||||
return GooglePlayServicesUtilLight.getClientVersion(context);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public Intent getErrorResolutionIntent(int i) {
|
||||
return getErrorResolutionIntent(null, i, null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public PendingIntent getErrorResolutionPendingIntent(Context context, int i, int i4) {
|
||||
return getErrorResolutionPendingIntent(context, i, i4, null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getErrorString(int i) {
|
||||
return GooglePlayServicesUtilLight.getErrorString(i);
|
||||
}
|
||||
|
||||
@HideFirstParty
|
||||
@KeepForSdk
|
||||
public int isGooglePlayServicesAvailable(Context context) {
|
||||
return isGooglePlayServicesAvailable(context, GOOGLE_PLAY_SERVICES_VERSION_CODE);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public boolean isPlayServicesPossiblyUpdating(Context context, int i) {
|
||||
return GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public boolean isPlayStorePossiblyUpdating(Context context, int i) {
|
||||
return GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isUninstalledAppPossiblyUpdating(Context context, String str) {
|
||||
return GooglePlayServicesUtilLight.zza(context, str);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isUserResolvableError(int i) {
|
||||
return GooglePlayServicesUtilLight.isUserRecoverableError(i);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void verifyGooglePlayServicesIsAvailable(Context context, int i) throws GooglePlayServicesRepairableException, GooglePlayServicesNotAvailableException {
|
||||
GooglePlayServicesUtilLight.ensurePlayServicesAvailable(context, i);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public Intent getErrorResolutionIntent(Context context, int i, String str) {
|
||||
if (i != 1 && i != 2) {
|
||||
if (i != 3) {
|
||||
return null;
|
||||
}
|
||||
return com.google.android.gms.common.internal.zzt.zzc("com.google.android.gms");
|
||||
}
|
||||
if (context != null && DeviceProperties.isWearableWithoutPlayStore(context)) {
|
||||
return com.google.android.gms.common.internal.zzt.zza();
|
||||
}
|
||||
StringBuilder sb = new StringBuilder("gcore_");
|
||||
sb.append(GOOGLE_PLAY_SERVICES_VERSION_CODE);
|
||||
sb.append("-");
|
||||
if (!TextUtils.isEmpty(str)) {
|
||||
sb.append(str);
|
||||
}
|
||||
sb.append("-");
|
||||
if (context != null) {
|
||||
sb.append(context.getPackageName());
|
||||
}
|
||||
sb.append("-");
|
||||
if (context != null) {
|
||||
try {
|
||||
sb.append(Wrappers.packageManager(context).getPackageInfo(context.getPackageName(), 0).versionCode);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
}
|
||||
}
|
||||
return com.google.android.gms.common.internal.zzt.zzb("com.google.android.gms", sb.toString());
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public PendingIntent getErrorResolutionPendingIntent(Context context, int i, int i4, String str) {
|
||||
Intent errorResolutionIntent = getErrorResolutionIntent(context, i, str);
|
||||
if (errorResolutionIntent == null) {
|
||||
return null;
|
||||
}
|
||||
return PendingIntent.getActivity(context, i4, errorResolutionIntent, com.google.android.gms.internal.common.zzd.zza | 134217728);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
int isGooglePlayServicesAvailable = GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, isGooglePlayServicesAvailable)) {
|
||||
return 18;
|
||||
}
|
||||
return isGooglePlayServicesAvailable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GooglePlayServicesIncorrectManifestValueException extends GooglePlayServicesManifestException {
|
||||
public GooglePlayServicesIncorrectManifestValueException(int i) {
|
||||
super(i, "The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected " + GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE + " but found " + i + ". You must have the following declaration within the <application> element: <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public class GooglePlayServicesManifestException extends IllegalStateException {
|
||||
private final int zza;
|
||||
|
||||
public GooglePlayServicesManifestException(int i, String str) {
|
||||
super(str);
|
||||
this.zza = i;
|
||||
}
|
||||
|
||||
public int getActualVersion() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public int getExpectedVersion() {
|
||||
return GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GooglePlayServicesMissingManifestValueException extends GooglePlayServicesManifestException {
|
||||
public GooglePlayServicesMissingManifestValueException() {
|
||||
super(0, "A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name=\"com.google.android.gms.version\" android:value=\"@integer/google_play_services_version\" />");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GooglePlayServicesNotAvailableException extends Exception {
|
||||
public final int errorCode;
|
||||
|
||||
public GooglePlayServicesNotAvailableException(int i) {
|
||||
this.errorCode = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class GooglePlayServicesRepairableException extends UserRecoverableException {
|
||||
private final int zza;
|
||||
|
||||
public GooglePlayServicesRepairableException(int i, String str, Intent intent) {
|
||||
super(str, intent);
|
||||
this.zza = i;
|
||||
}
|
||||
|
||||
public int getConnectionStatusCode() {
|
||||
return this.zza;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Resources;
|
||||
import androidx.fragment.app.K;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.HideFirstParty;
|
||||
import com.google.android.gms.common.internal.zag;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GooglePlayServicesUtil extends GooglePlayServicesUtilLight {
|
||||
public static final String GMS_ERROR_DIALOG = "GooglePlayServicesErrorDialog";
|
||||
|
||||
@Deprecated
|
||||
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
|
||||
|
||||
@Deprecated
|
||||
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
|
||||
|
||||
private GooglePlayServicesUtil() {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Dialog getErrorDialog(int i, Activity activity, int i4) {
|
||||
return getErrorDialog(i, activity, i4, null);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static PendingIntent getErrorPendingIntent(int i, Context context, int i4) {
|
||||
return GooglePlayServicesUtilLight.getErrorPendingIntent(i, context, i4);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Deprecated
|
||||
public static String getErrorString(int i) {
|
||||
return GooglePlayServicesUtilLight.getErrorString(i);
|
||||
}
|
||||
|
||||
public static Context getRemoteContext(Context context) {
|
||||
return GooglePlayServicesUtilLight.getRemoteContext(context);
|
||||
}
|
||||
|
||||
public static Resources getRemoteResource(Context context) {
|
||||
return GooglePlayServicesUtilLight.getRemoteResource(context);
|
||||
}
|
||||
|
||||
@HideFirstParty
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context) {
|
||||
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isUserRecoverableError(int i) {
|
||||
return GooglePlayServicesUtilLight.isUserRecoverableError(i);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean showErrorDialogFragment(int i, Activity activity, int i4) {
|
||||
return showErrorDialogFragment(i, activity, i4, null);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void showErrorNotification(int i, Context context) {
|
||||
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i) || GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i)) {
|
||||
googleApiAvailability.zaf(context);
|
||||
} else {
|
||||
googleApiAvailability.showErrorNotification(context, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Dialog getErrorDialog(int i, Activity activity, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (true == GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
||||
i = 18;
|
||||
}
|
||||
return GoogleApiAvailability.getInstance().getErrorDialog(activity, i, i4, onCancelListener);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean showErrorDialogFragment(int i, Activity activity, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
return showErrorDialogFragment(i, activity, null, i4, onCancelListener);
|
||||
}
|
||||
|
||||
public static boolean showErrorDialogFragment(int i, Activity activity, K k4, int i4, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (true == GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
||||
i = 18;
|
||||
}
|
||||
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
|
||||
if (k4 == null) {
|
||||
return googleApiAvailability.showErrorDialogFragment(activity, i, i4, onCancelListener);
|
||||
}
|
||||
Dialog zaa = googleApiAvailability.zaa(activity, i, zag.zac(k4, GoogleApiAvailability.getInstance().getErrorResolutionIntent(activity, i, "d"), i4), onCancelListener);
|
||||
if (zaa == null) {
|
||||
return false;
|
||||
}
|
||||
googleApiAvailability.zad(activity, zaa, GMS_ERROR_DIALOG, onCancelListener);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserManager;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.HideFirstParty;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.internal.zzag;
|
||||
import com.google.android.gms.common.util.ClientLibraryUtils;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.common.util.UidVerifier;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class GooglePlayServicesUtilLight {
|
||||
|
||||
@KeepForSdk
|
||||
static final int GMS_AVAILABILITY_NOTIFICATION_ID = 10436;
|
||||
|
||||
@KeepForSdk
|
||||
static final int GMS_GENERAL_ERROR_NOTIFICATION_ID = 39789;
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GOOGLE_PLAY_GAMES_PACKAGE = "com.google.android.play.games";
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = 12451000;
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
|
||||
|
||||
@VisibleForTesting
|
||||
static boolean zza = false;
|
||||
private static boolean zzb = false;
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
static final AtomicBoolean sCanceledAvailabilityNotification = new AtomicBoolean();
|
||||
private static final AtomicBoolean zzc = new AtomicBoolean();
|
||||
|
||||
@KeepForSdk
|
||||
public GooglePlayServicesUtilLight() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static void cancelAvailabilityErrorNotifications(Context context) {
|
||||
if (!sCanceledAvailabilityNotification.getAndSet(true)) {
|
||||
try {
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
|
||||
if (notificationManager == null) {
|
||||
} else {
|
||||
notificationManager.cancel(GMS_AVAILABILITY_NOTIFICATION_ID);
|
||||
}
|
||||
} catch (SecurityException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static void enableUsingApkIndependentContext() {
|
||||
zzc.set(true);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static void ensurePlayServicesAvailable(Context context, int i) throws GooglePlayServicesRepairableException, GooglePlayServicesNotAvailableException {
|
||||
int isGooglePlayServicesAvailable = GoogleApiAvailabilityLight.getInstance().isGooglePlayServicesAvailable(context, i);
|
||||
if (isGooglePlayServicesAvailable != 0) {
|
||||
Intent errorResolutionIntent = GoogleApiAvailabilityLight.getInstance().getErrorResolutionIntent(context, isGooglePlayServicesAvailable, "e");
|
||||
Log.e("GooglePlayServicesUtil", "GooglePlayServices not available due to error " + isGooglePlayServicesAvailable);
|
||||
if (errorResolutionIntent != null) {
|
||||
throw new GooglePlayServicesRepairableException(isGooglePlayServicesAvailable, "Google Play Services not available", errorResolutionIntent);
|
||||
}
|
||||
throw new GooglePlayServicesNotAvailableException(isGooglePlayServicesAvailable);
|
||||
}
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static int getApkVersion(Context context) {
|
||||
try {
|
||||
return context.getPackageManager().getPackageInfo("com.google.android.gms", 0).versionCode;
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play services is missing.");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static int getClientVersion(Context context) {
|
||||
Preconditions.checkState(true);
|
||||
return ClientLibraryUtils.getClientVersion(context, context.getPackageName());
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static PendingIntent getErrorPendingIntent(int i, Context context, int i4) {
|
||||
return GoogleApiAvailabilityLight.getInstance().getErrorResolutionPendingIntent(context, i, i4);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static String getErrorString(int i) {
|
||||
return ConnectionResult.zza(i);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static Intent getGooglePlayServicesAvailabilityRecoveryIntent(int i) {
|
||||
return GoogleApiAvailabilityLight.getInstance().getErrorResolutionIntent(null, i, null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Context getRemoteContext(Context context) {
|
||||
try {
|
||||
return context.createPackageContext("com.google.android.gms", 3);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Resources getRemoteResource(Context context) {
|
||||
try {
|
||||
return context.getPackageManager().getResourcesForApplication("com.google.android.gms");
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static boolean honorsDebugCertificates(Context context) {
|
||||
try {
|
||||
if (!zza) {
|
||||
try {
|
||||
PackageInfo packageInfo = Wrappers.packageManager(context).getPackageInfo("com.google.android.gms", 64);
|
||||
GoogleSignatureVerifier.getInstance(context);
|
||||
if (packageInfo == null || GoogleSignatureVerifier.zzb(packageInfo, false) || !GoogleSignatureVerifier.zzb(packageInfo, true)) {
|
||||
zzb = false;
|
||||
} else {
|
||||
zzb = true;
|
||||
}
|
||||
zza = true;
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
Log.w("GooglePlayServicesUtil", "Cannot find Google Play services package name.", e4);
|
||||
zza = true;
|
||||
}
|
||||
}
|
||||
return zzb || !DeviceProperties.isUserBuild();
|
||||
} catch (Throwable th) {
|
||||
zza = true;
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
@HideFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context) {
|
||||
return isGooglePlayServicesAvailable(context, GOOGLE_PLAY_SERVICES_VERSION_CODE);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static boolean isGooglePlayServicesUid(Context context, int i) {
|
||||
return UidVerifier.isGooglePlayServicesUid(context, i);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static boolean isPlayServicesPossiblyUpdating(Context context, int i) {
|
||||
if (i == 18) {
|
||||
return true;
|
||||
}
|
||||
if (i == 1) {
|
||||
return zza(context, "com.google.android.gms");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static boolean isPlayStorePossiblyUpdating(Context context, int i) {
|
||||
if (i == 9) {
|
||||
return zza(context, "com.android.vending");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@TargetApi(18)
|
||||
public static boolean isRestrictedUserProfile(Context context) {
|
||||
if (!PlatformVersion.isAtLeastJellyBeanMR2()) {
|
||||
return false;
|
||||
}
|
||||
Object systemService = context.getSystemService("user");
|
||||
Preconditions.checkNotNull(systemService);
|
||||
Bundle applicationRestrictions = ((UserManager) systemService).getApplicationRestrictions(context.getPackageName());
|
||||
return applicationRestrictions != null && "true".equals(applicationRestrictions.getString("restricted_profile"));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@Deprecated
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static boolean isSidewinderDevice(Context context) {
|
||||
return DeviceProperties.isSidewinder(context);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static boolean isUserRecoverableError(int i) {
|
||||
return i == 1 || i == 2 || i == 3 || i == 9;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@TargetApi(19)
|
||||
@Deprecated
|
||||
public static boolean uidHasPackageName(Context context, int i, String str) {
|
||||
return UidVerifier.uidHasPackageName(context, i, str);
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
public static boolean zza(Context context, String str) {
|
||||
ApplicationInfo applicationInfo;
|
||||
boolean equals = str.equals("com.google.android.gms");
|
||||
if (PlatformVersion.isAtLeastLollipop()) {
|
||||
try {
|
||||
Iterator<PackageInstaller.SessionInfo> it = context.getPackageManager().getPackageInstaller().getAllSessions().iterator();
|
||||
while (it.hasNext()) {
|
||||
if (str.equals(it.next().getAppPackageName())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (Exception unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
try {
|
||||
applicationInfo = context.getPackageManager().getApplicationInfo(str, 8192);
|
||||
} catch (PackageManager.NameNotFoundException unused2) {
|
||||
}
|
||||
return equals ? applicationInfo.enabled : applicationInfo.enabled && !isRestrictedUserProfile(context);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
PackageInfo packageInfo;
|
||||
try {
|
||||
context.getResources().getString(R.string.common_google_play_services_unknown_issue);
|
||||
} catch (Throwable unused) {
|
||||
Log.e("GooglePlayServicesUtil", "The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.");
|
||||
}
|
||||
if (!"com.google.android.gms".equals(context.getPackageName()) && !zzc.get()) {
|
||||
int zza2 = zzag.zza(context);
|
||||
if (zza2 != 0) {
|
||||
if (zza2 != GOOGLE_PLAY_SERVICES_VERSION_CODE) {
|
||||
throw new GooglePlayServicesIncorrectManifestValueException(zza2);
|
||||
}
|
||||
} else {
|
||||
throw new GooglePlayServicesMissingManifestValueException();
|
||||
}
|
||||
}
|
||||
boolean z3 = (DeviceProperties.isWearableWithoutPlayStore(context) || DeviceProperties.zzb(context)) ? false : true;
|
||||
Preconditions.checkArgument(i >= 0);
|
||||
String packageName = context.getPackageName();
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
if (z3) {
|
||||
try {
|
||||
packageInfo = packageManager.getPackageInfo("com.android.vending", 8256);
|
||||
} catch (PackageManager.NameNotFoundException unused2) {
|
||||
Log.w("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires the Google Play Store, but it is missing."));
|
||||
}
|
||||
} else {
|
||||
packageInfo = null;
|
||||
}
|
||||
try {
|
||||
PackageInfo packageInfo2 = packageManager.getPackageInfo("com.google.android.gms", 64);
|
||||
GoogleSignatureVerifier.getInstance(context);
|
||||
if (!GoogleSignatureVerifier.zzb(packageInfo2, true)) {
|
||||
Log.w("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires Google Play services, but their signature is invalid."));
|
||||
} else {
|
||||
if (z3) {
|
||||
Preconditions.checkNotNull(packageInfo);
|
||||
if (!GoogleSignatureVerifier.zzb(packageInfo, true)) {
|
||||
Log.w("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires Google Play Store, but its signature is invalid."));
|
||||
}
|
||||
}
|
||||
if (z3 && packageInfo != null && !packageInfo.signatures[0].equals(packageInfo2.signatures[0])) {
|
||||
Log.w("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires Google Play Store, but its signature doesn't match that of Google Play services."));
|
||||
} else {
|
||||
if (com.google.android.gms.common.util.zza.zza(packageInfo2.versionCode) < com.google.android.gms.common.util.zza.zza(i)) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play services out of date for " + packageName + ". Requires " + i + " but found " + packageInfo2.versionCode);
|
||||
return 2;
|
||||
}
|
||||
ApplicationInfo applicationInfo = packageInfo2.applicationInfo;
|
||||
if (applicationInfo == null) {
|
||||
try {
|
||||
applicationInfo = packageManager.getApplicationInfo("com.google.android.gms", 0);
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
Log.wtf("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires Google Play services, but they're missing when getting application info."), e4);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return !applicationInfo.enabled ? 3 : 0;
|
||||
}
|
||||
}
|
||||
return 9;
|
||||
} catch (PackageManager.NameNotFoundException unused3) {
|
||||
Log.w("GooglePlayServicesUtil", String.valueOf(packageName).concat(" requires Google Play services, but they are missing."));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.Signature;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.errorprone.annotations.RestrictedInheritance;
|
||||
import java.util.Set;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@RestrictedInheritance(allowedOnPath = ".*java.*/com/google/android/gms/common/testing/.*", explanation = "Sub classing of GMS Core's APIs are restricted to testing fakes.", link = "go/gmscore-restrictedinheritance")
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleSignatureVerifier {
|
||||
private static GoogleSignatureVerifier zza;
|
||||
private static volatile Set zzb;
|
||||
private final Context zzc;
|
||||
private volatile String zzd;
|
||||
|
||||
public GoogleSignatureVerifier(Context context) {
|
||||
this.zzc = context.getApplicationContext();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static GoogleSignatureVerifier getInstance(Context context) {
|
||||
Preconditions.checkNotNull(context);
|
||||
synchronized (GoogleSignatureVerifier.class) {
|
||||
try {
|
||||
if (zza == null) {
|
||||
zzn.zze(context);
|
||||
zza = new GoogleSignatureVerifier(context);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return zza;
|
||||
}
|
||||
|
||||
public static final zzj zza(PackageInfo packageInfo, zzj... zzjVarArr) {
|
||||
Signature[] signatureArr = packageInfo.signatures;
|
||||
if (signatureArr == null) {
|
||||
return null;
|
||||
}
|
||||
if (signatureArr.length != 1) {
|
||||
Log.w("GoogleSignatureVerifier", "Package has more than one signature.");
|
||||
return null;
|
||||
}
|
||||
zzk zzkVar = new zzk(packageInfo.signatures[0].toByteArray());
|
||||
for (int i = 0; i < zzjVarArr.length; i++) {
|
||||
if (zzjVarArr[i].equals(zzkVar)) {
|
||||
return zzjVarArr[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static final boolean zzb(PackageInfo packageInfo, boolean z3) {
|
||||
if (z3 && packageInfo != null && ("com.android.vending".equals(packageInfo.packageName) || "com.google.android.gms".equals(packageInfo.packageName))) {
|
||||
ApplicationInfo applicationInfo = packageInfo.applicationInfo;
|
||||
z3 = (applicationInfo == null || (applicationInfo.flags & 129) == 0) ? false : true;
|
||||
}
|
||||
if (packageInfo != null && packageInfo.signatures != null) {
|
||||
if ((z3 ? zza(packageInfo, zzm.zza) : zza(packageInfo, zzm.zza[0])) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressLint({"PackageManagerGetSignatures"})
|
||||
private final zzx zzc(String str, boolean z3, boolean z4) {
|
||||
zzx zzc;
|
||||
ApplicationInfo applicationInfo;
|
||||
if (str == null) {
|
||||
return zzx.zzc("null pkg");
|
||||
}
|
||||
if (str.equals(this.zzd)) {
|
||||
return zzx.zzb();
|
||||
}
|
||||
if (zzn.zzg()) {
|
||||
zzc = zzn.zzb(str, GooglePlayServicesUtilLight.honorsDebugCertificates(this.zzc), false, false);
|
||||
} else {
|
||||
try {
|
||||
PackageInfo packageInfo = this.zzc.getPackageManager().getPackageInfo(str, 64);
|
||||
boolean honorsDebugCertificates = GooglePlayServicesUtilLight.honorsDebugCertificates(this.zzc);
|
||||
if (packageInfo == null) {
|
||||
zzc = zzx.zzc("null pkg");
|
||||
} else {
|
||||
Signature[] signatureArr = packageInfo.signatures;
|
||||
if (signatureArr == null || signatureArr.length != 1) {
|
||||
zzc = zzx.zzc("single cert required");
|
||||
} else {
|
||||
zzk zzkVar = new zzk(packageInfo.signatures[0].toByteArray());
|
||||
String str2 = packageInfo.packageName;
|
||||
zzx zza2 = zzn.zza(str2, zzkVar, honorsDebugCertificates, false);
|
||||
zzc = (!zza2.zza || (applicationInfo = packageInfo.applicationInfo) == null || (applicationInfo.flags & 2) == 0 || !zzn.zza(str2, zzkVar, false, true).zza) ? zza2 : zzx.zzc("debuggable release cert app rejected");
|
||||
}
|
||||
}
|
||||
} catch (PackageManager.NameNotFoundException e4) {
|
||||
return zzx.zzd("no pkg ".concat(str), e4);
|
||||
}
|
||||
}
|
||||
if (zzc.zza) {
|
||||
this.zzd = str;
|
||||
}
|
||||
return zzc;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isGooglePublicSignedPackage(PackageInfo packageInfo) {
|
||||
if (packageInfo == null) {
|
||||
return false;
|
||||
}
|
||||
if (zzb(packageInfo, false)) {
|
||||
return true;
|
||||
}
|
||||
if (zzb(packageInfo, true)) {
|
||||
if (GooglePlayServicesUtilLight.honorsDebugCertificates(this.zzc)) {
|
||||
return true;
|
||||
}
|
||||
Log.w("GoogleSignatureVerifier", "Test-keys aren't accepted on this build.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public boolean isPackageGoogleSigned(String str) {
|
||||
zzx zzc = zzc(str, false, false);
|
||||
zzc.zze();
|
||||
return zzc.zza;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public boolean isUidGoogleSigned(int i) {
|
||||
zzx zzc;
|
||||
int length;
|
||||
String[] packagesForUid = this.zzc.getPackageManager().getPackagesForUid(i);
|
||||
if (packagesForUid != null && (length = packagesForUid.length) != 0) {
|
||||
zzc = null;
|
||||
int i4 = 0;
|
||||
while (true) {
|
||||
if (i4 >= length) {
|
||||
Preconditions.checkNotNull(zzc);
|
||||
break;
|
||||
}
|
||||
zzc = zzc(packagesForUid[i4], false, false);
|
||||
if (zzc.zza) {
|
||||
break;
|
||||
}
|
||||
i4++;
|
||||
}
|
||||
} else {
|
||||
zzc = zzx.zzc("no pkgs");
|
||||
}
|
||||
zzc.zze();
|
||||
return zzc.zza;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleSourceStampsChecker {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GoogleSourceStampsResult {
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.errorprone.annotations.RestrictedInheritance;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
@RestrictedInheritance(allowedOnPath = ".*javatests.*/com/google/android/gms/common/.*", explanation = "Sub classing of GMS Core's APIs are restricted to testing fakes.", link = "go/gmscore-restrictedinheritance")
|
||||
/* loaded from: classes3.dex */
|
||||
public class PackageSignatureVerifier {
|
||||
private static zzad zza;
|
||||
private volatile zzac zzb;
|
||||
|
||||
private static zzad zza() {
|
||||
zzad zzadVar;
|
||||
synchronized (zzad.class) {
|
||||
try {
|
||||
if (zza == null) {
|
||||
zza = new zzad();
|
||||
}
|
||||
zzadVar = zza;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return zzadVar;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public PackageVerificationResult queryPackageSignatureVerified(Context context, String str) {
|
||||
PackageVerificationResult packageVerificationResult;
|
||||
String str2;
|
||||
PackageVerificationResult packageVerificationResult2;
|
||||
boolean honorsDebugCertificates = GooglePlayServicesUtilLight.honorsDebugCertificates(context);
|
||||
zza();
|
||||
if (!zzn.zzf()) {
|
||||
throw new zzae();
|
||||
}
|
||||
String concat = String.valueOf(str).concat(true != honorsDebugCertificates ? "-0" : "-1");
|
||||
if (this.zzb != null) {
|
||||
str2 = this.zzb.zza;
|
||||
if (str2.equals(concat)) {
|
||||
packageVerificationResult2 = this.zzb.zzb;
|
||||
return packageVerificationResult2;
|
||||
}
|
||||
}
|
||||
zza();
|
||||
zzx zzc = zzn.zzc(str, honorsDebugCertificates, false, false);
|
||||
if (!zzc.zza) {
|
||||
Preconditions.checkNotNull(zzc.zzb);
|
||||
return PackageVerificationResult.zza(str, zzc.zzb, zzc.zzc);
|
||||
}
|
||||
this.zzb = new zzac(concat, PackageVerificationResult.zzd(str, zzc.zzd));
|
||||
packageVerificationResult = this.zzb.zzb;
|
||||
return packageVerificationResult;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public PackageVerificationResult queryPackageSignatureVerifiedWithRetry(Context context, String str) {
|
||||
try {
|
||||
PackageVerificationResult queryPackageSignatureVerified = queryPackageSignatureVerified(context, str);
|
||||
queryPackageSignatureVerified.zzb();
|
||||
return queryPackageSignatureVerified;
|
||||
} catch (SecurityException e4) {
|
||||
PackageVerificationResult queryPackageSignatureVerified2 = queryPackageSignatureVerified(context, str);
|
||||
if (queryPackageSignatureVerified2.zzc()) {
|
||||
Log.e("PkgSignatureVerifier", "Got flaky result during package signature verification", e4);
|
||||
}
|
||||
return queryPackageSignatureVerified2;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class PackageVerificationResult {
|
||||
private final String zza;
|
||||
private final boolean zzb;
|
||||
private final String zzc;
|
||||
private final Throwable zzd;
|
||||
|
||||
private PackageVerificationResult(String str, int i, boolean z3, String str2, Throwable th) {
|
||||
this.zza = str;
|
||||
this.zzb = z3;
|
||||
this.zzc = str2;
|
||||
this.zzd = th;
|
||||
}
|
||||
|
||||
public static PackageVerificationResult zza(String str, String str2, Throwable th) {
|
||||
return new PackageVerificationResult(str, 1, false, str2, th);
|
||||
}
|
||||
|
||||
public static PackageVerificationResult zzd(String str, int i) {
|
||||
return new PackageVerificationResult(str, i, true, null, null);
|
||||
}
|
||||
|
||||
public final void zzb() {
|
||||
if (this.zzb) {
|
||||
return;
|
||||
}
|
||||
String concat = "PackageVerificationRslt: ".concat(String.valueOf(this.zzc));
|
||||
Throwable th = this.zzd;
|
||||
if (th == null) {
|
||||
throw new SecurityException(concat);
|
||||
}
|
||||
throw new SecurityException(concat, th);
|
||||
}
|
||||
|
||||
public final boolean zzc() {
|
||||
return this.zzb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
final class ProGuardCanary {
|
||||
|
||||
@KeepForSdk
|
||||
static final String CANARY = "gms_proguard_canary";
|
||||
|
||||
private ProGuardCanary() {
|
||||
}
|
||||
}
|
||||
24
apk_decompiled/sources/com/google/android/gms/common/R.java
Normal file
24
apk_decompiled/sources/com/google/android/gms/common/R.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class R {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class integer {
|
||||
public static final int google_play_services_version = 0x7f0a0009;
|
||||
|
||||
private integer() {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class string {
|
||||
public static final int common_google_play_services_unknown_issue = 0x7f1300bc;
|
||||
|
||||
private string() {
|
||||
}
|
||||
}
|
||||
|
||||
private R() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Scopes {
|
||||
public static final String APP_STATE = "https://www.googleapis.com/auth/appstate";
|
||||
public static final String CLOUD_SAVE = "https://www.googleapis.com/auth/datastoremobile";
|
||||
public static final String DRIVE_APPFOLDER = "https://www.googleapis.com/auth/drive.appdata";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String DRIVE_APPS = "https://www.googleapis.com/auth/drive.apps";
|
||||
public static final String DRIVE_FILE = "https://www.googleapis.com/auth/drive.file";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String DRIVE_FULL = "https://www.googleapis.com/auth/drive";
|
||||
public static final String EMAIL = "email";
|
||||
public static final String GAMES = "https://www.googleapis.com/auth/games";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String GAMES_LITE = "https://www.googleapis.com/auth/games_lite";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String LEGACY_USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String LEGACY_USERINFO_PROFILE = "https://www.googleapis.com/auth/userinfo.profile";
|
||||
|
||||
@KeepForSdk
|
||||
public static final String OPEN_ID = "openid";
|
||||
|
||||
@Deprecated
|
||||
public static final String PLUS_LOGIN = "https://www.googleapis.com/auth/plus.login";
|
||||
public static final String PLUS_ME = "https://www.googleapis.com/auth/plus.me";
|
||||
public static final String PROFILE = "profile";
|
||||
|
||||
private Scopes() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.zaaa;
|
||||
import com.google.android.gms.common.internal.zaz;
|
||||
import com.google.android.gms.dynamic.RemoteCreator;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SignInButton extends FrameLayout implements View.OnClickListener {
|
||||
public static final int COLOR_AUTO = 2;
|
||||
public static final int COLOR_DARK = 0;
|
||||
public static final int COLOR_LIGHT = 1;
|
||||
public static final int SIZE_ICON_ONLY = 2;
|
||||
public static final int SIZE_STANDARD = 0;
|
||||
public static final int SIZE_WIDE = 1;
|
||||
private int zaa;
|
||||
private int zab;
|
||||
private View zac;
|
||||
private View.OnClickListener zad;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ButtonSize {
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface ColorScheme {
|
||||
}
|
||||
|
||||
public SignInButton(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
private final void zaa(Context context) {
|
||||
View view = this.zac;
|
||||
if (view != null) {
|
||||
removeView(view);
|
||||
}
|
||||
try {
|
||||
this.zac = zaz.zaa(context, this.zaa, this.zab);
|
||||
} catch (RemoteCreator.RemoteCreatorException unused) {
|
||||
Log.w("SignInButton", "Sign in button not found, using placeholder instead");
|
||||
int i = this.zaa;
|
||||
int i4 = this.zab;
|
||||
zaaa zaaaVar = new zaaa(context, null);
|
||||
zaaaVar.zaa(context.getResources(), i, i4);
|
||||
this.zac = zaaaVar;
|
||||
}
|
||||
addView(this.zac);
|
||||
this.zac.setEnabled(isEnabled());
|
||||
this.zac.setOnClickListener(this);
|
||||
}
|
||||
|
||||
@Override // android.view.View.OnClickListener
|
||||
public void onClick(View view) {
|
||||
View.OnClickListener onClickListener = this.zad;
|
||||
if (onClickListener == null || view != this.zac) {
|
||||
return;
|
||||
}
|
||||
onClickListener.onClick(this);
|
||||
}
|
||||
|
||||
public void setColorScheme(int i) {
|
||||
setStyle(this.zaa, i);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setEnabled(boolean z3) {
|
||||
super.setEnabled(z3);
|
||||
this.zac.setEnabled(z3);
|
||||
}
|
||||
|
||||
@Override // android.view.View
|
||||
public void setOnClickListener(View.OnClickListener onClickListener) {
|
||||
this.zad = onClickListener;
|
||||
View view = this.zac;
|
||||
if (view != null) {
|
||||
view.setOnClickListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setScopes(Scope[] scopeArr) {
|
||||
setStyle(this.zaa, this.zab);
|
||||
}
|
||||
|
||||
public void setSize(int i) {
|
||||
setStyle(i, this.zab);
|
||||
}
|
||||
|
||||
public void setStyle(int i, int i4) {
|
||||
this.zaa = i;
|
||||
this.zab = i4;
|
||||
zaa(getContext());
|
||||
}
|
||||
|
||||
public SignInButton(Context context, AttributeSet attributeSet) {
|
||||
this(context, attributeSet, 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setStyle(int i, int i4, Scope[] scopeArr) {
|
||||
setStyle(i, i4);
|
||||
}
|
||||
|
||||
public SignInButton(Context context, AttributeSet attributeSet, int i) {
|
||||
super(context, attributeSet, i);
|
||||
this.zad = null;
|
||||
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, com.google.android.gms.base.R.styleable.SignInButton, 0, 0);
|
||||
try {
|
||||
this.zaa = obtainStyledAttributes.getInt(com.google.android.gms.base.R.styleable.SignInButton_buttonSize, 0);
|
||||
this.zab = obtainStyledAttributes.getInt(com.google.android.gms.base.R.styleable.SignInButton_colorScheme, 2);
|
||||
obtainStyledAttributes.recycle();
|
||||
setStyle(this.zaa, this.zab);
|
||||
} catch (Throwable th) {
|
||||
obtainStyledAttributes.recycle();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.AbstractC0158l0;
|
||||
import androidx.fragment.app.DialogInterfaceOnCancelListenerC0174y;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class SupportErrorDialogFragment extends DialogInterfaceOnCancelListenerC0174y {
|
||||
private Dialog zaa;
|
||||
private DialogInterface.OnCancelListener zab;
|
||||
private Dialog zac;
|
||||
|
||||
public static SupportErrorDialogFragment newInstance(Dialog dialog) {
|
||||
return newInstance(dialog, null);
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.DialogInterfaceOnCancelListenerC0174y, android.content.DialogInterface.OnCancelListener
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
DialogInterface.OnCancelListener onCancelListener = this.zab;
|
||||
if (onCancelListener != null) {
|
||||
onCancelListener.onCancel(dialogInterface);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.DialogInterfaceOnCancelListenerC0174y
|
||||
public Dialog onCreateDialog(Bundle bundle) {
|
||||
Dialog dialog = this.zaa;
|
||||
if (dialog != null) {
|
||||
return dialog;
|
||||
}
|
||||
setShowsDialog(false);
|
||||
if (this.zac == null) {
|
||||
this.zac = new AlertDialog.Builder((Context) Preconditions.checkNotNull(getContext())).create();
|
||||
}
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.DialogInterfaceOnCancelListenerC0174y
|
||||
public void show(AbstractC0158l0 abstractC0158l0, String str) {
|
||||
super.show(abstractC0158l0, str);
|
||||
}
|
||||
|
||||
public static SupportErrorDialogFragment newInstance(Dialog dialog, DialogInterface.OnCancelListener onCancelListener) {
|
||||
SupportErrorDialogFragment supportErrorDialogFragment = new SupportErrorDialogFragment();
|
||||
Dialog dialog2 = (Dialog) Preconditions.checkNotNull(dialog, "Cannot display null dialog");
|
||||
dialog2.setOnCancelListener(null);
|
||||
dialog2.setOnDismissListener(null);
|
||||
supportErrorDialogFragment.zaa = dialog2;
|
||||
if (onCancelListener != null) {
|
||||
supportErrorDialogFragment.zab = onCancelListener;
|
||||
}
|
||||
return supportErrorDialogFragment;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class UserRecoverableException extends Exception {
|
||||
private final Intent zza;
|
||||
|
||||
public UserRecoverableException(String str, Intent intent) {
|
||||
super(str);
|
||||
this.zza = intent;
|
||||
}
|
||||
|
||||
public Intent getIntent() {
|
||||
return new Intent(this.zza);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
@Documented
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface KeepForSdk {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE})
|
||||
@Documented
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface KeepForSdkWithFieldsAndMethods {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE})
|
||||
@Documented
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface KeepForSdkWithMembers {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
@Documented
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface KeepName {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.google.android.gms.common.annotation;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.TYPE, ElementType.PACKAGE})
|
||||
@KeepForSdk
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
/* loaded from: classes3.dex */
|
||||
public @interface NonNullApi {
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api.ApiOptions;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.internal.ConnectionCallbacks;
|
||||
import com.google.android.gms.common.api.internal.OnConnectionFailedListener;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Api<O extends ApiOptions> {
|
||||
private final AbstractClientBuilder zaa;
|
||||
private final ClientKey zab;
|
||||
private final String zac;
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class AbstractClientBuilder<T extends Client, O> extends BaseClientBuilder<T, O> {
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public T buildClient(Context context, Looper looper, ClientSettings clientSettings, O o4, GoogleApiClient.ConnectionCallbacks connectionCallbacks, GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
return buildClient(context, looper, clientSettings, (ClientSettings) o4, (ConnectionCallbacks) connectionCallbacks, (OnConnectionFailedListener) onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public T buildClient(Context context, Looper looper, ClientSettings clientSettings, O o4, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException("buildClient must be implemented");
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface AnyClient {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class AnyClientKey<C extends AnyClient> {
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ApiOptions {
|
||||
public static final NoOptions NO_OPTIONS = new NoOptions(null);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HasAccountOptions extends HasOptions, NotRequiredOptions {
|
||||
Account getAccount();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HasGoogleSignInAccountOptions extends HasOptions {
|
||||
GoogleSignInAccount getGoogleSignInAccount();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HasOptions extends ApiOptions {
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class NoOptions implements NotRequiredOptions {
|
||||
private NoOptions() {
|
||||
}
|
||||
|
||||
public /* synthetic */ NoOptions(zaa zaaVar) {
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface NotRequiredOptions extends ApiOptions {
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Optional extends HasOptions, NotRequiredOptions {
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class BaseClientBuilder<T extends AnyClient, O> {
|
||||
|
||||
@KeepForSdk
|
||||
public static final int API_PRIORITY_GAMES = 1;
|
||||
|
||||
@KeepForSdk
|
||||
public static final int API_PRIORITY_OTHER = Integer.MAX_VALUE;
|
||||
|
||||
@KeepForSdk
|
||||
public static final int API_PRIORITY_PLUS = 2;
|
||||
|
||||
@KeepForSdk
|
||||
public List<Scope> getImpliedScopes(O o4) {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int getPriority() {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Client extends AnyClient {
|
||||
@KeepForSdk
|
||||
void connect(BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks);
|
||||
|
||||
@KeepForSdk
|
||||
void disconnect();
|
||||
|
||||
@KeepForSdk
|
||||
void disconnect(String str);
|
||||
|
||||
@KeepForSdk
|
||||
void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr);
|
||||
|
||||
@KeepForSdk
|
||||
Feature[] getAvailableFeatures();
|
||||
|
||||
@KeepForSdk
|
||||
String getEndpointPackageName();
|
||||
|
||||
@KeepForSdk
|
||||
String getLastDisconnectMessage();
|
||||
|
||||
@KeepForSdk
|
||||
int getMinApkVersion();
|
||||
|
||||
@KeepForSdk
|
||||
void getRemoteService(IAccountAccessor iAccountAccessor, Set<Scope> set);
|
||||
|
||||
@KeepForSdk
|
||||
Feature[] getRequiredFeatures();
|
||||
|
||||
@KeepForSdk
|
||||
Set<Scope> getScopesForConnectionlessNonSignIn();
|
||||
|
||||
@KeepForSdk
|
||||
IBinder getServiceBrokerBinder();
|
||||
|
||||
@KeepForSdk
|
||||
Intent getSignInIntent();
|
||||
|
||||
@KeepForSdk
|
||||
boolean isConnected();
|
||||
|
||||
@KeepForSdk
|
||||
boolean isConnecting();
|
||||
|
||||
@KeepForSdk
|
||||
void onUserSignOut(BaseGmsClient.SignOutCallbacks signOutCallbacks);
|
||||
|
||||
@KeepForSdk
|
||||
boolean providesSignIn();
|
||||
|
||||
@KeepForSdk
|
||||
boolean requiresAccount();
|
||||
|
||||
@KeepForSdk
|
||||
boolean requiresGooglePlayServices();
|
||||
|
||||
@KeepForSdk
|
||||
boolean requiresSignIn();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ClientKey<C extends Client> extends AnyClientKey<C> {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <C extends Client> Api(String str, AbstractClientBuilder<C, O> abstractClientBuilder, ClientKey<C> clientKey) {
|
||||
Preconditions.checkNotNull(abstractClientBuilder, "Cannot construct an Api with a null ClientBuilder");
|
||||
Preconditions.checkNotNull(clientKey, "Cannot construct an Api with a null ClientKey");
|
||||
this.zac = str;
|
||||
this.zaa = abstractClientBuilder;
|
||||
this.zab = clientKey;
|
||||
}
|
||||
|
||||
public final AbstractClientBuilder zaa() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final AnyClientKey zab() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public final BaseClientBuilder zac() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final String zad() {
|
||||
return this.zac;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ApiException extends Exception {
|
||||
|
||||
@Deprecated
|
||||
protected final Status mStatus;
|
||||
|
||||
public ApiException(Status status) {
|
||||
super(status.getStatusCode() + ": " + (status.getStatusMessage() != null ? status.getStatusMessage() : ""));
|
||||
this.mStatus = status;
|
||||
}
|
||||
|
||||
public Status getStatus() {
|
||||
return this.mStatus;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return this.mStatus.getStatusCode();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getStatusMessage() {
|
||||
return this.mStatus.getStatusMessage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.ApiKey;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import s.C0581a;
|
||||
import s.b;
|
||||
import s.e;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class AvailabilityException extends Exception {
|
||||
private final e zaa;
|
||||
|
||||
public AvailabilityException(e eVar) {
|
||||
this.zaa = eVar;
|
||||
}
|
||||
|
||||
public ConnectionResult getConnectionResult(GoogleApi<? extends Api.ApiOptions> googleApi) {
|
||||
ApiKey<? extends Api.ApiOptions> apiKey = googleApi.getApiKey();
|
||||
boolean z3 = this.zaa.get(apiKey) != null;
|
||||
Preconditions.checkArgument(z3, "The given API (" + apiKey.zaa() + ") was not part of the availability request.");
|
||||
return (ConnectionResult) Preconditions.checkNotNull((ConnectionResult) this.zaa.get(apiKey));
|
||||
}
|
||||
|
||||
@Override // java.lang.Throwable
|
||||
public String getMessage() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator it = ((b) this.zaa.keySet()).iterator();
|
||||
boolean z3 = true;
|
||||
while (true) {
|
||||
C0581a c0581a = (C0581a) it;
|
||||
if (!c0581a.hasNext()) {
|
||||
break;
|
||||
}
|
||||
ApiKey apiKey = (ApiKey) c0581a.next();
|
||||
ConnectionResult connectionResult = (ConnectionResult) Preconditions.checkNotNull((ConnectionResult) this.zaa.get(apiKey));
|
||||
z3 &= !connectionResult.isSuccess();
|
||||
arrayList.add(apiKey.zaa() + ": " + String.valueOf(connectionResult));
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (z3) {
|
||||
sb.append("None of the queried APIs are available. ");
|
||||
} else {
|
||||
sb.append("Some of the queried APIs are unavailable. ");
|
||||
}
|
||||
sb.append(TextUtils.join("; ", arrayList));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public ConnectionResult getConnectionResult(HasApiKey<? extends Api.ApiOptions> hasApiKey) {
|
||||
ApiKey<? extends Api.ApiOptions> apiKey = hasApiKey.getApiKey();
|
||||
boolean z3 = this.zaa.get(apiKey) != null;
|
||||
Preconditions.checkArgument(z3, "The given API (" + apiKey.zaa() + ") was not part of the availability request.");
|
||||
return (ConnectionResult) Preconditions.checkNotNull((ConnectionResult) this.zaa.get(apiKey));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.internal.BasePendingResult;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Batch extends BasePendingResult<BatchResult> {
|
||||
private int zae;
|
||||
private boolean zaf;
|
||||
private boolean zag;
|
||||
private final PendingResult[] zah;
|
||||
private final Object zai;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder {
|
||||
private List zaa = new ArrayList();
|
||||
private GoogleApiClient zab;
|
||||
|
||||
public Builder(GoogleApiClient googleApiClient) {
|
||||
this.zab = googleApiClient;
|
||||
}
|
||||
|
||||
public <R extends Result> BatchResultToken<R> add(PendingResult<R> pendingResult) {
|
||||
BatchResultToken<R> batchResultToken = new BatchResultToken<>(this.zaa.size());
|
||||
this.zaa.add(pendingResult);
|
||||
return batchResultToken;
|
||||
}
|
||||
|
||||
public Batch build() {
|
||||
return new Batch(this.zaa, this.zab, null);
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ Batch(List list, GoogleApiClient googleApiClient, zac zacVar) {
|
||||
super(googleApiClient);
|
||||
this.zai = new Object();
|
||||
int size = list.size();
|
||||
this.zae = size;
|
||||
PendingResult[] pendingResultArr = new PendingResult[size];
|
||||
this.zah = pendingResultArr;
|
||||
if (list.isEmpty()) {
|
||||
setResult(new BatchResult(Status.RESULT_SUCCESS, pendingResultArr));
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
PendingResult pendingResult = (PendingResult) list.get(i);
|
||||
this.zah[i] = pendingResult;
|
||||
pendingResult.addStatusListener(new zab(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BasePendingResult, com.google.android.gms.common.api.PendingResult
|
||||
public void cancel() {
|
||||
super.cancel();
|
||||
for (PendingResult pendingResult : this.zah) {
|
||||
pendingResult.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // com.google.android.gms.common.api.internal.BasePendingResult
|
||||
public BatchResult createFailedResult(Status status) {
|
||||
return new BatchResult(status, this.zah);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BatchResult implements Result {
|
||||
private final Status zaa;
|
||||
private final PendingResult[] zab;
|
||||
|
||||
public BatchResult(Status status, PendingResult[] pendingResultArr) {
|
||||
this.zaa = status;
|
||||
this.zab = pendingResultArr;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public Status getStatus() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public <R extends Result> R take(BatchResultToken<R> batchResultToken) {
|
||||
Preconditions.checkArgument(batchResultToken.mId < this.zab.length, "The result token does not belong to this batch");
|
||||
return (R) this.zab[batchResultToken.mId].await(0L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BatchResultToken<R extends Result> {
|
||||
protected final int mId;
|
||||
|
||||
public BatchResultToken(int i) {
|
||||
this.mId = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class BooleanResult implements Result {
|
||||
private final Status zaa;
|
||||
private final boolean zab;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public BooleanResult(Status status, boolean z3) {
|
||||
this.zaa = (Status) Preconditions.checkNotNull(status, "Status must not be null");
|
||||
this.zab = z3;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof BooleanResult)) {
|
||||
return false;
|
||||
}
|
||||
BooleanResult booleanResult = (BooleanResult) obj;
|
||||
return this.zaa.equals(booleanResult.zaa) && this.zab == booleanResult.zab;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public Status getStatus() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public boolean getValue() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return ((this.zaa.hashCode() + 527) * 31) + (this.zab ? 1 : 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.measurement.internal.a;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class CommonStatusCodes {
|
||||
public static final int API_NOT_CONNECTED = 17;
|
||||
public static final int CANCELED = 16;
|
||||
public static final int CONNECTION_SUSPENDED_DURING_CALL = 20;
|
||||
public static final int DEVELOPER_ERROR = 10;
|
||||
public static final int ERROR = 13;
|
||||
public static final int INTERNAL_ERROR = 8;
|
||||
public static final int INTERRUPTED = 14;
|
||||
public static final int INVALID_ACCOUNT = 5;
|
||||
public static final int NETWORK_ERROR = 7;
|
||||
public static final int RECONNECTION_TIMED_OUT = 22;
|
||||
public static final int RECONNECTION_TIMED_OUT_DURING_UPDATE = 21;
|
||||
public static final int REMOTE_EXCEPTION = 19;
|
||||
public static final int RESOLUTION_REQUIRED = 6;
|
||||
|
||||
@Deprecated
|
||||
public static final int SERVICE_DISABLED = 3;
|
||||
|
||||
@Deprecated
|
||||
public static final int SERVICE_VERSION_UPDATE_REQUIRED = 2;
|
||||
public static final int SIGN_IN_REQUIRED = 4;
|
||||
public static final int SUCCESS = 0;
|
||||
public static final int SUCCESS_CACHE = -1;
|
||||
public static final int TIMEOUT = 15;
|
||||
|
||||
@KeepForSdk
|
||||
public CommonStatusCodes() {
|
||||
}
|
||||
|
||||
public static String getStatusCodeString(int i) {
|
||||
switch (i) {
|
||||
case -1:
|
||||
return "SUCCESS_CACHE";
|
||||
case 0:
|
||||
return "SUCCESS";
|
||||
case 1:
|
||||
case 9:
|
||||
case 11:
|
||||
case 12:
|
||||
default:
|
||||
return a.l(i, "unknown status code: ");
|
||||
case 2:
|
||||
return "SERVICE_VERSION_UPDATE_REQUIRED";
|
||||
case 3:
|
||||
return "SERVICE_DISABLED";
|
||||
case 4:
|
||||
return "SIGN_IN_REQUIRED";
|
||||
case 5:
|
||||
return "INVALID_ACCOUNT";
|
||||
case 6:
|
||||
return "RESOLUTION_REQUIRED";
|
||||
case 7:
|
||||
return "NETWORK_ERROR";
|
||||
case 8:
|
||||
return "INTERNAL_ERROR";
|
||||
case 10:
|
||||
return "DEVELOPER_ERROR";
|
||||
case 13:
|
||||
return "ERROR";
|
||||
case 14:
|
||||
return "INTERRUPTED";
|
||||
case 15:
|
||||
return "TIMEOUT";
|
||||
case 16:
|
||||
return "CANCELED";
|
||||
case 17:
|
||||
return "API_NOT_CONNECTED";
|
||||
case 18:
|
||||
return "DEAD_CLIENT";
|
||||
case 19:
|
||||
return "REMOTE_EXCEPTION";
|
||||
case 20:
|
||||
return "CONNECTION_SUSPENDED_DURING_CALL";
|
||||
case 21:
|
||||
return "RECONNECTION_TIMED_OUT_DURING_UPDATE";
|
||||
case 22:
|
||||
return "RECONNECTION_TIMED_OUT";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.data.AbstractDataBuffer;
|
||||
import com.google.android.gms.common.data.DataBuffer;
|
||||
import java.util.Iterator;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class DataBufferResponse<T, R extends AbstractDataBuffer<T> & Result> extends Response<R> implements DataBuffer<T> {
|
||||
@KeepForSdk
|
||||
public DataBufferResponse() {
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, java.io.Closeable, java.lang.AutoCloseable
|
||||
public final void close() {
|
||||
((AbstractDataBuffer) getResult()).close();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final T get(int i) {
|
||||
return (T) ((AbstractDataBuffer) getResult()).get(i);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final int getCount() {
|
||||
return ((AbstractDataBuffer) getResult()).getCount();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final Bundle getMetadata() {
|
||||
return ((AbstractDataBuffer) getResult()).getMetadata();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final boolean isClosed() {
|
||||
return ((AbstractDataBuffer) getResult()).isClosed();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, java.lang.Iterable
|
||||
public final Iterator<T> iterator() {
|
||||
return ((AbstractDataBuffer) getResult()).iterator();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer, com.google.android.gms.common.api.Releasable
|
||||
public final void release() {
|
||||
((AbstractDataBuffer) getResult()).release();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.data.DataBuffer
|
||||
public final Iterator<T> singleRefIterator() {
|
||||
return ((AbstractDataBuffer) getResult()).singleRefIterator();
|
||||
}
|
||||
|
||||
/* JADX WARN: Incorrect types in method signature: (TR;)V */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@KeepForSdk
|
||||
public DataBufferResponse(AbstractDataBuffer abstractDataBuffer) {
|
||||
super(abstractDataBuffer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,383 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.auth.api.signin.GoogleSignInAccount;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.ApiOptions;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.internal.ApiExceptionMapper;
|
||||
import com.google.android.gms.common.api.internal.ApiKey;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolders;
|
||||
import com.google.android.gms.common.api.internal.NonGmsServiceBrokerClient;
|
||||
import com.google.android.gms.common.api.internal.RegisterListenerMethod;
|
||||
import com.google.android.gms.common.api.internal.RegistrationMethods;
|
||||
import com.google.android.gms.common.api.internal.StatusExceptionMapper;
|
||||
import com.google.android.gms.common.api.internal.TaskApiCall;
|
||||
import com.google.android.gms.common.api.internal.UnregisterListenerMethod;
|
||||
import com.google.android.gms.common.api.internal.zaae;
|
||||
import com.google.android.gms.common.api.internal.zabq;
|
||||
import com.google.android.gms.common.api.internal.zabv;
|
||||
import com.google.android.gms.common.api.internal.zact;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class GoogleApi<O extends Api.ApiOptions> implements HasApiKey<O> {
|
||||
protected final GoogleApiManager zaa;
|
||||
private final Context zab;
|
||||
private final String zac;
|
||||
private final Api zad;
|
||||
private final Api.ApiOptions zae;
|
||||
private final ApiKey zaf;
|
||||
private final Looper zag;
|
||||
private final int zah;
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final GoogleApiClient zai;
|
||||
private final StatusExceptionMapper zaj;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Settings {
|
||||
|
||||
@KeepForSdk
|
||||
public static final Settings DEFAULT_SETTINGS = new Builder().build();
|
||||
public final StatusExceptionMapper zaa;
|
||||
public final Looper zab;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder {
|
||||
private StatusExceptionMapper zaa;
|
||||
private Looper zab;
|
||||
|
||||
@KeepForSdk
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@KeepForSdk
|
||||
public Settings build() {
|
||||
if (this.zaa == null) {
|
||||
this.zaa = new ApiExceptionMapper();
|
||||
}
|
||||
if (this.zab == null) {
|
||||
this.zab = Looper.getMainLooper();
|
||||
}
|
||||
return new Settings(this.zaa, this.zab);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder setLooper(Looper looper) {
|
||||
Preconditions.checkNotNull(looper, "Looper must not be null.");
|
||||
this.zab = looper;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder setMapper(StatusExceptionMapper statusExceptionMapper) {
|
||||
Preconditions.checkNotNull(statusExceptionMapper, "StatusExceptionMapper must not be null.");
|
||||
this.zaa = statusExceptionMapper;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
private Settings(StatusExceptionMapper statusExceptionMapper, Account account, Looper looper) {
|
||||
this.zaa = statusExceptionMapper;
|
||||
this.zab = looper;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleApi(Activity activity, Api<O> api, O o4, Settings settings) {
|
||||
this(activity, activity, api, o4, settings);
|
||||
}
|
||||
|
||||
private final BaseImplementation.ApiMethodImpl zad(int i, BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
apiMethodImpl.zak();
|
||||
this.zaa.zaw(this, i, apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
private final Task zae(int i, TaskApiCall taskApiCall) {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
this.zaa.zax(this, i, taskApiCall, taskCompletionSource, this.zaj);
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleApiClient asGoogleApiClient() {
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ClientSettings.Builder createClientSettingsBuilder() {
|
||||
Account account;
|
||||
Set<Scope> set;
|
||||
GoogleSignInAccount googleSignInAccount;
|
||||
ClientSettings.Builder builder = new ClientSettings.Builder();
|
||||
Api.ApiOptions apiOptions = this.zae;
|
||||
if (!(apiOptions instanceof Api.ApiOptions.HasGoogleSignInAccountOptions) || (googleSignInAccount = ((Api.ApiOptions.HasGoogleSignInAccountOptions) apiOptions).getGoogleSignInAccount()) == null) {
|
||||
Api.ApiOptions apiOptions2 = this.zae;
|
||||
account = apiOptions2 instanceof Api.ApiOptions.HasAccountOptions ? ((Api.ApiOptions.HasAccountOptions) apiOptions2).getAccount() : null;
|
||||
} else {
|
||||
account = googleSignInAccount.getAccount();
|
||||
}
|
||||
builder.zab(account);
|
||||
Api.ApiOptions apiOptions3 = this.zae;
|
||||
if (apiOptions3 instanceof Api.ApiOptions.HasGoogleSignInAccountOptions) {
|
||||
GoogleSignInAccount googleSignInAccount2 = ((Api.ApiOptions.HasGoogleSignInAccountOptions) apiOptions3).getGoogleSignInAccount();
|
||||
set = googleSignInAccount2 == null ? Collections.EMPTY_SET : googleSignInAccount2.getRequestedScopes();
|
||||
} else {
|
||||
set = Collections.EMPTY_SET;
|
||||
}
|
||||
builder.zaa(set);
|
||||
builder.zac(this.zab.getClass().getName());
|
||||
builder.setRealClientPackageName(this.zab.getPackageName());
|
||||
return builder;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Task<Boolean> disconnectService() {
|
||||
return this.zaa.zap(this);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T doBestEffortWrite(T t2) {
|
||||
zad(2, t2);
|
||||
return t2;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T doRead(T t2) {
|
||||
zad(0, t2);
|
||||
return t2;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public <A extends Api.AnyClient, T extends RegisterListenerMethod<A, ?>, U extends UnregisterListenerMethod<A, ?>> Task<Void> doRegisterEventListener(T t2, U u3) {
|
||||
Preconditions.checkNotNull(t2);
|
||||
Preconditions.checkNotNull(u3);
|
||||
Preconditions.checkNotNull(t2.getListenerKey(), "Listener has already been released.");
|
||||
Preconditions.checkNotNull(u3.getListenerKey(), "Listener has already been released.");
|
||||
Preconditions.checkArgument(Objects.equal(t2.getListenerKey(), u3.getListenerKey()), "Listener registration and unregistration methods must be constructed with the same ListenerHolder.");
|
||||
return this.zaa.zaq(this, t2, u3, new Runnable() { // from class: com.google.android.gms.common.api.zad
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Task<Boolean> doUnregisterEventListener(ListenerHolder.ListenerKey<?> listenerKey) {
|
||||
return doUnregisterEventListener(listenerKey, 0);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T doWrite(T t2) {
|
||||
zad(1, t2);
|
||||
return t2;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.HasApiKey
|
||||
public final ApiKey<O> getApiKey() {
|
||||
return this.zaf;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public O getApiOptions() {
|
||||
return (O) this.zae;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Context getApplicationContext() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getContextAttributionTag() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public String getContextFeatureId() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Looper getLooper() {
|
||||
return this.zag;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <L> ListenerHolder<L> registerListener(L l4, String str) {
|
||||
return ListenerHolders.createListenerHolder(l4, this.zag, str);
|
||||
}
|
||||
|
||||
public final int zaa() {
|
||||
return this.zah;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final Api.Client zab(Looper looper, zabq zabqVar) {
|
||||
Api.Client buildClient = ((Api.AbstractClientBuilder) Preconditions.checkNotNull(this.zad.zaa())).buildClient(this.zab, looper, createClientSettingsBuilder().build(), (ClientSettings) this.zae, (GoogleApiClient.ConnectionCallbacks) zabqVar, (GoogleApiClient.OnConnectionFailedListener) zabqVar);
|
||||
String contextAttributionTag = getContextAttributionTag();
|
||||
if (contextAttributionTag != null && (buildClient instanceof BaseGmsClient)) {
|
||||
((BaseGmsClient) buildClient).setAttributionTag(contextAttributionTag);
|
||||
}
|
||||
if (contextAttributionTag != null && (buildClient instanceof NonGmsServiceBrokerClient)) {
|
||||
((NonGmsServiceBrokerClient) buildClient).zac(contextAttributionTag);
|
||||
}
|
||||
return buildClient;
|
||||
}
|
||||
|
||||
public final zact zac(Context context, Handler handler) {
|
||||
return new zact(context, handler, createClientSettingsBuilder().build());
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
@com.google.android.gms.common.annotation.KeepForSdk
|
||||
@java.lang.Deprecated
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public GoogleApi(android.app.Activity r2, com.google.android.gms.common.api.Api<O> r3, O r4, com.google.android.gms.common.api.internal.StatusExceptionMapper r5) {
|
||||
/*
|
||||
r1 = this;
|
||||
com.google.android.gms.common.api.GoogleApi$Settings$Builder r0 = new com.google.android.gms.common.api.GoogleApi$Settings$Builder
|
||||
r0.<init>()
|
||||
r0.setMapper(r5)
|
||||
android.os.Looper r5 = r2.getMainLooper()
|
||||
r0.setLooper(r5)
|
||||
com.google.android.gms.common.api.GoogleApi$Settings r5 = r0.build()
|
||||
r1.<init>(r2, r3, r4, r5)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.GoogleApi.<init>(android.app.Activity, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.internal.StatusExceptionMapper):void");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <TResult, A extends Api.AnyClient> Task<TResult> doBestEffortWrite(TaskApiCall<A, TResult> taskApiCall) {
|
||||
return zae(2, taskApiCall);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <TResult, A extends Api.AnyClient> Task<TResult> doRead(TaskApiCall<A, TResult> taskApiCall) {
|
||||
return zae(0, taskApiCall);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Task<Boolean> doUnregisterEventListener(ListenerHolder.ListenerKey<?> listenerKey, int i) {
|
||||
Preconditions.checkNotNull(listenerKey, "Listener key cannot be null.");
|
||||
return this.zaa.zar(this, listenerKey, i);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <TResult, A extends Api.AnyClient> Task<TResult> doWrite(TaskApiCall<A, TResult> taskApiCall) {
|
||||
return zae(1, taskApiCall);
|
||||
}
|
||||
|
||||
private GoogleApi(Context context, Activity activity, Api api, Api.ApiOptions apiOptions, Settings settings) {
|
||||
Preconditions.checkNotNull(context, "Null context is not permitted.");
|
||||
Preconditions.checkNotNull(api, "Api must not be null.");
|
||||
Preconditions.checkNotNull(settings, "Settings must not be null; use Settings.DEFAULT_SETTINGS instead.");
|
||||
this.zab = context.getApplicationContext();
|
||||
String str = null;
|
||||
if (PlatformVersion.isAtLeastR()) {
|
||||
try {
|
||||
str = (String) Context.class.getMethod("getAttributionTag", new Class[0]).invoke(context, new Object[0]);
|
||||
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException unused) {
|
||||
}
|
||||
}
|
||||
this.zac = str;
|
||||
this.zad = api;
|
||||
this.zae = apiOptions;
|
||||
this.zag = settings.zab;
|
||||
ApiKey sharedApiKey = ApiKey.getSharedApiKey(api, apiOptions, str);
|
||||
this.zaf = sharedApiKey;
|
||||
this.zai = new zabv(this);
|
||||
GoogleApiManager zam = GoogleApiManager.zam(this.zab);
|
||||
this.zaa = zam;
|
||||
this.zah = zam.zaa();
|
||||
this.zaj = settings.zaa;
|
||||
if (activity != null && !(activity instanceof GoogleApiActivity) && Looper.myLooper() == Looper.getMainLooper()) {
|
||||
zaae.zad(activity, zam, sharedApiKey);
|
||||
}
|
||||
zam.zaB(this);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient> Task<Void> doRegisterEventListener(RegistrationMethods<A, ?> registrationMethods) {
|
||||
Preconditions.checkNotNull(registrationMethods);
|
||||
Preconditions.checkNotNull(registrationMethods.register.getListenerKey(), "Listener has already been released.");
|
||||
Preconditions.checkNotNull(registrationMethods.zaa.getListenerKey(), "Listener has already been released.");
|
||||
return this.zaa.zaq(this, registrationMethods.register, registrationMethods.zaa, registrationMethods.zab);
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
@com.google.android.gms.common.annotation.KeepForSdk
|
||||
@java.lang.Deprecated
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public GoogleApi(android.content.Context r2, com.google.android.gms.common.api.Api<O> r3, O r4, android.os.Looper r5, com.google.android.gms.common.api.internal.StatusExceptionMapper r6) {
|
||||
/*
|
||||
r1 = this;
|
||||
com.google.android.gms.common.api.GoogleApi$Settings$Builder r0 = new com.google.android.gms.common.api.GoogleApi$Settings$Builder
|
||||
r0.<init>()
|
||||
r0.setLooper(r5)
|
||||
r0.setMapper(r6)
|
||||
com.google.android.gms.common.api.GoogleApi$Settings r5 = r0.build()
|
||||
r1.<init>(r2, r3, r4, r5)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.GoogleApi.<init>(android.content.Context, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, android.os.Looper, com.google.android.gms.common.api.internal.StatusExceptionMapper):void");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public GoogleApi(Context context, Api<O> api, O o4, Settings settings) {
|
||||
this(context, (Activity) null, api, o4, settings);
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
@com.google.android.gms.common.annotation.KeepForSdk
|
||||
@java.lang.Deprecated
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public GoogleApi(android.content.Context r2, com.google.android.gms.common.api.Api<O> r3, O r4, com.google.android.gms.common.api.internal.StatusExceptionMapper r5) {
|
||||
/*
|
||||
r1 = this;
|
||||
com.google.android.gms.common.api.GoogleApi$Settings$Builder r0 = new com.google.android.gms.common.api.GoogleApi$Settings$Builder
|
||||
r0.<init>()
|
||||
r0.setMapper(r5)
|
||||
com.google.android.gms.common.api.GoogleApi$Settings r5 = r0.build()
|
||||
r1.<init>(r2, r3, r4, r5)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.GoogleApi.<init>(android.content.Context, com.google.android.gms.common.api.Api, com.google.android.gms.common.api.Api$ApiOptions, com.google.android.gms.common.api.internal.StatusExceptionMapper):void");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import C.w;
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.cloudmessaging.CloudMessagingReceiver;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleApiActivity extends Activity implements DialogInterface.OnCancelListener {
|
||||
|
||||
@VisibleForTesting
|
||||
protected int zaa = 0;
|
||||
|
||||
public static Intent zaa(Context context, PendingIntent pendingIntent, int i, boolean z3) {
|
||||
Intent intent = new Intent(context, (Class<?>) GoogleApiActivity.class);
|
||||
intent.putExtra(CloudMessagingReceiver.IntentKeys.PENDING_INTENT, pendingIntent);
|
||||
intent.putExtra("failing_client_id", i);
|
||||
intent.putExtra("notify_manager", z3);
|
||||
return intent;
|
||||
}
|
||||
|
||||
private final void zab() {
|
||||
GoogleApiActivity googleApiActivity;
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras == null) {
|
||||
Log.e("GoogleApiActivity", "Activity started without extras");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
PendingIntent pendingIntent = (PendingIntent) extras.get(CloudMessagingReceiver.IntentKeys.PENDING_INTENT);
|
||||
Integer num = (Integer) extras.get("error_code");
|
||||
if (pendingIntent == null && num == null) {
|
||||
Log.e("GoogleApiActivity", "Activity started without resolution");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (pendingIntent == null) {
|
||||
GoogleApiAvailability.getInstance().showErrorDialogFragment(this, ((Integer) Preconditions.checkNotNull(num)).intValue(), 2, this);
|
||||
this.zaa = 1;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
googleApiActivity = this;
|
||||
try {
|
||||
googleApiActivity.startIntentSenderForResult(pendingIntent.getIntentSender(), 1, null, 0, 0, 0);
|
||||
googleApiActivity.zaa = 1;
|
||||
} catch (ActivityNotFoundException e4) {
|
||||
e = e4;
|
||||
ActivityNotFoundException activityNotFoundException = e;
|
||||
if (extras.getBoolean("notify_manager", true)) {
|
||||
GoogleApiManager.zam(googleApiActivity).zaz(new ConnectionResult(22, null), googleApiActivity.getIntent().getIntExtra("failing_client_id", -1));
|
||||
} else {
|
||||
String o4 = w.o("Activity not found while launching ", pendingIntent.toString(), ".");
|
||||
if (Build.FINGERPRINT.contains("generic")) {
|
||||
o4 = o4.concat(" This may occur when resolving Google Play services connection issues on emulators with Google APIs but not Google Play Store.");
|
||||
}
|
||||
Log.e("GoogleApiActivity", o4, activityNotFoundException);
|
||||
}
|
||||
googleApiActivity.zaa = 1;
|
||||
googleApiActivity.finish();
|
||||
} catch (IntentSender.SendIntentException e5) {
|
||||
e = e5;
|
||||
Log.e("GoogleApiActivity", "Failed to launch pendingIntent", e);
|
||||
googleApiActivity.finish();
|
||||
}
|
||||
} catch (ActivityNotFoundException e6) {
|
||||
e = e6;
|
||||
googleApiActivity = this;
|
||||
} catch (IntentSender.SendIntentException e7) {
|
||||
e = e7;
|
||||
googleApiActivity = this;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
public final void onActivityResult(int i, int i4, Intent intent) {
|
||||
super.onActivityResult(i, i4, intent);
|
||||
if (i == 1) {
|
||||
boolean booleanExtra = getIntent().getBooleanExtra("notify_manager", true);
|
||||
this.zaa = 0;
|
||||
setResult(i4, intent);
|
||||
if (booleanExtra) {
|
||||
GoogleApiManager zam = GoogleApiManager.zam(this);
|
||||
if (i4 == -1) {
|
||||
zam.zaA();
|
||||
} else if (i4 == 0) {
|
||||
zam.zaz(new ConnectionResult(13, null), getIntent().getIntExtra("failing_client_id", -1));
|
||||
}
|
||||
}
|
||||
} else if (i == 2) {
|
||||
this.zaa = 0;
|
||||
setResult(i4, intent);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // android.content.DialogInterface.OnCancelListener
|
||||
public final void onCancel(DialogInterface dialogInterface) {
|
||||
this.zaa = 0;
|
||||
setResult(0);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
public final void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
if (bundle != null) {
|
||||
this.zaa = bundle.getInt("resolution");
|
||||
}
|
||||
if (this.zaa != 1) {
|
||||
zab();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
public final void onSaveInstanceState(Bundle bundle) {
|
||||
bundle.putInt("resolution", this.zaa);
|
||||
super.onSaveInstanceState(bundle);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,388 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import C.w;
|
||||
import android.accounts.Account;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.View;
|
||||
import androidx.fragment.app.P;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.LifecycleActivity;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.api.internal.SignInConnectionListener;
|
||||
import com.google.android.gms.common.api.internal.zabe;
|
||||
import com.google.android.gms.common.api.internal.zada;
|
||||
import com.google.android.gms.common.api.internal.zak;
|
||||
import com.google.android.gms.common.api.internal.zat;
|
||||
import com.google.android.gms.common.internal.AccountType;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import com.google.android.gms.signin.SignInOptions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import s.j;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class GoogleApiClient {
|
||||
|
||||
@KeepForSdk
|
||||
public static final String DEFAULT_ACCOUNT = "<<default account>>";
|
||||
public static final int SIGN_IN_MODE_OPTIONAL = 2;
|
||||
public static final int SIGN_IN_MODE_REQUIRED = 1;
|
||||
private static final Set zaa = Collections.newSetFromMap(new WeakHashMap());
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConnectionCallbacks extends com.google.android.gms.common.api.internal.ConnectionCallbacks {
|
||||
public static final int CAUSE_NETWORK_LOST = 2;
|
||||
public static final int CAUSE_SERVICE_DISCONNECTED = 1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public interface OnConnectionFailedListener extends com.google.android.gms.common.api.internal.OnConnectionFailedListener {
|
||||
}
|
||||
|
||||
public static void dumpAll(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
Set<GoogleApiClient> set = zaa;
|
||||
synchronized (set) {
|
||||
try {
|
||||
String str2 = str + " ";
|
||||
int i = 0;
|
||||
for (GoogleApiClient googleApiClient : set) {
|
||||
printWriter.append((CharSequence) str).append("GoogleApiClient#").println(i);
|
||||
googleApiClient.dump(str2, fileDescriptor, printWriter, strArr);
|
||||
i++;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Set<GoogleApiClient> getAllClients() {
|
||||
Set<GoogleApiClient> set = zaa;
|
||||
synchronized (set) {
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
public abstract ConnectionResult blockingConnect();
|
||||
|
||||
public abstract ConnectionResult blockingConnect(long j4, TimeUnit timeUnit);
|
||||
|
||||
public abstract PendingResult<Status> clearDefaultAccountAndReconnect();
|
||||
|
||||
public abstract void connect();
|
||||
|
||||
public void connect(int i) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract void disconnect();
|
||||
|
||||
public abstract void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr);
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient, R extends Result, T extends BaseImplementation.ApiMethodImpl<R, A>> T enqueue(T t2) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T execute(T t2) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public <C extends Api.Client> C getClient(Api.AnyClientKey<C> anyClientKey) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract ConnectionResult getConnectionResult(Api<?> api);
|
||||
|
||||
@KeepForSdk
|
||||
public Context getContext() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Looper getLooper() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasApi(Api<?> api) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract boolean hasConnectedApi(Api<?> api);
|
||||
|
||||
public abstract boolean isConnected();
|
||||
|
||||
public abstract boolean isConnecting();
|
||||
|
||||
public abstract boolean isConnectionCallbacksRegistered(ConnectionCallbacks connectionCallbacks);
|
||||
|
||||
public abstract boolean isConnectionFailedListenerRegistered(OnConnectionFailedListener onConnectionFailedListener);
|
||||
|
||||
@KeepForSdk
|
||||
public boolean maybeSignIn(SignInConnectionListener signInConnectionListener) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void maybeSignOut() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract void reconnect();
|
||||
|
||||
public abstract void registerConnectionCallbacks(ConnectionCallbacks connectionCallbacks);
|
||||
|
||||
public abstract void registerConnectionFailedListener(OnConnectionFailedListener onConnectionFailedListener);
|
||||
|
||||
@KeepForSdk
|
||||
public <L> ListenerHolder<L> registerListener(L l4) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract void stopAutoManage(P p);
|
||||
|
||||
public abstract void unregisterConnectionCallbacks(ConnectionCallbacks connectionCallbacks);
|
||||
|
||||
public abstract void unregisterConnectionFailedListener(OnConnectionFailedListener onConnectionFailedListener);
|
||||
|
||||
public void zao(zada zadaVar) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public void zap(zada zadaVar) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Builder {
|
||||
private Account zaa;
|
||||
private final Set zab;
|
||||
private final Set zac;
|
||||
private int zad;
|
||||
private View zae;
|
||||
private String zaf;
|
||||
private String zag;
|
||||
private final Map zah;
|
||||
private final Context zai;
|
||||
private final Map zaj;
|
||||
private LifecycleActivity zak;
|
||||
private int zal;
|
||||
private OnConnectionFailedListener zam;
|
||||
private Looper zan;
|
||||
private GoogleApiAvailability zao;
|
||||
private Api.AbstractClientBuilder zap;
|
||||
private final ArrayList zaq;
|
||||
private final ArrayList zar;
|
||||
|
||||
/* JADX WARN: Type inference failed for: r0v2, types: [java.util.Map, s.j] */
|
||||
/* JADX WARN: Type inference failed for: r0v3, types: [java.util.Map, s.j] */
|
||||
public Builder(Context context) {
|
||||
this.zab = new HashSet();
|
||||
this.zac = new HashSet();
|
||||
this.zah = new j(0);
|
||||
this.zaj = new j(0);
|
||||
this.zal = -1;
|
||||
this.zao = GoogleApiAvailability.getInstance();
|
||||
this.zap = com.google.android.gms.signin.zad.zac;
|
||||
this.zaq = new ArrayList();
|
||||
this.zar = new ArrayList();
|
||||
this.zai = context;
|
||||
this.zan = context.getMainLooper();
|
||||
this.zaf = context.getPackageName();
|
||||
this.zag = context.getClass().getName();
|
||||
}
|
||||
|
||||
private final void zab(Api api, Api.ApiOptions apiOptions, Scope... scopeArr) {
|
||||
HashSet hashSet = new HashSet(((Api.BaseClientBuilder) Preconditions.checkNotNull(api.zac(), "Base client builder must not be null")).getImpliedScopes(apiOptions));
|
||||
for (Scope scope : scopeArr) {
|
||||
hashSet.add(scope);
|
||||
}
|
||||
this.zah.put(api, new com.google.android.gms.common.internal.zab(hashSet));
|
||||
}
|
||||
|
||||
public Builder addApi(Api<? extends Api.ApiOptions.NotRequiredOptions> api) {
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
this.zaj.put(api, null);
|
||||
List<Scope> impliedScopes = ((Api.BaseClientBuilder) Preconditions.checkNotNull(api.zac(), "Base client builder must not be null")).getImpliedScopes(null);
|
||||
this.zac.addAll(impliedScopes);
|
||||
this.zab.addAll(impliedScopes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public <O extends Api.ApiOptions.HasOptions> Builder addApiIfAvailable(Api<O> api, O o4, Scope... scopeArr) {
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
Preconditions.checkNotNull(o4, "Null options are not permitted for this Api");
|
||||
this.zaj.put(api, o4);
|
||||
zab(api, o4, scopeArr);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addConnectionCallbacks(ConnectionCallbacks connectionCallbacks) {
|
||||
Preconditions.checkNotNull(connectionCallbacks, "Listener must not be null");
|
||||
this.zaq.add(connectionCallbacks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addOnConnectionFailedListener(OnConnectionFailedListener onConnectionFailedListener) {
|
||||
Preconditions.checkNotNull(onConnectionFailedListener, "Listener must not be null");
|
||||
this.zar.add(onConnectionFailedListener);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder addScope(Scope scope) {
|
||||
Preconditions.checkNotNull(scope, "Scope must not be null");
|
||||
this.zab.add(scope);
|
||||
return this;
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r11v0, types: [java.util.Map, s.j] */
|
||||
/* JADX WARN: Type inference failed for: r14v0, types: [java.util.Map, s.e, s.j] */
|
||||
public GoogleApiClient build() {
|
||||
Preconditions.checkArgument(!this.zaj.isEmpty(), "must call addApi() to add at least one API");
|
||||
ClientSettings zaa = zaa();
|
||||
Map zad = zaa.zad();
|
||||
?? jVar = new j(0);
|
||||
?? jVar2 = new j(0);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
boolean z3 = false;
|
||||
Api api = null;
|
||||
for (Api api2 : this.zaj.keySet()) {
|
||||
Object obj = this.zaj.get(api2);
|
||||
boolean z4 = zad.get(api2) != null;
|
||||
jVar.put(api2, Boolean.valueOf(z4));
|
||||
zat zatVar = new zat(api2, z4);
|
||||
arrayList.add(zatVar);
|
||||
Api.AbstractClientBuilder abstractClientBuilder = (Api.AbstractClientBuilder) Preconditions.checkNotNull(api2.zaa());
|
||||
Api.Client buildClient = abstractClientBuilder.buildClient(this.zai, this.zan, zaa, (ClientSettings) obj, (ConnectionCallbacks) zatVar, (OnConnectionFailedListener) zatVar);
|
||||
jVar2.put(api2.zab(), buildClient);
|
||||
if (abstractClientBuilder.getPriority() == 1) {
|
||||
z3 = obj != null;
|
||||
}
|
||||
if (buildClient.providesSignIn()) {
|
||||
if (api != null) {
|
||||
throw new IllegalStateException(api2.zad() + " cannot be used with " + api.zad());
|
||||
}
|
||||
api = api2;
|
||||
}
|
||||
}
|
||||
if (api != null) {
|
||||
if (z3) {
|
||||
throw new IllegalStateException(w.o("With using ", api.zad(), ", GamesOptions can only be specified within GoogleSignInOptions.Builder"));
|
||||
}
|
||||
Preconditions.checkState(this.zaa == null, "Must not set an account in GoogleApiClient.Builder when using %s. Set account in GoogleSignInOptions.Builder instead", api.zad());
|
||||
Preconditions.checkState(this.zab.equals(this.zac), "Must not set scopes in GoogleApiClient.Builder when using %s. Set account in GoogleSignInOptions.Builder instead.", api.zad());
|
||||
}
|
||||
zabe zabeVar = new zabe(this.zai, new ReentrantLock(), this.zan, zaa, this.zao, this.zap, jVar, this.zaq, this.zar, jVar2, this.zal, zabe.zad(jVar2.values(), true), arrayList);
|
||||
synchronized (GoogleApiClient.zaa) {
|
||||
GoogleApiClient.zaa.add(zabeVar);
|
||||
}
|
||||
if (this.zal >= 0) {
|
||||
zak.zaa(this.zak).zad(this.zal, zabeVar, this.zam);
|
||||
}
|
||||
return zabeVar;
|
||||
}
|
||||
|
||||
public Builder enableAutoManage(P p, int i, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
LifecycleActivity lifecycleActivity = new LifecycleActivity((Activity) p);
|
||||
Preconditions.checkArgument(i >= 0, "clientId must be non-negative");
|
||||
this.zal = i;
|
||||
this.zam = onConnectionFailedListener;
|
||||
this.zak = lifecycleActivity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAccountName(String str) {
|
||||
this.zaa = str == null ? null : new Account(str, AccountType.GOOGLE);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setGravityForPopups(int i) {
|
||||
this.zad = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setHandler(Handler handler) {
|
||||
Preconditions.checkNotNull(handler, "Handler must not be null");
|
||||
this.zan = handler.getLooper();
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setViewForPopups(View view) {
|
||||
Preconditions.checkNotNull(view, "View must not be null");
|
||||
this.zae = view;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder useDefaultAccount() {
|
||||
setAccountName("<<default account>>");
|
||||
return this;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public final ClientSettings zaa() {
|
||||
SignInOptions signInOptions = SignInOptions.zaa;
|
||||
Map map = this.zaj;
|
||||
Api api = com.google.android.gms.signin.zad.zag;
|
||||
if (map.containsKey(api)) {
|
||||
signInOptions = (SignInOptions) this.zaj.get(api);
|
||||
}
|
||||
return new ClientSettings(this.zaa, this.zab, this.zah, this.zad, this.zae, this.zaf, this.zag, signInOptions, false);
|
||||
}
|
||||
|
||||
public Builder enableAutoManage(P p, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
enableAutoManage(p, 0, onConnectionFailedListener);
|
||||
return this;
|
||||
}
|
||||
|
||||
public <T extends Api.ApiOptions.NotRequiredOptions> Builder addApiIfAvailable(Api<? extends Api.ApiOptions.NotRequiredOptions> api, Scope... scopeArr) {
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
this.zaj.put(api, null);
|
||||
zab(api, null, scopeArr);
|
||||
return this;
|
||||
}
|
||||
|
||||
public <O extends Api.ApiOptions.HasOptions> Builder addApi(Api<O> api, O o4) {
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
Preconditions.checkNotNull(o4, "Null options are not permitted for this Api");
|
||||
this.zaj.put(api, o4);
|
||||
List<Scope> impliedScopes = ((Api.BaseClientBuilder) Preconditions.checkNotNull(api.zac(), "Base client builder must not be null")).getImpliedScopes(o4);
|
||||
this.zac.addAll(impliedScopes);
|
||||
this.zab.addAll(impliedScopes);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder(Context context, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this(context);
|
||||
Preconditions.checkNotNull(connectionCallbacks, "Must provide a connected listener");
|
||||
this.zaq.add(connectionCallbacks);
|
||||
Preconditions.checkNotNull(onConnectionFailedListener, "Must provide a connection failed listener");
|
||||
this.zar.add(onConnectionFailedListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.ApiOptions;
|
||||
import com.google.android.gms.common.api.internal.ApiKey;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface HasApiKey<O extends Api.ApiOptions> {
|
||||
@KeepForSdk
|
||||
ApiKey<O> getApiKey();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface OptionalModuleApi {
|
||||
@KeepForSdk
|
||||
Feature[] getOptionalFeatures();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class OptionalPendingResult<R extends Result> extends PendingResult<R> {
|
||||
public abstract R get();
|
||||
|
||||
public abstract boolean isDone();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class PendingResult<R extends Result> {
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface StatusListener {
|
||||
@KeepForSdk
|
||||
void onComplete(Status status);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void addStatusListener(StatusListener statusListener) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public abstract R await();
|
||||
|
||||
public abstract R await(long j4, TimeUnit timeUnit);
|
||||
|
||||
public abstract void cancel();
|
||||
|
||||
public abstract boolean isCanceled();
|
||||
|
||||
public abstract void setResultCallback(ResultCallback<? super R> resultCallback);
|
||||
|
||||
public abstract void setResultCallback(ResultCallback<? super R> resultCallback, long j4, TimeUnit timeUnit);
|
||||
|
||||
public <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.internal.OptionalPendingResultImpl;
|
||||
import com.google.android.gms.common.api.internal.StatusPendingResult;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class PendingResults {
|
||||
private PendingResults() {
|
||||
}
|
||||
|
||||
public static PendingResult<Status> canceledPendingResult() {
|
||||
StatusPendingResult statusPendingResult = new StatusPendingResult(Looper.getMainLooper());
|
||||
statusPendingResult.cancel();
|
||||
return statusPendingResult;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <R extends Result> PendingResult<R> immediateFailedResult(R r4, GoogleApiClient googleApiClient) {
|
||||
Preconditions.checkNotNull(r4, "Result must not be null");
|
||||
Preconditions.checkArgument(!r4.getStatus().isSuccess(), "Status code must not be SUCCESS");
|
||||
zag zagVar = new zag(googleApiClient, r4);
|
||||
zagVar.setResult(r4);
|
||||
return zagVar;
|
||||
}
|
||||
|
||||
public static <R extends Result> OptionalPendingResult<R> immediatePendingResult(R r4) {
|
||||
Preconditions.checkNotNull(r4, "Result must not be null");
|
||||
zah zahVar = new zah(null);
|
||||
zahVar.setResult(r4);
|
||||
return new OptionalPendingResultImpl(zahVar);
|
||||
}
|
||||
|
||||
public static <R extends Result> PendingResult<R> canceledPendingResult(R r4) {
|
||||
Preconditions.checkNotNull(r4, "Result must not be null");
|
||||
Preconditions.checkArgument(r4.getStatus().getStatusCode() == 16, "Status code must be CommonStatusCodes.CANCELED");
|
||||
zaf zafVar = new zaf(r4);
|
||||
zafVar.cancel();
|
||||
return zafVar;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <R extends Result> OptionalPendingResult<R> immediatePendingResult(R r4, GoogleApiClient googleApiClient) {
|
||||
Preconditions.checkNotNull(r4, "Result must not be null");
|
||||
zah zahVar = new zah(googleApiClient);
|
||||
zahVar.setResult(r4);
|
||||
return new OptionalPendingResultImpl(zahVar);
|
||||
}
|
||||
|
||||
public static PendingResult<Status> immediatePendingResult(Status status) {
|
||||
Preconditions.checkNotNull(status, "Result must not be null");
|
||||
StatusPendingResult statusPendingResult = new StatusPendingResult(Looper.getMainLooper());
|
||||
statusPendingResult.setResult(status);
|
||||
return statusPendingResult;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static PendingResult<Status> immediatePendingResult(Status status, GoogleApiClient googleApiClient) {
|
||||
Preconditions.checkNotNull(status, "Result must not be null");
|
||||
StatusPendingResult statusPendingResult = new StatusPendingResult(googleApiClient);
|
||||
statusPendingResult.setResult(status);
|
||||
return statusPendingResult;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Releasable {
|
||||
void release();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.IntentSender;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ResolvableApiException extends ApiException {
|
||||
public ResolvableApiException(Status status) {
|
||||
super(status);
|
||||
}
|
||||
|
||||
public PendingIntent getResolution() {
|
||||
return getStatus().getResolution();
|
||||
}
|
||||
|
||||
public void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
getStatus().startResolutionForResult(activity, i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.IntentSender;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ResolvingResultCallbacks<R extends Result> extends ResultCallbacks<R> {
|
||||
private final Activity zza;
|
||||
private final int zzb;
|
||||
|
||||
public ResolvingResultCallbacks(Activity activity, int i) {
|
||||
Preconditions.checkNotNull(activity, "Activity must not be null");
|
||||
this.zza = activity;
|
||||
this.zzb = i;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.ResultCallbacks
|
||||
@KeepForSdk
|
||||
public final void onFailure(Status status) {
|
||||
if (!status.hasResolution()) {
|
||||
onUnresolvableFailure(status);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
status.startResolutionForResult(this.zza, this.zzb);
|
||||
} catch (IntentSender.SendIntentException e4) {
|
||||
Log.e("ResolvingResultCallback", "Failed to start resolution", e4);
|
||||
onUnresolvableFailure(new Status(8));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.ResultCallbacks
|
||||
public abstract void onSuccess(R r4);
|
||||
|
||||
public abstract void onUnresolvableFailure(Status status);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Response<T extends Result> {
|
||||
private Result zza;
|
||||
|
||||
public Response() {
|
||||
}
|
||||
|
||||
public T getResult() {
|
||||
return (T) this.zza;
|
||||
}
|
||||
|
||||
public void setResult(T t2) {
|
||||
this.zza = t2;
|
||||
}
|
||||
|
||||
public Response(T t2) {
|
||||
this.zza = t2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Result {
|
||||
Status getStatus();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ResultCallback<R extends Result> {
|
||||
void onResult(R r4);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user