Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ResultCallbacks<R extends Result> implements ResultCallback<R> {
|
||||
public abstract void onFailure(Status status);
|
||||
|
||||
@Override // com.google.android.gms.common.api.ResultCallback
|
||||
@KeepForSdk
|
||||
public final void onResult(R r4) {
|
||||
Status status = r4.getStatus();
|
||||
if (status.isSuccess()) {
|
||||
onSuccess(r4);
|
||||
return;
|
||||
}
|
||||
onFailure(status);
|
||||
if (r4 instanceof Releasable) {
|
||||
try {
|
||||
((Releasable) r4).release();
|
||||
} catch (RuntimeException e4) {
|
||||
Log.w("ResultCallbacks", "Unable to release ".concat(String.valueOf(r4)), e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void onSuccess(R r4);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.internal.zacp;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ResultTransform<R extends Result, S extends Result> {
|
||||
public final PendingResult<S> createFailedResult(Status status) {
|
||||
return new zacp(status);
|
||||
}
|
||||
|
||||
public Status onFailure(Status status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
public abstract PendingResult<S> onSuccess(R r4);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
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;
|
||||
|
||||
@SafeParcelable.Class(creator = "ScopeCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Scope extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public static final Parcelable.Creator<Scope> CREATOR = new zza();
|
||||
|
||||
@SafeParcelable.VersionField(id = 1)
|
||||
final int zza;
|
||||
|
||||
@SafeParcelable.Field(getter = "getScopeUri", id = 2)
|
||||
private final String zzb;
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public Scope(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) String str) {
|
||||
Preconditions.checkNotEmpty(str, "scopeUri must not be null or empty");
|
||||
this.zza = i;
|
||||
this.zzb = str;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof Scope) {
|
||||
return this.zzb.equals(((Scope) obj).zzb);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String getScopeUri() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.zzb.hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zza);
|
||||
SafeParcelWriter.writeString(parcel, 2, getScopeUri(), false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public Scope(String str) {
|
||||
this(1, str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
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.ConnectionResult;
|
||||
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.ReflectedParcelable;
|
||||
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;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
|
||||
@SafeParcelable.Class(creator = "StatusCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public final class Status extends AbstractSafeParcelable implements Result, ReflectedParcelable {
|
||||
|
||||
@SafeParcelable.VersionField(id = 1000)
|
||||
final int zzb;
|
||||
|
||||
@SafeParcelable.Field(getter = "getStatusCode", id = 1)
|
||||
private final int zzc;
|
||||
|
||||
@SafeParcelable.Field(getter = "getStatusMessage", id = 2)
|
||||
private final String zzd;
|
||||
|
||||
@SafeParcelable.Field(getter = "getPendingIntent", id = 3)
|
||||
private final PendingIntent zze;
|
||||
|
||||
@SafeParcelable.Field(getter = "getConnectionResult", id = 4)
|
||||
private final ConnectionResult zzf;
|
||||
|
||||
@ShowFirstParty
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_SUCCESS_CACHE = new Status(-1);
|
||||
|
||||
@ShowFirstParty
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_SUCCESS = new Status(0);
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_INTERRUPTED = new Status(14);
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_INTERNAL_ERROR = new Status(8);
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_TIMEOUT = new Status(15);
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_CANCELED = new Status(16);
|
||||
|
||||
@ShowFirstParty
|
||||
public static final Status zza = new Status(17);
|
||||
|
||||
@KeepForSdk
|
||||
public static final Status RESULT_DEAD_CLIENT = new Status(18);
|
||||
public static final Parcelable.Creator<Status> CREATOR = new zzb();
|
||||
|
||||
@SafeParcelable.Constructor
|
||||
public Status(@SafeParcelable.Param(id = 1000) int i, @SafeParcelable.Param(id = 1) int i4, @SafeParcelable.Param(id = 2) String str, @SafeParcelable.Param(id = 3) PendingIntent pendingIntent, @SafeParcelable.Param(id = 4) ConnectionResult connectionResult) {
|
||||
this.zzb = i;
|
||||
this.zzc = i4;
|
||||
this.zzd = str;
|
||||
this.zze = pendingIntent;
|
||||
this.zzf = connectionResult;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof Status)) {
|
||||
return false;
|
||||
}
|
||||
Status status = (Status) obj;
|
||||
return this.zzb == status.zzb && this.zzc == status.zzc && Objects.equal(this.zzd, status.zzd) && Objects.equal(this.zze, status.zze) && Objects.equal(this.zzf, status.zzf);
|
||||
}
|
||||
|
||||
public ConnectionResult getConnectionResult() {
|
||||
return this.zzf;
|
||||
}
|
||||
|
||||
public PendingIntent getResolution() {
|
||||
return this.zze;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public Status getStatus() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return this.zzc;
|
||||
}
|
||||
|
||||
public String getStatusMessage() {
|
||||
return this.zzd;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public boolean hasResolution() {
|
||||
return this.zze != null;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(Integer.valueOf(this.zzb), Integer.valueOf(this.zzc), this.zzd, this.zze, this.zzf);
|
||||
}
|
||||
|
||||
public boolean isCanceled() {
|
||||
return this.zzc == 16;
|
||||
}
|
||||
|
||||
public boolean isInterrupted() {
|
||||
return this.zzc == 14;
|
||||
}
|
||||
|
||||
public boolean isSuccess() {
|
||||
return this.zzc <= 0;
|
||||
}
|
||||
|
||||
public void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
if (hasResolution()) {
|
||||
PendingIntent pendingIntent = this.zze;
|
||||
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());
|
||||
stringHelper.add("resolution", this.zze);
|
||||
return stringHelper.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, getStatusCode());
|
||||
SafeParcelWriter.writeString(parcel, 2, getStatusMessage(), false);
|
||||
SafeParcelWriter.writeParcelable(parcel, 3, this.zze, i, false);
|
||||
SafeParcelWriter.writeParcelable(parcel, 4, getConnectionResult(), i, false);
|
||||
SafeParcelWriter.writeInt(parcel, 1000, this.zzb);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public final String zza() {
|
||||
String str = this.zzd;
|
||||
return str != null ? str : CommonStatusCodes.getStatusCodeString(this.zzc);
|
||||
}
|
||||
|
||||
public Status(int i) {
|
||||
this(i, (String) null);
|
||||
}
|
||||
|
||||
public Status(int i, String str) {
|
||||
this(1, i, str, null, null);
|
||||
}
|
||||
|
||||
public Status(int i, String str, PendingIntent pendingIntent) {
|
||||
this(1, i, str, pendingIntent, null);
|
||||
}
|
||||
|
||||
public Status(ConnectionResult connectionResult, String str) {
|
||||
this(connectionResult, str, 17);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public Status(ConnectionResult connectionResult, String str, int i) {
|
||||
this(1, i, str, connectionResult.getResolution(), connectionResult);
|
||||
}
|
||||
}
|
||||
@@ -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 TransformedResult<R extends Result> {
|
||||
public abstract void andFinally(ResultCallbacks<? super R> resultCallbacks);
|
||||
|
||||
public abstract <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
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 final class UnsupportedApiCallException extends UnsupportedOperationException {
|
||||
private final Feature zza;
|
||||
|
||||
@KeepForSdk
|
||||
public UnsupportedApiCallException(Feature feature) {
|
||||
this.zza = feature;
|
||||
}
|
||||
|
||||
@Override // java.lang.Throwable
|
||||
public String getMessage() {
|
||||
return "Missing ".concat(String.valueOf(this.zza));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ActivityLifecycleObserver {
|
||||
@KeepForSdk
|
||||
public static final ActivityLifecycleObserver of(Activity activity) {
|
||||
return new zab(zaa.zaa(activity));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract ActivityLifecycleObserver onStopCallOnce(Runnable runnable);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.ApiExceptionUtil;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class ApiExceptionMapper implements StatusExceptionMapper {
|
||||
@Override // com.google.android.gms.common.api.internal.StatusExceptionMapper
|
||||
public final Exception getException(Status status) {
|
||||
return ApiExceptionUtil.fromStatus(status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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.internal.Objects;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ApiKey<O extends Api.ApiOptions> {
|
||||
private final int zaa;
|
||||
private final Api zab;
|
||||
private final Api.ApiOptions zac;
|
||||
private final String zad;
|
||||
|
||||
private ApiKey(Api api, Api.ApiOptions apiOptions, String str) {
|
||||
this.zab = api;
|
||||
this.zac = apiOptions;
|
||||
this.zad = str;
|
||||
this.zaa = Objects.hashCode(api, apiOptions, str);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <O extends Api.ApiOptions> ApiKey<O> getSharedApiKey(Api<O> api, O o4, String str) {
|
||||
return new ApiKey<>(api, o4, str);
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ApiKey)) {
|
||||
return false;
|
||||
}
|
||||
ApiKey apiKey = (ApiKey) obj;
|
||||
return Objects.equal(this.zab, apiKey.zab) && Objects.equal(this.zac, apiKey.zac) && Objects.equal(this.zad, apiKey.zad);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final String zaa() {
|
||||
return this.zab.zad();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Application;
|
||||
import android.content.ComponentCallbacks2;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class BackgroundDetector implements Application.ActivityLifecycleCallbacks, ComponentCallbacks2 {
|
||||
private static final BackgroundDetector zza = new BackgroundDetector();
|
||||
private final AtomicBoolean zzb = new AtomicBoolean();
|
||||
private final AtomicBoolean zzc = new AtomicBoolean();
|
||||
private final ArrayList zzd = new ArrayList();
|
||||
private boolean zze = false;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface BackgroundStateChangeListener {
|
||||
@KeepForSdk
|
||||
void onBackgroundStateChanged(boolean z3);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
private BackgroundDetector() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static BackgroundDetector getInstance() {
|
||||
return zza;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static void initialize(Application application) {
|
||||
BackgroundDetector backgroundDetector = zza;
|
||||
synchronized (backgroundDetector) {
|
||||
try {
|
||||
if (!backgroundDetector.zze) {
|
||||
application.registerActivityLifecycleCallbacks(backgroundDetector);
|
||||
application.registerComponentCallbacks(backgroundDetector);
|
||||
backgroundDetector.zze = true;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void zza(boolean z3) {
|
||||
synchronized (zza) {
|
||||
try {
|
||||
Iterator it = this.zzd.iterator();
|
||||
while (it.hasNext()) {
|
||||
((BackgroundStateChangeListener) it.next()).onBackgroundStateChanged(z3);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void addListener(BackgroundStateChangeListener backgroundStateChangeListener) {
|
||||
synchronized (zza) {
|
||||
this.zzd.add(backgroundStateChangeListener);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean isInBackground() {
|
||||
return this.zzb.get();
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
boolean compareAndSet = this.zzb.compareAndSet(true, false);
|
||||
this.zzc.set(true);
|
||||
if (compareAndSet) {
|
||||
zza(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityDestroyed(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityPaused(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityResumed(Activity activity) {
|
||||
boolean compareAndSet = this.zzb.compareAndSet(true, false);
|
||||
this.zzc.set(true);
|
||||
if (compareAndSet) {
|
||||
zza(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityStarted(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityStopped(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks
|
||||
public final void onConfigurationChanged(Configuration configuration) {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks
|
||||
public final void onLowMemory() {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks2
|
||||
public final void onTrimMemory(int i) {
|
||||
if (i == 20 && this.zzb.compareAndSet(false, true)) {
|
||||
this.zzc.set(true);
|
||||
zza(true);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@TargetApi(16)
|
||||
public boolean readCurrentStateIfPossible(boolean z3) {
|
||||
if (!this.zzc.get()) {
|
||||
if (!PlatformVersion.isAtLeastJellyBean()) {
|
||||
return z3;
|
||||
}
|
||||
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
|
||||
ActivityManager.getMyMemoryState(runningAppProcessInfo);
|
||||
if (!this.zzc.getAndSet(true) && runningAppProcessInfo.importance > 100) {
|
||||
this.zzb.set(true);
|
||||
}
|
||||
}
|
||||
return isInBackground();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BasePendingResult;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class BaseImplementation {
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ResultHolder<R> {
|
||||
@KeepForSdk
|
||||
void setFailedResult(Status status);
|
||||
|
||||
@KeepForSdk
|
||||
void setResult(R r4);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class ApiMethodImpl<R extends Result, A extends Api.AnyClient> extends BasePendingResult<R> implements ResultHolder<R> {
|
||||
|
||||
@KeepForSdk
|
||||
private final Api<?> mApi;
|
||||
|
||||
@KeepForSdk
|
||||
private final Api.AnyClientKey<A> mClientKey;
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public ApiMethodImpl(Api.AnyClientKey<A> anyClientKey, GoogleApiClient googleApiClient) {
|
||||
super((GoogleApiClient) Preconditions.checkNotNull(googleApiClient, "GoogleApiClient must not be null"));
|
||||
this.mClientKey = (Api.AnyClientKey) Preconditions.checkNotNull(anyClientKey);
|
||||
this.mApi = null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
private void setFailedResult(RemoteException remoteException) {
|
||||
setFailedResult(new Status(8, remoteException.getLocalizedMessage(), (PendingIntent) null));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract void doExecute(A a2) throws RemoteException;
|
||||
|
||||
@KeepForSdk
|
||||
public final Api<?> getApi() {
|
||||
return this.mApi;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public final Api.AnyClientKey<A> getClientKey() {
|
||||
return this.mClientKey;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onSetFailedResult(R r4) {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public final void run(A a2) throws DeadObjectException {
|
||||
try {
|
||||
doExecute(a2);
|
||||
} catch (DeadObjectException e4) {
|
||||
setFailedResult(e4);
|
||||
throw e4;
|
||||
} catch (RemoteException e5) {
|
||||
setFailedResult(e5);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // com.google.android.gms.common.api.internal.BaseImplementation.ResultHolder
|
||||
@KeepForSdk
|
||||
public /* bridge */ /* synthetic */ void setResult(Object obj) {
|
||||
setResult((ApiMethodImpl<R, A>) obj);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ApiMethodImpl(Api<?> api, GoogleApiClient googleApiClient) {
|
||||
super((GoogleApiClient) Preconditions.checkNotNull(googleApiClient, "GoogleApiClient must not be null"));
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
this.mClientKey = api.zab();
|
||||
this.mApi = api;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BaseImplementation.ResultHolder
|
||||
@KeepForSdk
|
||||
public final void setFailedResult(Status status) {
|
||||
Preconditions.checkArgument(!status.isSuccess(), "Failed result must not be success");
|
||||
R createFailedResult = createFailedResult(status);
|
||||
setResult((ApiMethodImpl<R, A>) createFailedResult);
|
||||
onSetFailedResult(createFailedResult);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ApiMethodImpl(BasePendingResult.CallbackHandler<R> callbackHandler) {
|
||||
super(callbackHandler);
|
||||
this.mClientKey = new Api.AnyClientKey<>();
|
||||
this.mApi = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,426 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Releasable;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import com.google.android.gms.common.internal.ICancelToken;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@KeepForSdk
|
||||
@KeepName
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class BasePendingResult<R extends Result> extends PendingResult<R> {
|
||||
static final ThreadLocal zaa = new zaq();
|
||||
public static final /* synthetic */ int zad = 0;
|
||||
|
||||
@KeepName
|
||||
private zas mResultGuardian;
|
||||
protected final CallbackHandler zab;
|
||||
protected final WeakReference zac;
|
||||
private final Object zae;
|
||||
private final CountDownLatch zaf;
|
||||
private final ArrayList zag;
|
||||
private ResultCallback zah;
|
||||
private final AtomicReference zai;
|
||||
private Result zaj;
|
||||
private Status zak;
|
||||
private volatile boolean zal;
|
||||
private boolean zam;
|
||||
private boolean zan;
|
||||
private ICancelToken zao;
|
||||
private volatile zada zap;
|
||||
private boolean zaq;
|
||||
|
||||
@Deprecated
|
||||
public BasePendingResult() {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(Looper.getMainLooper());
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
|
||||
private final Result zaa() {
|
||||
Result result;
|
||||
synchronized (this.zae) {
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
result = this.zaj;
|
||||
this.zaj = null;
|
||||
this.zah = null;
|
||||
this.zal = true;
|
||||
}
|
||||
zadb zadbVar = (zadb) this.zai.getAndSet(null);
|
||||
if (zadbVar != null) {
|
||||
zadbVar.zaa.zab.remove(this);
|
||||
}
|
||||
return (Result) Preconditions.checkNotNull(result);
|
||||
}
|
||||
|
||||
private final void zab(Result result) {
|
||||
this.zaj = result;
|
||||
this.zak = result.getStatus();
|
||||
this.zao = null;
|
||||
this.zaf.countDown();
|
||||
if (this.zam) {
|
||||
this.zah = null;
|
||||
} else {
|
||||
ResultCallback resultCallback = this.zah;
|
||||
if (resultCallback != null) {
|
||||
this.zab.removeMessages(2);
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else if (this.zaj instanceof Releasable) {
|
||||
this.mResultGuardian = new zas(this, null);
|
||||
}
|
||||
}
|
||||
ArrayList arrayList = this.zag;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
((PendingResult.StatusListener) arrayList.get(i)).onComplete(this.zak);
|
||||
}
|
||||
this.zag.clear();
|
||||
}
|
||||
|
||||
public static void zal(Result result) {
|
||||
if (result instanceof Releasable) {
|
||||
try {
|
||||
((Releasable) result).release();
|
||||
} catch (RuntimeException e4) {
|
||||
Log.w("BasePendingResult", "Unable to release ".concat(String.valueOf(result)), e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
Preconditions.checkArgument(statusListener != null, "Callback cannot be null.");
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (isReady()) {
|
||||
statusListener.onComplete(this.zak);
|
||||
} else {
|
||||
this.zag.add(statusListener);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await() {
|
||||
Preconditions.checkNotMainThread("await must not be called on the UI thread");
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed");
|
||||
Preconditions.checkState(this.zap == null, "Cannot await if then() has been called.");
|
||||
try {
|
||||
this.zaf.await();
|
||||
} catch (InterruptedException unused) {
|
||||
forceFailureUnlessReady(Status.RESULT_INTERRUPTED);
|
||||
}
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
return (R) zaa();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@KeepForSdk
|
||||
public void cancel() {
|
||||
synchronized (this.zae) {
|
||||
if (!this.zam && !this.zal) {
|
||||
ICancelToken iCancelToken = this.zao;
|
||||
if (iCancelToken != null) {
|
||||
try {
|
||||
iCancelToken.cancel();
|
||||
} catch (RemoteException unused) {
|
||||
}
|
||||
}
|
||||
zal(this.zaj);
|
||||
this.zam = true;
|
||||
zab(createFailedResult(Status.RESULT_CANCELED));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract R createFailedResult(Status status);
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public final void forceFailureUnlessReady(Status status) {
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (!isReady()) {
|
||||
setResult(createFailedResult(status));
|
||||
this.zan = true;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
boolean z3;
|
||||
synchronized (this.zae) {
|
||||
z3 = this.zam;
|
||||
}
|
||||
return z3;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public final boolean isReady() {
|
||||
return this.zaf.getCount() == 0;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public final void setCancelToken(ICancelToken iCancelToken) {
|
||||
synchronized (this.zae) {
|
||||
this.zao = iCancelToken;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public final void setResult(R r4) {
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (this.zan || this.zam) {
|
||||
zal(r4);
|
||||
return;
|
||||
}
|
||||
isReady();
|
||||
Preconditions.checkState(!isReady(), "Results have already been set");
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed");
|
||||
zab(r4);
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@KeepForSdk
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback) {
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (resultCallback == null) {
|
||||
this.zah = null;
|
||||
return;
|
||||
}
|
||||
boolean z3 = true;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
if (this.zap != null) {
|
||||
z3 = false;
|
||||
}
|
||||
Preconditions.checkState(z3, "Cannot set callbacks if then() has been called.");
|
||||
if (isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (isReady()) {
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else {
|
||||
this.zah = resultCallback;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform) {
|
||||
TransformedResult<S> then;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
Preconditions.checkState(this.zap == null, "Cannot call then() twice.");
|
||||
Preconditions.checkState(this.zah == null, "Cannot call then() if callbacks are set.");
|
||||
Preconditions.checkState(!this.zam, "Cannot call then() if result was canceled.");
|
||||
this.zaq = true;
|
||||
this.zap = new zada(this.zac);
|
||||
then = this.zap.then(resultTransform);
|
||||
if (isReady()) {
|
||||
this.zab.zaa(this.zap, zaa());
|
||||
} else {
|
||||
this.zah = this.zap;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return then;
|
||||
}
|
||||
|
||||
public final void zak() {
|
||||
boolean z3 = true;
|
||||
if (!this.zaq && !((Boolean) zaa.get()).booleanValue()) {
|
||||
z3 = false;
|
||||
}
|
||||
this.zaq = z3;
|
||||
}
|
||||
|
||||
public final boolean zam() {
|
||||
boolean isCanceled;
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (((GoogleApiClient) this.zac.get()) != null) {
|
||||
if (!this.zaq) {
|
||||
}
|
||||
isCanceled = isCanceled();
|
||||
}
|
||||
cancel();
|
||||
isCanceled = isCanceled();
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return isCanceled;
|
||||
}
|
||||
|
||||
public final void zan(zadb zadbVar) {
|
||||
this.zai.set(zadbVar);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
/* loaded from: classes3.dex */
|
||||
public static class CallbackHandler<R extends Result> extends com.google.android.gms.internal.base.zau {
|
||||
public CallbackHandler() {
|
||||
super(Looper.getMainLooper());
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i != 1) {
|
||||
if (i == 2) {
|
||||
((BasePendingResult) message.obj).forceFailureUnlessReady(Status.RESULT_TIMEOUT);
|
||||
return;
|
||||
}
|
||||
Log.wtf("BasePendingResult", "Don't know how to handle message: " + i, new Exception());
|
||||
return;
|
||||
}
|
||||
Pair pair = (Pair) message.obj;
|
||||
ResultCallback resultCallback = (ResultCallback) pair.first;
|
||||
Result result = (Result) pair.second;
|
||||
try {
|
||||
resultCallback.onResult(result);
|
||||
} catch (RuntimeException e4) {
|
||||
BasePendingResult.zal(result);
|
||||
throw e4;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaa(ResultCallback resultCallback, Result result) {
|
||||
int i = BasePendingResult.zad;
|
||||
sendMessage(obtainMessage(1, new Pair((ResultCallback) Preconditions.checkNotNull(resultCallback), result)));
|
||||
}
|
||||
|
||||
public CallbackHandler(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public BasePendingResult(Looper looper) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(looper);
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await(long j4, TimeUnit timeUnit) {
|
||||
if (j4 > 0) {
|
||||
Preconditions.checkNotMainThread("await must not be called on the UI thread when time is greater than zero.");
|
||||
}
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
Preconditions.checkState(this.zap == null, "Cannot await if then() has been called.");
|
||||
try {
|
||||
if (!this.zaf.await(j4, timeUnit)) {
|
||||
forceFailureUnlessReady(Status.RESULT_TIMEOUT);
|
||||
}
|
||||
} catch (InterruptedException unused) {
|
||||
forceFailureUnlessReady(Status.RESULT_INTERRUPTED);
|
||||
}
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
return (R) zaa();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@KeepForSdk
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback, long j4, TimeUnit timeUnit) {
|
||||
synchronized (this.zae) {
|
||||
try {
|
||||
if (resultCallback == null) {
|
||||
this.zah = null;
|
||||
return;
|
||||
}
|
||||
boolean z3 = true;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
if (this.zap != null) {
|
||||
z3 = false;
|
||||
}
|
||||
Preconditions.checkState(z3, "Cannot set callbacks if then() has been called.");
|
||||
if (isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (isReady()) {
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else {
|
||||
this.zah = resultCallback;
|
||||
CallbackHandler callbackHandler = this.zab;
|
||||
callbackHandler.sendMessageDelayed(callbackHandler.obtainMessage(2, this), timeUnit.toMillis(j4));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public BasePendingResult(GoogleApiClient googleApiClient) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(googleApiClient != null ? googleApiClient.getLooper() : Looper.getMainLooper());
|
||||
this.zac = new WeakReference(googleApiClient);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public BasePendingResult(CallbackHandler<R> callbackHandler) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = (CallbackHandler) Preconditions.checkNotNull(callbackHandler, "CallbackHandler must not be null");
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ConnectionCallbacks {
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
void onConnected(Bundle bundle);
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
void onConnectionSuspended(int i);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class DataHolderNotifier<L> implements ListenerHolder.Notifier<L> {
|
||||
private final DataHolder zaa;
|
||||
|
||||
@KeepForSdk
|
||||
public DataHolderNotifier(DataHolder dataHolder) {
|
||||
this.zaa = dataHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ListenerHolder.Notifier
|
||||
@KeepForSdk
|
||||
public final void notifyListener(L l4) {
|
||||
notifyListener(l4, this.zaa);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract void notifyListener(L l4, DataHolder dataHolder);
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ListenerHolder.Notifier
|
||||
@KeepForSdk
|
||||
public void onNotifyListenerFailed() {
|
||||
DataHolder dataHolder = this.zaa;
|
||||
if (dataHolder != null) {
|
||||
dataHolder.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Releasable;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class DataHolderResult implements Result, Releasable {
|
||||
|
||||
@KeepForSdk
|
||||
protected final DataHolder mDataHolder;
|
||||
|
||||
@KeepForSdk
|
||||
protected final Status mStatus;
|
||||
|
||||
@KeepForSdk
|
||||
public DataHolderResult(DataHolder dataHolder, Status status) {
|
||||
this.mStatus = status;
|
||||
this.mDataHolder = dataHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
@KeepForSdk
|
||||
public Status getStatus() {
|
||||
return this.mStatus;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Releasable
|
||||
@KeepForSdk
|
||||
public void release() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
if (dataHolder != null) {
|
||||
dataHolder.close();
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public DataHolderResult(DataHolder dataHolder) {
|
||||
this(dataHolder, new Status(dataHolder.getStatusCode()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,476 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import C.w;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
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.GoogleApi;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.GmsClientSupervisor;
|
||||
import com.google.android.gms.common.internal.MethodInvocation;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfigManager;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfiguration;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
import com.google.android.gms.common.internal.TelemetryData;
|
||||
import com.google.android.gms.common.internal.TelemetryLogging;
|
||||
import com.google.android.gms.common.internal.TelemetryLoggingClient;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
import s.f;
|
||||
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class GoogleApiManager implements Handler.Callback {
|
||||
public static final Status zaa = new Status(4, "Sign-out occurred while this API call was in progress.");
|
||||
private static final Status zab = new Status(4, "The user must be signed in to make this API call.");
|
||||
private static final Object zac = new Object();
|
||||
private static GoogleApiManager zad;
|
||||
private TelemetryData zai;
|
||||
private TelemetryLoggingClient zaj;
|
||||
private final Context zak;
|
||||
private final GoogleApiAvailability zal;
|
||||
private final com.google.android.gms.common.internal.zal zam;
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final Handler zat;
|
||||
private volatile boolean zau;
|
||||
private long zae = 5000;
|
||||
private long zaf = 120000;
|
||||
private long zag = 10000;
|
||||
private boolean zah = false;
|
||||
private final AtomicInteger zan = new AtomicInteger(1);
|
||||
private final AtomicInteger zao = new AtomicInteger(0);
|
||||
private final Map zap = new ConcurrentHashMap(5, 0.75f, 1);
|
||||
private zaae zaq = null;
|
||||
private final Set zar = new f(0);
|
||||
private final Set zas = new f(0);
|
||||
|
||||
@KeepForSdk
|
||||
private GoogleApiManager(Context context, Looper looper, GoogleApiAvailability googleApiAvailability) {
|
||||
this.zau = true;
|
||||
this.zak = context;
|
||||
com.google.android.gms.internal.base.zau zauVar = new com.google.android.gms.internal.base.zau(looper, this);
|
||||
this.zat = zauVar;
|
||||
this.zal = googleApiAvailability;
|
||||
this.zam = new com.google.android.gms.common.internal.zal(googleApiAvailability);
|
||||
if (DeviceProperties.isAuto(context)) {
|
||||
this.zau = false;
|
||||
}
|
||||
zauVar.sendMessage(zauVar.obtainMessage(6));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static void reportSignOut() {
|
||||
synchronized (zac) {
|
||||
try {
|
||||
GoogleApiManager googleApiManager = zad;
|
||||
if (googleApiManager != null) {
|
||||
googleApiManager.zao.incrementAndGet();
|
||||
Handler handler = googleApiManager.zat;
|
||||
handler.sendMessageAtFrontOfQueue(handler.obtainMessage(10));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static Status zaH(ApiKey apiKey, ConnectionResult connectionResult) {
|
||||
return new Status(connectionResult, "API: " + apiKey.zaa() + " is not available on this device. Connection failed with: " + String.valueOf(connectionResult));
|
||||
}
|
||||
|
||||
private final zabq zaI(GoogleApi googleApi) {
|
||||
ApiKey apiKey = googleApi.getApiKey();
|
||||
zabq zabqVar = (zabq) this.zap.get(apiKey);
|
||||
if (zabqVar == null) {
|
||||
zabqVar = new zabq(this, googleApi);
|
||||
this.zap.put(apiKey, zabqVar);
|
||||
}
|
||||
if (zabqVar.zaz()) {
|
||||
this.zas.add(apiKey);
|
||||
}
|
||||
zabqVar.zao();
|
||||
return zabqVar;
|
||||
}
|
||||
|
||||
private final TelemetryLoggingClient zaJ() {
|
||||
if (this.zaj == null) {
|
||||
this.zaj = TelemetryLogging.getClient(this.zak);
|
||||
}
|
||||
return this.zaj;
|
||||
}
|
||||
|
||||
private final void zaK() {
|
||||
TelemetryData telemetryData = this.zai;
|
||||
if (telemetryData != null) {
|
||||
if (telemetryData.zaa() > 0 || zaF()) {
|
||||
zaJ().log(telemetryData);
|
||||
}
|
||||
this.zai = null;
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaL(TaskCompletionSource taskCompletionSource, int i, GoogleApi googleApi) {
|
||||
zacd zaa2;
|
||||
if (i == 0 || (zaa2 = zacd.zaa(this, i, googleApi.getApiKey())) == null) {
|
||||
return;
|
||||
}
|
||||
Task task = taskCompletionSource.getTask();
|
||||
final Handler handler = this.zat;
|
||||
handler.getClass();
|
||||
task.addOnCompleteListener(new Executor() { // from class: com.google.android.gms.common.api.internal.zabk
|
||||
@Override // java.util.concurrent.Executor
|
||||
public final void execute(Runnable runnable) {
|
||||
handler.post(runnable);
|
||||
}
|
||||
}, zaa2);
|
||||
}
|
||||
|
||||
public static GoogleApiManager zal() {
|
||||
GoogleApiManager googleApiManager;
|
||||
synchronized (zac) {
|
||||
Preconditions.checkNotNull(zad, "Must guarantee manager is non-null before using getInstance");
|
||||
googleApiManager = zad;
|
||||
}
|
||||
return googleApiManager;
|
||||
}
|
||||
|
||||
public static GoogleApiManager zam(Context context) {
|
||||
GoogleApiManager googleApiManager;
|
||||
synchronized (zac) {
|
||||
try {
|
||||
if (zad == null) {
|
||||
zad = new GoogleApiManager(context.getApplicationContext(), GmsClientSupervisor.getOrStartHandlerThread().getLooper(), GoogleApiAvailability.getInstance());
|
||||
}
|
||||
googleApiManager = zad;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return googleApiManager;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler.Callback
|
||||
public final boolean handleMessage(Message message) {
|
||||
ApiKey apiKey;
|
||||
ApiKey apiKey2;
|
||||
ApiKey apiKey3;
|
||||
ApiKey apiKey4;
|
||||
int i = message.what;
|
||||
zabq zabqVar = null;
|
||||
switch (i) {
|
||||
case 1:
|
||||
this.zag = true == ((Boolean) message.obj).booleanValue() ? 10000L : 300000L;
|
||||
this.zat.removeMessages(12);
|
||||
for (ApiKey apiKey5 : this.zap.keySet()) {
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessageDelayed(handler.obtainMessage(12, apiKey5), this.zag);
|
||||
}
|
||||
return true;
|
||||
case 2:
|
||||
zal zalVar = (zal) message.obj;
|
||||
Iterator it = zalVar.zab().iterator();
|
||||
while (true) {
|
||||
if (it.hasNext()) {
|
||||
ApiKey apiKey6 = (ApiKey) it.next();
|
||||
zabq zabqVar2 = (zabq) this.zap.get(apiKey6);
|
||||
if (zabqVar2 == null) {
|
||||
zalVar.zac(apiKey6, new ConnectionResult(13), null);
|
||||
} else if (zabqVar2.zay()) {
|
||||
zalVar.zac(apiKey6, ConnectionResult.RESULT_SUCCESS, zabqVar2.zaf().getEndpointPackageName());
|
||||
} else {
|
||||
ConnectionResult zad2 = zabqVar2.zad();
|
||||
if (zad2 != null) {
|
||||
zalVar.zac(apiKey6, zad2, null);
|
||||
} else {
|
||||
zabqVar2.zat(zalVar);
|
||||
zabqVar2.zao();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 3:
|
||||
for (zabq zabqVar3 : this.zap.values()) {
|
||||
zabqVar3.zan();
|
||||
zabqVar3.zao();
|
||||
}
|
||||
return true;
|
||||
case 4:
|
||||
case 8:
|
||||
case 13:
|
||||
zach zachVar = (zach) message.obj;
|
||||
zabq zabqVar4 = (zabq) this.zap.get(zachVar.zac.getApiKey());
|
||||
if (zabqVar4 == null) {
|
||||
zabqVar4 = zaI(zachVar.zac);
|
||||
}
|
||||
if (!zabqVar4.zaz() || this.zao.get() == zachVar.zab) {
|
||||
zabqVar4.zap(zachVar.zaa);
|
||||
} else {
|
||||
zachVar.zaa.zad(zaa);
|
||||
zabqVar4.zav();
|
||||
}
|
||||
return true;
|
||||
case 5:
|
||||
int i4 = message.arg1;
|
||||
ConnectionResult connectionResult = (ConnectionResult) message.obj;
|
||||
Iterator it2 = this.zap.values().iterator();
|
||||
while (true) {
|
||||
if (it2.hasNext()) {
|
||||
zabq zabqVar5 = (zabq) it2.next();
|
||||
if (zabqVar5.zab() == i4) {
|
||||
zabqVar = zabqVar5;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (zabqVar == null) {
|
||||
Log.wtf("GoogleApiManager", w.t(i4, "Could not find API instance ", " while trying to fail enqueued calls.").toString(), new Exception());
|
||||
} else if (connectionResult.getErrorCode() == 13) {
|
||||
zabq.zai(zabqVar, new Status(17, "Error resolution was canceled by the user, original error message: " + this.zal.getErrorString(connectionResult.getErrorCode()) + ": " + connectionResult.getErrorMessage()));
|
||||
} else {
|
||||
zabq.zai(zabqVar, zaH(zabq.zag(zabqVar), connectionResult));
|
||||
}
|
||||
return true;
|
||||
case 6:
|
||||
if (this.zak.getApplicationContext() instanceof Application) {
|
||||
BackgroundDetector.initialize((Application) this.zak.getApplicationContext());
|
||||
BackgroundDetector.getInstance().addListener(new zabl(this));
|
||||
if (!BackgroundDetector.getInstance().readCurrentStateIfPossible(true)) {
|
||||
this.zag = 300000L;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 7:
|
||||
zaI((GoogleApi) message.obj);
|
||||
return true;
|
||||
case 9:
|
||||
if (this.zap.containsKey(message.obj)) {
|
||||
((zabq) this.zap.get(message.obj)).zau();
|
||||
}
|
||||
return true;
|
||||
case 10:
|
||||
Iterator it3 = this.zas.iterator();
|
||||
while (it3.hasNext()) {
|
||||
zabq zabqVar6 = (zabq) this.zap.remove((ApiKey) it3.next());
|
||||
if (zabqVar6 != null) {
|
||||
zabqVar6.zav();
|
||||
}
|
||||
}
|
||||
this.zas.clear();
|
||||
return true;
|
||||
case 11:
|
||||
if (this.zap.containsKey(message.obj)) {
|
||||
((zabq) this.zap.get(message.obj)).zaw();
|
||||
}
|
||||
return true;
|
||||
case 12:
|
||||
if (this.zap.containsKey(message.obj)) {
|
||||
((zabq) this.zap.get(message.obj)).zaA();
|
||||
}
|
||||
return true;
|
||||
case 14:
|
||||
zaaf zaafVar = (zaaf) message.obj;
|
||||
ApiKey zaa2 = zaafVar.zaa();
|
||||
if (this.zap.containsKey(zaa2)) {
|
||||
zaafVar.zab().setResult(Boolean.valueOf(zabq.zax((zabq) this.zap.get(zaa2), false)));
|
||||
} else {
|
||||
zaafVar.zab().setResult(Boolean.FALSE);
|
||||
}
|
||||
return true;
|
||||
case 15:
|
||||
zabs zabsVar = (zabs) message.obj;
|
||||
Map map = this.zap;
|
||||
apiKey = zabsVar.zaa;
|
||||
if (map.containsKey(apiKey)) {
|
||||
Map map2 = this.zap;
|
||||
apiKey2 = zabsVar.zaa;
|
||||
zabq.zal((zabq) map2.get(apiKey2), zabsVar);
|
||||
}
|
||||
return true;
|
||||
case 16:
|
||||
zabs zabsVar2 = (zabs) message.obj;
|
||||
Map map3 = this.zap;
|
||||
apiKey3 = zabsVar2.zaa;
|
||||
if (map3.containsKey(apiKey3)) {
|
||||
Map map4 = this.zap;
|
||||
apiKey4 = zabsVar2.zaa;
|
||||
zabq.zam((zabq) map4.get(apiKey4), zabsVar2);
|
||||
}
|
||||
return true;
|
||||
case 17:
|
||||
zaK();
|
||||
return true;
|
||||
case 18:
|
||||
zace zaceVar = (zace) message.obj;
|
||||
if (zaceVar.zac == 0) {
|
||||
zaJ().log(new TelemetryData(zaceVar.zab, Arrays.asList(zaceVar.zaa)));
|
||||
} else {
|
||||
TelemetryData telemetryData = this.zai;
|
||||
if (telemetryData != null) {
|
||||
List zab2 = telemetryData.zab();
|
||||
if (telemetryData.zaa() != zaceVar.zab || (zab2 != null && zab2.size() >= zaceVar.zad)) {
|
||||
this.zat.removeMessages(17);
|
||||
zaK();
|
||||
} else {
|
||||
this.zai.zac(zaceVar.zaa);
|
||||
}
|
||||
}
|
||||
if (this.zai == null) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.add(zaceVar.zaa);
|
||||
this.zai = new TelemetryData(zaceVar.zab, arrayList);
|
||||
Handler handler2 = this.zat;
|
||||
handler2.sendMessageDelayed(handler2.obtainMessage(17), zaceVar.zac);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 19:
|
||||
this.zah = false;
|
||||
return true;
|
||||
default:
|
||||
Log.w("GoogleApiManager", "Unknown message id: " + i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaA() {
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(3));
|
||||
}
|
||||
|
||||
public final void zaB(GoogleApi googleApi) {
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(7, googleApi));
|
||||
}
|
||||
|
||||
public final void zaC(zaae zaaeVar) {
|
||||
synchronized (zac) {
|
||||
try {
|
||||
if (this.zaq != zaaeVar) {
|
||||
this.zaq = zaaeVar;
|
||||
this.zar.clear();
|
||||
}
|
||||
this.zar.addAll(zaaeVar.zaa());
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaD(zaae zaaeVar) {
|
||||
synchronized (zac) {
|
||||
try {
|
||||
if (this.zaq == zaaeVar) {
|
||||
this.zaq = null;
|
||||
this.zar.clear();
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean zaF() {
|
||||
if (this.zah) {
|
||||
return false;
|
||||
}
|
||||
RootTelemetryConfiguration config = RootTelemetryConfigManager.getInstance().getConfig();
|
||||
if (config != null && !config.getMethodInvocationTelemetryEnabled()) {
|
||||
return false;
|
||||
}
|
||||
int zaa2 = this.zam.zaa(this.zak, 203400000);
|
||||
return zaa2 == -1 || zaa2 == 0;
|
||||
}
|
||||
|
||||
public final boolean zaG(ConnectionResult connectionResult, int i) {
|
||||
return this.zal.zah(this.zak, connectionResult, i);
|
||||
}
|
||||
|
||||
public final int zaa() {
|
||||
return this.zan.getAndIncrement();
|
||||
}
|
||||
|
||||
public final zabq zak(ApiKey apiKey) {
|
||||
return (zabq) this.zap.get(apiKey);
|
||||
}
|
||||
|
||||
public final Task zao(Iterable iterable) {
|
||||
zal zalVar = new zal(iterable);
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(2, zalVar));
|
||||
return zalVar.zaa();
|
||||
}
|
||||
|
||||
public final Task zap(GoogleApi googleApi) {
|
||||
zaaf zaafVar = new zaaf(googleApi.getApiKey());
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(14, zaafVar));
|
||||
return zaafVar.zab().getTask();
|
||||
}
|
||||
|
||||
public final Task zaq(GoogleApi googleApi, RegisterListenerMethod registerListenerMethod, UnregisterListenerMethod unregisterListenerMethod, Runnable runnable) {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
zaL(taskCompletionSource, registerListenerMethod.zaa(), googleApi);
|
||||
zaf zafVar = new zaf(new zaci(registerListenerMethod, unregisterListenerMethod, runnable), taskCompletionSource);
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(8, new zach(zafVar, this.zao.get(), googleApi)));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
public final Task zar(GoogleApi googleApi, ListenerHolder.ListenerKey listenerKey, int i) {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
zaL(taskCompletionSource, i, googleApi);
|
||||
zah zahVar = new zah(listenerKey, taskCompletionSource);
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(13, new zach(zahVar, this.zao.get(), googleApi)));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
public final void zaw(GoogleApi googleApi, int i, BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
zae zaeVar = new zae(i, apiMethodImpl);
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(4, new zach(zaeVar, this.zao.get(), googleApi)));
|
||||
}
|
||||
|
||||
public final void zax(GoogleApi googleApi, int i, TaskApiCall taskApiCall, TaskCompletionSource taskCompletionSource, StatusExceptionMapper statusExceptionMapper) {
|
||||
zaL(taskCompletionSource, taskApiCall.zaa(), googleApi);
|
||||
zag zagVar = new zag(i, taskApiCall, taskCompletionSource, statusExceptionMapper);
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(4, new zach(zagVar, this.zao.get(), googleApi)));
|
||||
}
|
||||
|
||||
public final void zay(MethodInvocation methodInvocation, int i, long j4, int i4) {
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(18, new zace(methodInvocation, i, j4, i4)));
|
||||
}
|
||||
|
||||
public final void zaz(ConnectionResult connectionResult, int i) {
|
||||
if (zaG(connectionResult, i)) {
|
||||
return;
|
||||
}
|
||||
Handler handler = this.zat;
|
||||
handler.sendMessage(handler.obtainMessage(5, i, 0, connectionResult));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import C.w;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.R;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.StringResourceValueReader;
|
||||
import com.google.android.gms.common.internal.zzag;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
/* loaded from: classes3.dex */
|
||||
public final class GoogleServices {
|
||||
private static final Object zza = new Object();
|
||||
private static GoogleServices zzb;
|
||||
private final String zzc;
|
||||
private final Status zzd;
|
||||
private final boolean zze;
|
||||
private final boolean zzf;
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public GoogleServices(String str, boolean z3) {
|
||||
this.zzc = str;
|
||||
this.zzd = Status.RESULT_SUCCESS;
|
||||
this.zze = z3;
|
||||
this.zzf = !z3;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
private static GoogleServices checkInitialized(String str) {
|
||||
GoogleServices googleServices;
|
||||
synchronized (zza) {
|
||||
try {
|
||||
googleServices = zzb;
|
||||
if (googleServices == null) {
|
||||
throw new IllegalStateException("Initialize must be called before " + str + ".");
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return googleServices;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public static void clearInstanceForTest() {
|
||||
synchronized (zza) {
|
||||
zzb = null;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static String getGoogleAppId() {
|
||||
return checkInitialized("getGoogleAppId").zzc;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Status initialize(Context context) {
|
||||
Status status;
|
||||
Preconditions.checkNotNull(context, "Context must not be null.");
|
||||
synchronized (zza) {
|
||||
try {
|
||||
if (zzb == null) {
|
||||
zzb = new GoogleServices(context);
|
||||
}
|
||||
status = zzb.zzd;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static boolean isMeasurementEnabled() {
|
||||
GoogleServices checkInitialized = checkInitialized("isMeasurementEnabled");
|
||||
return checkInitialized.zzd.isSuccess() && checkInitialized.zze;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static boolean isMeasurementExplicitlyDisabled() {
|
||||
return checkInitialized("isMeasurementExplicitlyDisabled").zzf;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public Status checkGoogleAppId(String str) {
|
||||
String str2 = this.zzc;
|
||||
return (str2 == null || str2.equals(str)) ? Status.RESULT_SUCCESS : new Status(10, w.o("Initialize was called with two different Google App IDs. Only the first app ID will be used: '", this.zzc, "'."));
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@KeepForSdk
|
||||
public GoogleServices(Context context) {
|
||||
Resources resources = context.getResources();
|
||||
int identifier = resources.getIdentifier("google_app_measurement_enable", "integer", resources.getResourcePackageName(R.string.common_google_play_services_unknown_issue));
|
||||
if (identifier != 0) {
|
||||
int integer = resources.getInteger(identifier);
|
||||
boolean z3 = integer == 0;
|
||||
r2 = integer != 0;
|
||||
this.zzf = z3;
|
||||
} else {
|
||||
this.zzf = false;
|
||||
}
|
||||
this.zze = r2;
|
||||
String zzb2 = zzag.zzb(context);
|
||||
zzb2 = zzb2 == null ? new StringResourceValueReader(context).getString("google_app_id") : zzb2;
|
||||
if (TextUtils.isEmpty(zzb2)) {
|
||||
this.zzd = new Status(10, "Missing google app id value from from string resources with name google_app_id.");
|
||||
this.zzc = null;
|
||||
} else {
|
||||
this.zzc = zzb2;
|
||||
this.zzd = Status.RESULT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static Status initialize(Context context, String str, boolean z3) {
|
||||
Preconditions.checkNotNull(context, "Context must not be null.");
|
||||
Preconditions.checkNotEmpty(str, "App ID must be nonempty.");
|
||||
synchronized (zza) {
|
||||
try {
|
||||
GoogleServices googleServices = zzb;
|
||||
if (googleServices != null) {
|
||||
return googleServices.checkGoogleAppId(str);
|
||||
}
|
||||
GoogleServices googleServices2 = new GoogleServices(str, z3);
|
||||
zzb = googleServices2;
|
||||
return googleServices2.zzd;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface IStatusCallback extends IInterface {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Stub extends com.google.android.gms.internal.base.zab implements IStatusCallback {
|
||||
public Stub() {
|
||||
super("com.google.android.gms.common.api.internal.IStatusCallback");
|
||||
}
|
||||
|
||||
public static IStatusCallback asInterface(IBinder iBinder) {
|
||||
if (iBinder == null) {
|
||||
return null;
|
||||
}
|
||||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.api.internal.IStatusCallback");
|
||||
return queryLocalInterface instanceof IStatusCallback ? (IStatusCallback) queryLocalInterface : new zaby(iBinder);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.internal.base.zab
|
||||
public final boolean zaa(int i, Parcel parcel, Parcel parcel2, int i4) throws RemoteException {
|
||||
if (i != 1) {
|
||||
return false;
|
||||
}
|
||||
Status status = (Status) com.google.android.gms.internal.base.zac.zaa(parcel, Status.CREATOR);
|
||||
com.google.android.gms.internal.base.zac.zab(parcel);
|
||||
onResult(status);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void onResult(Status status) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContextWrapper;
|
||||
import androidx.fragment.app.P;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class LifecycleActivity {
|
||||
private final Object zza;
|
||||
|
||||
public LifecycleActivity(Activity activity) {
|
||||
Preconditions.checkNotNull(activity, "Activity must not be null");
|
||||
this.zza = activity;
|
||||
}
|
||||
|
||||
public final Activity zza() {
|
||||
return (Activity) this.zza;
|
||||
}
|
||||
|
||||
public final P zzb() {
|
||||
return (P) this.zza;
|
||||
}
|
||||
|
||||
public final boolean zzc() {
|
||||
return this.zza instanceof Activity;
|
||||
}
|
||||
|
||||
public final boolean zzd() {
|
||||
return this.zza instanceof P;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public LifecycleActivity(ContextWrapper contextWrapper) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContextWrapper;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Keep;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class LifecycleCallback {
|
||||
|
||||
@KeepForSdk
|
||||
protected final LifecycleFragment mLifecycleFragment;
|
||||
|
||||
@KeepForSdk
|
||||
public LifecycleCallback(LifecycleFragment lifecycleFragment) {
|
||||
this.mLifecycleFragment = lifecycleFragment;
|
||||
}
|
||||
|
||||
@Keep
|
||||
private static LifecycleFragment getChimeraLifecycleFragmentImpl(LifecycleActivity lifecycleActivity) {
|
||||
throw new IllegalStateException("Method not available in SDK.");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static LifecycleFragment getFragment(Activity activity) {
|
||||
return getFragment(new LifecycleActivity(activity));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Activity getActivity() {
|
||||
Activity lifecycleActivity = this.mLifecycleFragment.getLifecycleActivity();
|
||||
Preconditions.checkNotNull(lifecycleActivity);
|
||||
return lifecycleActivity;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onActivityResult(int i, int i4, Intent intent) {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onCreate(Bundle bundle) {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onDestroy() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onResume() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onSaveInstanceState(Bundle bundle) {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onStart() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void onStop() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static LifecycleFragment getFragment(ContextWrapper contextWrapper) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static LifecycleFragment getFragment(LifecycleActivity lifecycleActivity) {
|
||||
if (lifecycleActivity.zzd()) {
|
||||
return zzd.zzc(lifecycleActivity.zzb());
|
||||
}
|
||||
if (lifecycleActivity.zzc()) {
|
||||
return zzb.zzc(lifecycleActivity.zza());
|
||||
}
|
||||
throw new IllegalArgumentException("Can't get fragment for unexpected activity.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface LifecycleFragment {
|
||||
@KeepForSdk
|
||||
void addCallback(String str, LifecycleCallback lifecycleCallback);
|
||||
|
||||
@KeepForSdk
|
||||
<T extends LifecycleCallback> T getCallbackOrNull(String str, Class<T> cls);
|
||||
|
||||
@KeepForSdk
|
||||
Activity getLifecycleActivity();
|
||||
|
||||
@KeepForSdk
|
||||
boolean isCreated();
|
||||
|
||||
@KeepForSdk
|
||||
boolean isStarted();
|
||||
|
||||
@KeepForSdk
|
||||
void startActivityForResult(Intent intent, int i);
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.concurrent.HandlerExecutor;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class ListenerHolder<L> {
|
||||
private final Executor zaa;
|
||||
private volatile Object zab;
|
||||
private volatile ListenerKey zac;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ListenerKey<L> {
|
||||
private final Object zaa;
|
||||
private final String zab;
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerKey(L l4, String str) {
|
||||
this.zaa = l4;
|
||||
this.zab = str;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ListenerKey)) {
|
||||
return false;
|
||||
}
|
||||
ListenerKey listenerKey = (ListenerKey) obj;
|
||||
return this.zaa == listenerKey.zaa && this.zab.equals(listenerKey.zab);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public int hashCode() {
|
||||
return this.zab.hashCode() + (System.identityHashCode(this.zaa) * 31);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public String toIdString() {
|
||||
return this.zab + "@" + System.identityHashCode(this.zaa);
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Notifier<L> {
|
||||
@KeepForSdk
|
||||
void notifyListener(L l4);
|
||||
|
||||
@KeepForSdk
|
||||
void onNotifyListenerFailed();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerHolder(Looper looper, L l4, String str) {
|
||||
this.zaa = new HandlerExecutor(looper);
|
||||
this.zab = Preconditions.checkNotNull(l4, "Listener must not be null");
|
||||
this.zac = new ListenerKey(l4, Preconditions.checkNotEmpty(str));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void clear() {
|
||||
this.zab = null;
|
||||
this.zac = null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerKey<L> getListenerKey() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public boolean hasListener() {
|
||||
return this.zab != null;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void notifyListener(final Notifier<? super L> notifier) {
|
||||
Preconditions.checkNotNull(notifier, "Notifier must not be null");
|
||||
this.zaa.execute(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacb
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
ListenerHolder.this.zaa(notifier);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final void zaa(Notifier notifier) {
|
||||
Object obj = this.zab;
|
||||
if (obj == null) {
|
||||
notifier.onNotifyListenerFailed();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
notifier.notifyListener(obj);
|
||||
} catch (RuntimeException e4) {
|
||||
notifier.onNotifyListenerFailed();
|
||||
throw e4;
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerHolder(Executor executor, L l4, String str) {
|
||||
this.zaa = (Executor) Preconditions.checkNotNull(executor, "Executor must not be null");
|
||||
this.zab = Preconditions.checkNotNull(l4, "Listener must not be null");
|
||||
this.zac = new ListenerKey(l4, Preconditions.checkNotEmpty(str));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class ListenerHolders {
|
||||
private final Set zaa = Collections.newSetFromMap(new WeakHashMap());
|
||||
|
||||
@KeepForSdk
|
||||
public static <L> ListenerHolder<L> createListenerHolder(L l4, Looper looper, String str) {
|
||||
Preconditions.checkNotNull(l4, "Listener must not be null");
|
||||
Preconditions.checkNotNull(looper, "Looper must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
return new ListenerHolder<>(looper, l4, str);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <L> ListenerHolder.ListenerKey<L> createListenerKey(L l4, String str) {
|
||||
Preconditions.checkNotNull(l4, "Listener must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
Preconditions.checkNotEmpty(str, "Listener type must not be empty");
|
||||
return new ListenerHolder.ListenerKey<>(l4, str);
|
||||
}
|
||||
|
||||
public final ListenerHolder zaa(Object obj, Looper looper, String str) {
|
||||
ListenerHolder createListenerHolder = createListenerHolder(obj, looper, "NO_TYPE");
|
||||
this.zaa.add(createListenerHolder);
|
||||
return createListenerHolder;
|
||||
}
|
||||
|
||||
public final void zab() {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((ListenerHolder) it.next()).clear();
|
||||
}
|
||||
this.zaa.clear();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <L> ListenerHolder<L> createListenerHolder(L l4, Executor executor, String str) {
|
||||
Preconditions.checkNotNull(l4, "Listener must not be null");
|
||||
Preconditions.checkNotNull(executor, "Executor must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
return new ListenerHolder<>(executor, l4, str);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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 com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.Feature;
|
||||
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.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.GmsClientSupervisor;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class NonGmsServiceBrokerClient implements Api.Client, ServiceConnection {
|
||||
private static final String zaa = "NonGmsServiceBrokerClient";
|
||||
private final String zab;
|
||||
private final String zac;
|
||||
private final ComponentName zad;
|
||||
private final Context zae;
|
||||
private final ConnectionCallbacks zaf;
|
||||
private final Handler zag;
|
||||
private final OnConnectionFailedListener zah;
|
||||
private IBinder zai;
|
||||
private boolean zaj;
|
||||
private String zak;
|
||||
private String zal;
|
||||
|
||||
@KeepForSdk
|
||||
public NonGmsServiceBrokerClient(Context context, Looper looper, ComponentName componentName, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this(context, looper, null, null, componentName, connectionCallbacks, onConnectionFailedListener);
|
||||
}
|
||||
|
||||
private final void zad() {
|
||||
if (Thread.currentThread() != this.zag.getLooper().getThread()) {
|
||||
throw new IllegalStateException("This method should only run on the NonGmsServiceBrokerClient's handler thread.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void connect(BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks) {
|
||||
zad();
|
||||
String.valueOf(this.zai);
|
||||
if (isConnected()) {
|
||||
try {
|
||||
disconnect("connect() called when already connected");
|
||||
} catch (Exception unused) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
ComponentName componentName = this.zad;
|
||||
if (componentName != null) {
|
||||
intent.setComponent(componentName);
|
||||
} else {
|
||||
intent.setPackage(this.zab).setAction(this.zac);
|
||||
}
|
||||
boolean bindService = this.zae.bindService(intent, this, GmsClientSupervisor.getDefaultBindFlags());
|
||||
this.zaj = bindService;
|
||||
if (!bindService) {
|
||||
this.zai = null;
|
||||
this.zah.onConnectionFailed(new ConnectionResult(16));
|
||||
}
|
||||
String.valueOf(this.zai);
|
||||
} catch (SecurityException e4) {
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
throw e4;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void disconnect() {
|
||||
zad();
|
||||
String.valueOf(this.zai);
|
||||
try {
|
||||
this.zae.unbindService(this);
|
||||
} catch (IllegalArgumentException unused) {
|
||||
}
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Feature[] getAvailableFeatures() {
|
||||
return new Feature[0];
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public IBinder getBinder() {
|
||||
zad();
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final String getEndpointPackageName() {
|
||||
String str = this.zab;
|
||||
if (str != null) {
|
||||
return str;
|
||||
}
|
||||
Preconditions.checkNotNull(this.zad);
|
||||
return this.zad.getPackageName();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final String getLastDisconnectMessage() {
|
||||
return this.zak;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final int getMinApkVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void getRemoteService(IAccountAccessor iAccountAccessor, Set<Scope> set) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Feature[] getRequiredFeatures() {
|
||||
return new Feature[0];
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Set<Scope> getScopesForConnectionlessNonSignIn() {
|
||||
return Collections.EMPTY_SET;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final IBinder getServiceBrokerBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Intent getSignInIntent() {
|
||||
return new Intent();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean isConnected() {
|
||||
zad();
|
||||
return this.zai != null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean isConnecting() {
|
||||
zad();
|
||||
return this.zaj;
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceConnected(ComponentName componentName, final IBinder iBinder) {
|
||||
this.zag.post(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacg
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
NonGmsServiceBrokerClient.this.zaa(iBinder);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceDisconnected(ComponentName componentName) {
|
||||
this.zag.post(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacf
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
NonGmsServiceBrokerClient.this.zab();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void onUserSignOut(BaseGmsClient.SignOutCallbacks signOutCallbacks) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean providesSignIn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresAccount() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresGooglePlayServices() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresSignIn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public final /* synthetic */ void zaa(IBinder iBinder) {
|
||||
this.zaj = false;
|
||||
this.zai = iBinder;
|
||||
String.valueOf(iBinder);
|
||||
this.zaf.onConnected(new Bundle());
|
||||
}
|
||||
|
||||
public final /* synthetic */ void zab() {
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
this.zaf.onConnectionSuspended(1);
|
||||
}
|
||||
|
||||
public final void zac(String str) {
|
||||
this.zal = str;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:11:0x001e, code lost:
|
||||
|
||||
if (r6 != null) goto L8;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private NonGmsServiceBrokerClient(android.content.Context r2, android.os.Looper r3, java.lang.String r4, java.lang.String r5, android.content.ComponentName r6, com.google.android.gms.common.api.internal.ConnectionCallbacks r7, com.google.android.gms.common.api.internal.OnConnectionFailedListener r8) {
|
||||
/*
|
||||
r1 = this;
|
||||
r1.<init>()
|
||||
r0 = 0
|
||||
r1.zaj = r0
|
||||
r0 = 0
|
||||
r1.zak = r0
|
||||
r1.zae = r2
|
||||
com.google.android.gms.internal.base.zau r2 = new com.google.android.gms.internal.base.zau
|
||||
r2.<init>(r3)
|
||||
r1.zag = r2
|
||||
r1.zaf = r7
|
||||
r1.zah = r8
|
||||
if (r4 == 0) goto L1e
|
||||
if (r5 == 0) goto L1e
|
||||
if (r6 != 0) goto L27
|
||||
r6 = r0
|
||||
goto L20
|
||||
L1e:
|
||||
if (r6 == 0) goto L27
|
||||
L20:
|
||||
r1.zab = r4
|
||||
r1.zac = r5
|
||||
r1.zad = r6
|
||||
return
|
||||
L27:
|
||||
java.lang.AssertionError r1 = new java.lang.AssertionError
|
||||
java.lang.String r2 = "Must specify either package or component, but not both"
|
||||
r1.<init>(r2)
|
||||
throw r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.NonGmsServiceBrokerClient.<init>(android.content.Context, android.os.Looper, java.lang.String, java.lang.String, android.content.ComponentName, com.google.android.gms.common.api.internal.ConnectionCallbacks, com.google.android.gms.common.api.internal.OnConnectionFailedListener):void");
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public NonGmsServiceBrokerClient(Context context, Looper looper, String str, String str2, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this(context, looper, str, str2, null, connectionCallbacks, onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void disconnect(String str) {
|
||||
zad();
|
||||
this.zak = str;
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface OnConnectionFailedListener {
|
||||
@ShowFirstParty
|
||||
@KeepForSdk
|
||||
void onConnectionFailed(ConnectionResult connectionResult);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.OptionalPendingResult;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public final class OptionalPendingResultImpl<R extends Result> extends OptionalPendingResult<R> {
|
||||
private final BasePendingResult zaa;
|
||||
|
||||
public OptionalPendingResultImpl(PendingResult pendingResult) {
|
||||
this.zaa = (BasePendingResult) pendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
this.zaa.addStatusListener(statusListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await() {
|
||||
return (R) this.zaa.await();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void cancel() {
|
||||
this.zaa.cancel();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.OptionalPendingResult
|
||||
public final R get() {
|
||||
if (!this.zaa.isReady()) {
|
||||
throw new IllegalStateException("Result is not available. Check that isDone() returns true before calling get().");
|
||||
}
|
||||
return (R) this.zaa.await(0L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
return this.zaa.isCanceled();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.OptionalPendingResult
|
||||
public final boolean isDone() {
|
||||
return this.zaa.isReady();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback) {
|
||||
this.zaa.setResultCallback(resultCallback);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform) {
|
||||
return this.zaa.then(resultTransform);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await(long j4, TimeUnit timeUnit) {
|
||||
return (R) this.zaa.await(j4, timeUnit);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback, long j4, TimeUnit timeUnit) {
|
||||
this.zaa.setResultCallback(resultCallback, j4, timeUnit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class PendingResultFacade<A extends Result, B extends Result> extends PendingResult<B> {
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final B await() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void cancel() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super B> resultCallback) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super B, ? extends S> resultTransform) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final B await(long j4, TimeUnit timeUnit) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super B> resultCallback, long j4, TimeUnit timeUnit) {
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class RegisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
private final ListenerHolder zaa;
|
||||
private final Feature[] zab;
|
||||
private final boolean zac;
|
||||
private final int zad;
|
||||
|
||||
@KeepForSdk
|
||||
public RegisterListenerMethod(ListenerHolder<L> listenerHolder, Feature[] featureArr, boolean z3, int i) {
|
||||
this.zaa = listenerHolder;
|
||||
this.zab = featureArr;
|
||||
this.zac = z3;
|
||||
this.zad = i;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public void clearListener() {
|
||||
this.zaa.clear();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerHolder.ListenerKey<L> getListenerKey() {
|
||||
return this.zaa.getListenerKey();
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Feature[] getRequiredFeatures() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract void registerListener(A a2, TaskCompletionSource<Void> taskCompletionSource) throws RemoteException;
|
||||
|
||||
public final int zaa() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
public final boolean zab() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public RegisterListenerMethod(ListenerHolder<L> listenerHolder) {
|
||||
this(listenerHolder, null, false, 0);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public RegisterListenerMethod(ListenerHolder<L> listenerHolder, Feature[] featureArr, boolean z3) {
|
||||
this(listenerHolder, featureArr, z3, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class RegistrationMethods<A extends Api.AnyClient, L> {
|
||||
|
||||
@KeepForSdk
|
||||
public final RegisterListenerMethod<A, L> register;
|
||||
public final UnregisterListenerMethod zaa;
|
||||
public final Runnable zab;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder<A extends Api.AnyClient, L> {
|
||||
private RemoteCall zaa;
|
||||
private RemoteCall zab;
|
||||
private ListenerHolder zad;
|
||||
private Feature[] zae;
|
||||
private int zag;
|
||||
private Runnable zac = zacj.zaa;
|
||||
private boolean zaf = true;
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public RegistrationMethods<A, L> build() {
|
||||
Preconditions.checkArgument(this.zaa != null, "Must set register function");
|
||||
Preconditions.checkArgument(this.zab != null, "Must set unregister function");
|
||||
Preconditions.checkArgument(this.zad != null, "Must set holder");
|
||||
return new RegistrationMethods<>(new zack(this, this.zad, this.zae, this.zaf, this.zag), new zacl(this, (ListenerHolder.ListenerKey) Preconditions.checkNotNull(this.zad.getListenerKey(), "Key must not be null")), this.zac, null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> onConnectionSuspended(Runnable runnable) {
|
||||
this.zac = runnable;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> register(RemoteCall<A, TaskCompletionSource<Void>> remoteCall) {
|
||||
this.zaa = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> setAutoResolveMissingFeatures(boolean z3) {
|
||||
this.zaf = z3;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> setFeatures(Feature... featureArr) {
|
||||
this.zae = featureArr;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> setMethodKey(int i) {
|
||||
this.zag = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> unregister(RemoteCall<A, TaskCompletionSource<Boolean>> remoteCall) {
|
||||
this.zab = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, L> withHolder(ListenerHolder<L> listenerHolder) {
|
||||
this.zad = listenerHolder;
|
||||
return this;
|
||||
}
|
||||
|
||||
public /* synthetic */ Builder(zacm zacmVar) {
|
||||
}
|
||||
}
|
||||
|
||||
public /* synthetic */ RegistrationMethods(RegisterListenerMethod registerListenerMethod, UnregisterListenerMethod unregisterListenerMethod, Runnable runnable, zacn zacnVar) {
|
||||
this.register = registerListenerMethod;
|
||||
this.zaa = unregisterListenerMethod;
|
||||
this.zab = runnable;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <A extends Api.AnyClient, L> Builder<A, L> builder() {
|
||||
return new Builder<>(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface RemoteCall<T, U> {
|
||||
@KeepForSdk
|
||||
void accept(T t2, U u3) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface SignInConnectionListener {
|
||||
@KeepForSdk
|
||||
void onComplete();
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.IStatusCallback;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class StatusCallback extends IStatusCallback.Stub {
|
||||
|
||||
@KeepForSdk
|
||||
private final BaseImplementation.ResultHolder<Status> mResultHolder;
|
||||
|
||||
@KeepForSdk
|
||||
public StatusCallback(BaseImplementation.ResultHolder<Status> resultHolder) {
|
||||
this.mResultHolder = resultHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.IStatusCallback
|
||||
@KeepForSdk
|
||||
public void onResult(Status status) {
|
||||
this.mResultHolder.setResult(status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public interface StatusExceptionMapper {
|
||||
@KeepForSdk
|
||||
Exception getException(Status status);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class StatusPendingResult extends BasePendingResult<Status> {
|
||||
@Deprecated
|
||||
public StatusPendingResult(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BasePendingResult
|
||||
public final /* bridge */ /* synthetic */ Status createFailedResult(Status status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public StatusPendingResult(GoogleApiClient googleApiClient) {
|
||||
super(googleApiClient);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.BiConsumer;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class TaskApiCall<A extends Api.AnyClient, ResultT> {
|
||||
private final Feature[] zaa;
|
||||
private final boolean zab;
|
||||
private final int zac;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Builder<A extends Api.AnyClient, ResultT> {
|
||||
private RemoteCall zaa;
|
||||
private Feature[] zac;
|
||||
private boolean zab = true;
|
||||
private int zad = 0;
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public TaskApiCall<A, ResultT> build() {
|
||||
Preconditions.checkArgument(this.zaa != null, "execute parameter required");
|
||||
return new zacv(this, this.zac, this.zab, this.zad);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public Builder<A, ResultT> execute(final BiConsumer<A, TaskCompletionSource<ResultT>> biConsumer) {
|
||||
this.zaa = new RemoteCall() { // from class: com.google.android.gms.common.api.internal.zacu
|
||||
@Override // com.google.android.gms.common.api.internal.RemoteCall
|
||||
public final void accept(Object obj, Object obj2) {
|
||||
BiConsumer.this.accept((Api.AnyClient) obj, (TaskCompletionSource) obj2);
|
||||
}
|
||||
};
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, ResultT> run(RemoteCall<A, TaskCompletionSource<ResultT>> remoteCall) {
|
||||
this.zaa = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, ResultT> setAutoResolveMissingFeatures(boolean z3) {
|
||||
this.zab = z3;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, ResultT> setFeatures(Feature... featureArr) {
|
||||
this.zac = featureArr;
|
||||
return this;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public Builder<A, ResultT> setMethodKey(int i) {
|
||||
this.zad = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public /* synthetic */ Builder(zacw zacwVar) {
|
||||
}
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public TaskApiCall() {
|
||||
this.zaa = null;
|
||||
this.zab = false;
|
||||
this.zac = 0;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <A extends Api.AnyClient, ResultT> Builder<A, ResultT> builder() {
|
||||
return new Builder<>(null);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract void doExecute(A a2, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException;
|
||||
|
||||
@KeepForSdk
|
||||
public boolean shouldAutoResolveMissingFeatures() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public final int zaa() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
public final Feature[] zab() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public TaskApiCall(Feature[] featureArr, boolean z3, int i) {
|
||||
this.zaa = featureArr;
|
||||
boolean z4 = false;
|
||||
if (featureArr != null && z3) {
|
||||
z4 = true;
|
||||
}
|
||||
this.zab = z4;
|
||||
this.zac = i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.ApiExceptionUtil;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public class TaskUtil {
|
||||
@KeepForSdk
|
||||
public static void setResultOrApiException(Status status, TaskCompletionSource<Void> taskCompletionSource) {
|
||||
setResultOrApiException(status, null, taskCompletionSource);
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
@Deprecated
|
||||
public static Task<Void> toVoidTaskThatFailsOnFalse(Task<Boolean> task) {
|
||||
return task.continueWith(new zacx());
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <ResultT> boolean trySetResultOrApiException(Status status, ResultT resultt, TaskCompletionSource<ResultT> taskCompletionSource) {
|
||||
return status.isSuccess() ? taskCompletionSource.trySetResult(resultt) : taskCompletionSource.trySetException(ApiExceptionUtil.fromStatus(status));
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public static <ResultT> void setResultOrApiException(Status status, ResultT resultt, TaskCompletionSource<ResultT> taskCompletionSource) {
|
||||
if (status.isSuccess()) {
|
||||
taskCompletionSource.setResult(resultt);
|
||||
} else {
|
||||
taskCompletionSource.setException(ApiExceptionUtil.fromStatus(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.annotation.KeepForSdk;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
@KeepForSdk
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class UnregisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
private final ListenerHolder.ListenerKey zaa;
|
||||
|
||||
@KeepForSdk
|
||||
public UnregisterListenerMethod(ListenerHolder.ListenerKey<L> listenerKey) {
|
||||
this.zaa = listenerKey;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public ListenerHolder.ListenerKey<L> getListenerKey() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
@KeepForSdk
|
||||
public abstract void unregisterListener(A a2, TaskCompletionSource<Boolean> taskCompletionSource) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zaa extends LifecycleCallback {
|
||||
private List zaa;
|
||||
|
||||
private zaa(LifecycleFragment lifecycleFragment) {
|
||||
super(lifecycleFragment);
|
||||
this.zaa = new ArrayList();
|
||||
this.mLifecycleFragment.addCallback("LifecycleObserverOnStop", this);
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ zaa zaa(Activity activity) {
|
||||
zaa zaaVar;
|
||||
synchronized (activity) {
|
||||
try {
|
||||
LifecycleFragment fragment = LifecycleCallback.getFragment(activity);
|
||||
zaaVar = (zaa) fragment.getCallbackOrNull("LifecycleObserverOnStop", zaa.class);
|
||||
if (zaaVar == null) {
|
||||
zaaVar = new zaa(fragment);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return zaaVar;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final synchronized void zac(Runnable runnable) {
|
||||
this.zaa.add(runnable);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStop() {
|
||||
List list;
|
||||
synchronized (this) {
|
||||
list = this.zaa;
|
||||
this.zaa = new ArrayList();
|
||||
}
|
||||
Iterator it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
((Runnable) it.next()).run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,395 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
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 java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import s.j;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaaa implements zaca {
|
||||
private final Context zaa;
|
||||
private final zabe zab;
|
||||
private final Looper zac;
|
||||
private final zabi zad;
|
||||
private final zabi zae;
|
||||
private final Map zaf;
|
||||
private final Api.Client zah;
|
||||
private Bundle zai;
|
||||
private final Lock zam;
|
||||
private final Set zag = Collections.newSetFromMap(new WeakHashMap());
|
||||
private ConnectionResult zaj = null;
|
||||
private ConnectionResult zak = null;
|
||||
private boolean zal = false;
|
||||
private int zan = 0;
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r15v1, types: [java.util.Map, s.j] */
|
||||
private zaaa(Context context, zabe zabeVar, Lock lock, Looper looper, GoogleApiAvailabilityLight googleApiAvailabilityLight, Map map, Map map2, ClientSettings clientSettings, Api.AbstractClientBuilder abstractClientBuilder, Api.Client client, ArrayList arrayList, ArrayList arrayList2, Map map3, Map map4) {
|
||||
this.zaa = context;
|
||||
this.zab = zabeVar;
|
||||
this.zam = lock;
|
||||
this.zac = looper;
|
||||
this.zah = client;
|
||||
this.zad = new zabi(context, zabeVar, lock, looper, googleApiAvailabilityLight, map2, null, map4, null, arrayList2, new zax(this, null));
|
||||
this.zae = new zabi(context, zabeVar, lock, looper, googleApiAvailabilityLight, map, clientSettings, map3, abstractClientBuilder, arrayList, new zaz(this, 0 == true ? 1 : 0));
|
||||
?? jVar = new j(0);
|
||||
Iterator it = map2.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
jVar.put((Api.AnyClientKey) it.next(), this.zad);
|
||||
}
|
||||
Iterator it2 = map.keySet().iterator();
|
||||
while (it2.hasNext()) {
|
||||
jVar.put((Api.AnyClientKey) it2.next(), this.zae);
|
||||
}
|
||||
this.zaf = Collections.unmodifiableMap(jVar);
|
||||
}
|
||||
|
||||
private final void zaA(ConnectionResult connectionResult) {
|
||||
int i = this.zan;
|
||||
if (i != 1) {
|
||||
if (i != 2) {
|
||||
Log.wtf("CompositeGAC", "Attempted to call failure callbacks in CONNECTION_MODE_NONE. Callbacks should be disabled via GmsClientSupervisor", new Exception());
|
||||
this.zan = 0;
|
||||
}
|
||||
this.zab.zaa(connectionResult);
|
||||
}
|
||||
zaB();
|
||||
this.zan = 0;
|
||||
}
|
||||
|
||||
private final void zaB() {
|
||||
Iterator it = this.zag.iterator();
|
||||
while (it.hasNext()) {
|
||||
((SignInConnectionListener) it.next()).onComplete();
|
||||
}
|
||||
this.zag.clear();
|
||||
}
|
||||
|
||||
private final boolean zaC() {
|
||||
ConnectionResult connectionResult = this.zak;
|
||||
return connectionResult != null && connectionResult.getErrorCode() == 4;
|
||||
}
|
||||
|
||||
private final boolean zaD(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
zabi zabiVar = (zabi) this.zaf.get(apiMethodImpl.getClientKey());
|
||||
Preconditions.checkNotNull(zabiVar, "GoogleApiClient is not configured to use the API required for this call.");
|
||||
return zabiVar.equals(this.zae);
|
||||
}
|
||||
|
||||
private static boolean zaE(ConnectionResult connectionResult) {
|
||||
return connectionResult != null && connectionResult.isSuccess();
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r13v0, types: [java.util.Map, s.j] */
|
||||
/* JADX WARN: Type inference failed for: r14v0, types: [java.util.Map, s.j] */
|
||||
/* JADX WARN: Type inference failed for: r6v0, types: [java.util.Map, s.j] */
|
||||
/* JADX WARN: Type inference failed for: r7v0, types: [java.util.Map, s.j] */
|
||||
public static zaaa zag(Context context, zabe zabeVar, Lock lock, Looper looper, GoogleApiAvailabilityLight googleApiAvailabilityLight, Map map, ClientSettings clientSettings, Map map2, Api.AbstractClientBuilder abstractClientBuilder, ArrayList arrayList) {
|
||||
?? jVar = new j(0);
|
||||
?? jVar2 = new j(0);
|
||||
Api.Client client = null;
|
||||
for (Map.Entry entry : map.entrySet()) {
|
||||
Api.Client client2 = (Api.Client) entry.getValue();
|
||||
if (true == client2.providesSignIn()) {
|
||||
client = client2;
|
||||
}
|
||||
if (client2.requiresSignIn()) {
|
||||
jVar.put((Api.AnyClientKey) entry.getKey(), client2);
|
||||
} else {
|
||||
jVar2.put((Api.AnyClientKey) entry.getKey(), client2);
|
||||
}
|
||||
}
|
||||
Preconditions.checkState(!jVar.isEmpty(), "CompositeGoogleApiClient should not be used without any APIs that require sign-in.");
|
||||
?? jVar3 = new j(0);
|
||||
?? jVar4 = new j(0);
|
||||
for (Api api : map2.keySet()) {
|
||||
Api.AnyClientKey zab = api.zab();
|
||||
if (jVar.containsKey(zab)) {
|
||||
jVar3.put(api, (Boolean) map2.get(api));
|
||||
} else {
|
||||
if (!jVar2.containsKey(zab)) {
|
||||
throw new IllegalStateException("Each API in the isOptionalMap must have a corresponding client in the clients map.");
|
||||
}
|
||||
jVar4.put(api, (Boolean) map2.get(api));
|
||||
}
|
||||
}
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
ArrayList arrayList3 = new ArrayList();
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
zat zatVar = (zat) arrayList.get(i);
|
||||
if (jVar3.containsKey(zatVar.zaa)) {
|
||||
arrayList2.add(zatVar);
|
||||
} else {
|
||||
if (!jVar4.containsKey(zatVar.zaa)) {
|
||||
throw new IllegalStateException("Each ClientCallbacks must have a corresponding API in the isOptionalMap");
|
||||
}
|
||||
arrayList3.add(zatVar);
|
||||
}
|
||||
}
|
||||
return new zaaa(context, zabeVar, lock, looper, googleApiAvailabilityLight, jVar, jVar2, clientSettings, abstractClientBuilder, client, arrayList2, arrayList3, jVar3, jVar4);
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ void zan(zaaa zaaaVar, int i, boolean z3) {
|
||||
zaaaVar.zab.zac(i, z3);
|
||||
zaaaVar.zak = null;
|
||||
zaaaVar.zaj = null;
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ void zao(zaaa zaaaVar, Bundle bundle) {
|
||||
Bundle bundle2 = zaaaVar.zai;
|
||||
if (bundle2 == null) {
|
||||
zaaaVar.zai = bundle;
|
||||
} else if (bundle != null) {
|
||||
bundle2.putAll(bundle);
|
||||
}
|
||||
}
|
||||
|
||||
public static /* bridge */ /* synthetic */ void zap(zaaa zaaaVar) {
|
||||
ConnectionResult connectionResult;
|
||||
if (!zaE(zaaaVar.zaj)) {
|
||||
if (zaaaVar.zaj != null && zaE(zaaaVar.zak)) {
|
||||
zaaaVar.zae.zar();
|
||||
zaaaVar.zaA((ConnectionResult) Preconditions.checkNotNull(zaaaVar.zaj));
|
||||
return;
|
||||
}
|
||||
ConnectionResult connectionResult2 = zaaaVar.zaj;
|
||||
if (connectionResult2 == null || (connectionResult = zaaaVar.zak) == null) {
|
||||
return;
|
||||
}
|
||||
if (zaaaVar.zae.zaf < zaaaVar.zad.zaf) {
|
||||
connectionResult2 = connectionResult;
|
||||
}
|
||||
zaaaVar.zaA(connectionResult2);
|
||||
return;
|
||||
}
|
||||
if (!zaE(zaaaVar.zak) && !zaaaVar.zaC()) {
|
||||
ConnectionResult connectionResult3 = zaaaVar.zak;
|
||||
if (connectionResult3 != null) {
|
||||
if (zaaaVar.zan == 1) {
|
||||
zaaaVar.zaB();
|
||||
return;
|
||||
} else {
|
||||
zaaaVar.zaA(connectionResult3);
|
||||
zaaaVar.zad.zar();
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
int i = zaaaVar.zan;
|
||||
if (i != 1) {
|
||||
if (i != 2) {
|
||||
Log.wtf("CompositeGAC", "Attempted to call success callbacks in CONNECTION_MODE_NONE. Callbacks should be disabled via GmsClientSupervisor", new AssertionError());
|
||||
zaaaVar.zan = 0;
|
||||
}
|
||||
((zabe) Preconditions.checkNotNull(zaaaVar.zab)).zab(zaaaVar.zai);
|
||||
}
|
||||
zaaaVar.zaB();
|
||||
zaaaVar.zan = 0;
|
||||
}
|
||||
|
||||
private final PendingIntent zaz() {
|
||||
if (this.zah == null) {
|
||||
return null;
|
||||
}
|
||||
return PendingIntent.getActivity(this.zaa, System.identityHashCode(this.zab), this.zah.getSignInIntent(), com.google.android.gms.internal.base.zap.zaa | 134217728);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zab() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zac(long j4, TimeUnit timeUnit) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zad(Api api) {
|
||||
return Objects.equal(this.zaf.get(api.zab()), this.zae) ? zaC() ? new ConnectionResult(4, zaz()) : this.zae.zad(api) : this.zad.zad(api);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zae(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
if (!zaD(apiMethodImpl)) {
|
||||
this.zad.zae(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
if (zaC()) {
|
||||
apiMethodImpl.setFailedResult(new Status(4, (String) null, zaz()));
|
||||
return apiMethodImpl;
|
||||
}
|
||||
this.zae.zae(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zaf(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
if (!zaD(apiMethodImpl)) {
|
||||
return this.zad.zaf(apiMethodImpl);
|
||||
}
|
||||
if (!zaC()) {
|
||||
return this.zae.zaf(apiMethodImpl);
|
||||
}
|
||||
apiMethodImpl.setFailedResult(new Status(4, (String) null, zaz()));
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zaq() {
|
||||
this.zan = 2;
|
||||
this.zal = false;
|
||||
this.zak = null;
|
||||
this.zaj = null;
|
||||
this.zad.zaq();
|
||||
this.zae.zaq();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zar() {
|
||||
this.zak = null;
|
||||
this.zaj = null;
|
||||
this.zan = 0;
|
||||
this.zad.zar();
|
||||
this.zae.zar();
|
||||
zaB();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zas(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
printWriter.append((CharSequence) str).append("authClient").println(":");
|
||||
this.zae.zas(String.valueOf(str).concat(" "), fileDescriptor, printWriter, strArr);
|
||||
printWriter.append((CharSequence) str).append("anonClient").println(":");
|
||||
this.zad.zas(String.valueOf(str).concat(" "), fileDescriptor, printWriter, strArr);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zat() {
|
||||
this.zad.zat();
|
||||
this.zae.zat();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zau() {
|
||||
this.zam.lock();
|
||||
try {
|
||||
boolean zax = zax();
|
||||
this.zae.zar();
|
||||
this.zak = new ConnectionResult(4);
|
||||
if (zax) {
|
||||
new com.google.android.gms.internal.base.zau(this.zac).post(new zav(this));
|
||||
} else {
|
||||
zaB();
|
||||
}
|
||||
this.zam.unlock();
|
||||
} catch (Throwable th) {
|
||||
this.zam.unlock();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:10:0x001f, code lost:
|
||||
|
||||
if (r3.zan == 1) goto L11;
|
||||
*/
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final boolean zaw() {
|
||||
/*
|
||||
r3 = this;
|
||||
java.util.concurrent.locks.Lock r0 = r3.zam
|
||||
r0.lock()
|
||||
com.google.android.gms.common.api.internal.zabi r0 = r3.zad // Catch: java.lang.Throwable -> L23
|
||||
boolean r0 = r0.zaw() // Catch: java.lang.Throwable -> L23
|
||||
r1 = 0
|
||||
if (r0 == 0) goto L25
|
||||
com.google.android.gms.common.api.internal.zabi r0 = r3.zae // Catch: java.lang.Throwable -> L23
|
||||
boolean r0 = r0.zaw() // Catch: java.lang.Throwable -> L23
|
||||
r2 = 1
|
||||
if (r0 != 0) goto L21
|
||||
boolean r0 = r3.zaC() // Catch: java.lang.Throwable -> L23
|
||||
if (r0 != 0) goto L21
|
||||
int r0 = r3.zan // Catch: java.lang.Throwable -> L23
|
||||
if (r0 != r2) goto L25
|
||||
L21:
|
||||
r1 = r2
|
||||
goto L25
|
||||
L23:
|
||||
r0 = move-exception
|
||||
goto L2b
|
||||
L25:
|
||||
java.util.concurrent.locks.Lock r3 = r3.zam
|
||||
r3.unlock()
|
||||
return r1
|
||||
L2b:
|
||||
java.util.concurrent.locks.Lock r3 = r3.zam
|
||||
r3.unlock()
|
||||
throw r0
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.zaaa.zaw():boolean");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zax() {
|
||||
this.zam.lock();
|
||||
try {
|
||||
return this.zan == 2;
|
||||
} finally {
|
||||
this.zam.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zay(SignInConnectionListener signInConnectionListener) {
|
||||
this.zam.lock();
|
||||
try {
|
||||
if (!zax()) {
|
||||
if (zaw()) {
|
||||
}
|
||||
this.zam.unlock();
|
||||
return false;
|
||||
}
|
||||
if (!this.zae.zaw()) {
|
||||
this.zag.add(signInConnectionListener);
|
||||
if (this.zan == 0) {
|
||||
this.zan = 1;
|
||||
}
|
||||
this.zak = null;
|
||||
this.zae.zaq();
|
||||
this.zam.unlock();
|
||||
return true;
|
||||
}
|
||||
this.zam.unlock();
|
||||
return false;
|
||||
} catch (Throwable th) {
|
||||
this.zam.unlock();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import java.util.Map;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaab implements PendingResult.StatusListener {
|
||||
final /* synthetic */ BasePendingResult zaa;
|
||||
final /* synthetic */ zaad zab;
|
||||
|
||||
public zaab(zaad zaadVar, BasePendingResult basePendingResult) {
|
||||
this.zab = zaadVar;
|
||||
this.zaa = basePendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult.StatusListener
|
||||
public final void onComplete(Status status) {
|
||||
Map map;
|
||||
map = this.zab.zaa;
|
||||
map.remove(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.Map;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaac implements OnCompleteListener {
|
||||
final /* synthetic */ TaskCompletionSource zaa;
|
||||
final /* synthetic */ zaad zab;
|
||||
|
||||
public zaac(zaad zaadVar, TaskCompletionSource taskCompletionSource) {
|
||||
this.zab = zaadVar;
|
||||
this.zaa = taskCompletionSource;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public final void onComplete(Task task) {
|
||||
Map map;
|
||||
map = this.zab.zab;
|
||||
map.remove(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaad {
|
||||
private final Map zaa = Collections.synchronizedMap(new WeakHashMap());
|
||||
private final Map zab = Collections.synchronizedMap(new WeakHashMap());
|
||||
|
||||
private final void zah(boolean z3, Status status) {
|
||||
HashMap hashMap;
|
||||
HashMap hashMap2;
|
||||
synchronized (this.zaa) {
|
||||
hashMap = new HashMap(this.zaa);
|
||||
}
|
||||
synchronized (this.zab) {
|
||||
hashMap2 = new HashMap(this.zab);
|
||||
}
|
||||
for (Map.Entry entry : hashMap.entrySet()) {
|
||||
if (z3 || ((Boolean) entry.getValue()).booleanValue()) {
|
||||
((BasePendingResult) entry.getKey()).forceFailureUnlessReady(status);
|
||||
}
|
||||
}
|
||||
for (Map.Entry entry2 : hashMap2.entrySet()) {
|
||||
if (z3 || ((Boolean) entry2.getValue()).booleanValue()) {
|
||||
((TaskCompletionSource) entry2.getKey()).trySetException(new ApiException(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void zac(BasePendingResult basePendingResult, boolean z3) {
|
||||
this.zaa.put(basePendingResult, Boolean.valueOf(z3));
|
||||
basePendingResult.addStatusListener(new zaab(this, basePendingResult));
|
||||
}
|
||||
|
||||
public final void zad(TaskCompletionSource taskCompletionSource, boolean z3) {
|
||||
this.zab.put(taskCompletionSource, Boolean.valueOf(z3));
|
||||
taskCompletionSource.getTask().addOnCompleteListener(new zaac(this, taskCompletionSource));
|
||||
}
|
||||
|
||||
public final void zae(int i, String str) {
|
||||
StringBuilder sb = new StringBuilder("The connection to Google Play services was lost");
|
||||
if (i == 1) {
|
||||
sb.append(" due to service disconnection.");
|
||||
} else if (i == 3) {
|
||||
sb.append(" due to dead object exception.");
|
||||
}
|
||||
if (str != null) {
|
||||
sb.append(" Last reason for disconnect: ");
|
||||
sb.append(str);
|
||||
}
|
||||
zah(true, new Status(20, sb.toString()));
|
||||
}
|
||||
|
||||
public final void zaf() {
|
||||
zah(false, GoogleApiManager.zaa);
|
||||
}
|
||||
|
||||
public final boolean zag() {
|
||||
return (this.zaa.isEmpty() && this.zab.isEmpty()) ? false : true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.VisibleForTesting;
|
||||
import s.f;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class zaae extends zap {
|
||||
private final f zad;
|
||||
private final GoogleApiManager zae;
|
||||
|
||||
@VisibleForTesting
|
||||
public zaae(LifecycleFragment lifecycleFragment, GoogleApiManager googleApiManager, GoogleApiAvailability googleApiAvailability) {
|
||||
super(lifecycleFragment, googleApiAvailability);
|
||||
this.zad = new f(0);
|
||||
this.zae = googleApiManager;
|
||||
this.mLifecycleFragment.addCallback("ConnectionlessLifecycleHelper", this);
|
||||
}
|
||||
|
||||
public static void zad(Activity activity, GoogleApiManager googleApiManager, ApiKey apiKey) {
|
||||
LifecycleFragment fragment = LifecycleCallback.getFragment(activity);
|
||||
zaae zaaeVar = (zaae) fragment.getCallbackOrNull("ConnectionlessLifecycleHelper", zaae.class);
|
||||
if (zaaeVar == null) {
|
||||
zaaeVar = new zaae(fragment, googleApiManager, GoogleApiAvailability.getInstance());
|
||||
}
|
||||
Preconditions.checkNotNull(apiKey, "ApiKey cannot be null");
|
||||
zaaeVar.zad.add(apiKey);
|
||||
googleApiManager.zaC(zaaeVar);
|
||||
}
|
||||
|
||||
private final void zae() {
|
||||
if (this.zad.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
this.zae.zaC(this);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onResume() {
|
||||
super.onResume();
|
||||
zae();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStart() {
|
||||
super.onStart();
|
||||
zae();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStop() {
|
||||
super.onStop();
|
||||
this.zae.zaD(this);
|
||||
}
|
||||
|
||||
public final f zaa() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
public final void zab(ConnectionResult connectionResult, int i) {
|
||||
this.zae.zaz(connectionResult, i);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
public final void zac() {
|
||||
this.zae.zaA();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class zaaf {
|
||||
private final ApiKey zaa;
|
||||
private final TaskCompletionSource zab = new TaskCompletionSource();
|
||||
|
||||
public zaaf(ApiKey apiKey) {
|
||||
this.zaa = apiKey;
|
||||
}
|
||||
|
||||
public final ApiKey zaa() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final TaskCompletionSource zab() {
|
||||
return this.zab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import androidx.fragment.app.P;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class zaag extends GoogleApiClient {
|
||||
private final String zaa = "Method is not supported by connectionless client. APIs supporting connectionless client must not call this method.";
|
||||
|
||||
public zaag(String str) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult blockingConnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final PendingResult<Status> clearDefaultAccountAndReconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void connect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void disconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult getConnectionResult(Api<?> api) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean hasConnectedApi(Api<?> api) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnected() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnecting() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionCallbacksRegistered(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionFailedListenerRegistered(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void reconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void stopAutoManage(P p) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult blockingConnect(long j4, TimeUnit timeUnit) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user