Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.IBinder;
|
||||
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;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BlockingServiceConnection implements ServiceConnection {
|
||||
private boolean a = false;
|
||||
private final BlockingQueue<IBinder> b = new LinkedBlockingQueue();
|
||||
|
||||
public IBinder a(long j, TimeUnit timeUnit) throws InterruptedException, TimeoutException {
|
||||
Preconditions.c("BlockingServiceConnection.getServiceWithTimeout() called on main thread");
|
||||
if (this.a) {
|
||||
throw new IllegalStateException("Cannot call get on this connection more than once");
|
||||
}
|
||||
this.a = true;
|
||||
IBinder poll = this.b.poll(j, timeUnit);
|
||||
if (poll != null) {
|
||||
return poll;
|
||||
}
|
||||
throw new TimeoutException("Timed out waiting for the service connection");
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||
this.b.add(iBinder);
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public void onServiceDisconnected(ComponentName componentName) {
|
||||
}
|
||||
}
|
186
sources/com/google/android/gms/common/ConnectionResult.java
Normal file
186
sources/com/google/android/gms/common/ConnectionResult.java
Normal file
@@ -0,0 +1,186 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
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.internal.Objects;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ConnectionResult extends AbstractSafeParcelable {
|
||||
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_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;
|
||||
public static final int UNKNOWN = -1;
|
||||
private final int zzg;
|
||||
private final int zzh;
|
||||
private final PendingIntent zzi;
|
||||
private final String zzj;
|
||||
public static final ConnectionResult RESULT_SUCCESS = new ConnectionResult(0);
|
||||
public static final Parcelable.Creator<ConnectionResult> CREATOR = new zza();
|
||||
|
||||
ConnectionResult(int i, int i2, PendingIntent pendingIntent, String str) {
|
||||
this.zzg = i;
|
||||
this.zzh = i2;
|
||||
this.zzi = pendingIntent;
|
||||
this.zzj = str;
|
||||
}
|
||||
|
||||
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";
|
||||
default:
|
||||
StringBuilder sb = new StringBuilder(31);
|
||||
sb.append("UNKNOWN_ERROR_CODE(");
|
||||
sb.append(i);
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ConnectionResult)) {
|
||||
return false;
|
||||
}
|
||||
ConnectionResult connectionResult = (ConnectionResult) obj;
|
||||
return this.zzh == connectionResult.zzh && Objects.a(this.zzi, connectionResult.zzi) && Objects.a(this.zzj, connectionResult.zzj);
|
||||
}
|
||||
|
||||
public final int getErrorCode() {
|
||||
return this.zzh;
|
||||
}
|
||||
|
||||
public final String getErrorMessage() {
|
||||
return this.zzj;
|
||||
}
|
||||
|
||||
public final PendingIntent getResolution() {
|
||||
return this.zzi;
|
||||
}
|
||||
|
||||
public final boolean hasResolution() {
|
||||
return (this.zzh == 0 || this.zzi == null) ? false : true;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(Integer.valueOf(this.zzh), this.zzi, this.zzj);
|
||||
}
|
||||
|
||||
public final boolean isSuccess() {
|
||||
return this.zzh == 0;
|
||||
}
|
||||
|
||||
public final void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
if (hasResolution()) {
|
||||
activity.startIntentSenderForResult(this.zzi.getIntentSender(), i, null, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
Objects.ToStringHelper a = Objects.a(this);
|
||||
a.a("statusCode", zza(this.zzh));
|
||||
a.a("resolution", this.zzi);
|
||||
a.a("message", this.zzj);
|
||||
return a.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zzg);
|
||||
SafeParcelWriter.a(parcel, 2, getErrorCode());
|
||||
SafeParcelWriter.a(parcel, 3, (Parcelable) getResolution(), i, false);
|
||||
SafeParcelWriter.a(parcel, 4, getErrorMessage(), false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
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,48 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.DialogFragment;
|
||||
import android.app.FragmentManager;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ErrorDialogFragment extends DialogFragment {
|
||||
private Dialog a = null;
|
||||
private DialogInterface.OnCancelListener b = null;
|
||||
|
||||
public static ErrorDialogFragment a(Dialog dialog, DialogInterface.OnCancelListener onCancelListener) {
|
||||
ErrorDialogFragment errorDialogFragment = new ErrorDialogFragment();
|
||||
Preconditions.a(dialog, "Cannot display null dialog");
|
||||
Dialog dialog2 = dialog;
|
||||
dialog2.setOnCancelListener(null);
|
||||
dialog2.setOnDismissListener(null);
|
||||
errorDialogFragment.a = dialog2;
|
||||
if (onCancelListener != null) {
|
||||
errorDialogFragment.b = onCancelListener;
|
||||
}
|
||||
return errorDialogFragment;
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment, android.content.DialogInterface.OnCancelListener
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
DialogInterface.OnCancelListener onCancelListener = this.b;
|
||||
if (onCancelListener != null) {
|
||||
onCancelListener.onCancel(dialogInterface);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment
|
||||
public Dialog onCreateDialog(Bundle bundle) {
|
||||
if (this.a == null) {
|
||||
setShowsDialog(false);
|
||||
}
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@Override // android.app.DialogFragment
|
||||
public void show(FragmentManager fragmentManager, String str) {
|
||||
super.show(fragmentManager, str);
|
||||
}
|
||||
}
|
69
sources/com/google/android/gms/common/Feature.java
Normal file
69
sources/com/google/android/gms/common/Feature.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
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.unity3d.ads.metadata.MediationMetaData;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class Feature extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<Feature> CREATOR = new zzb();
|
||||
private final String name;
|
||||
|
||||
@Deprecated
|
||||
private final int zzk;
|
||||
private final long zzl;
|
||||
|
||||
public Feature(String str, long j) {
|
||||
this.name = str;
|
||||
this.zzl = j;
|
||||
this.zzk = -1;
|
||||
}
|
||||
|
||||
public 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;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public long getVersion() {
|
||||
long j = this.zzl;
|
||||
return j == -1 ? this.zzk : j;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.a(getName(), Long.valueOf(getVersion()));
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
Objects.ToStringHelper a = Objects.a(this);
|
||||
a.a(MediationMetaData.KEY_NAME, getName());
|
||||
a.a(MediationMetaData.KEY_VERSION, Long.valueOf(getVersion()));
|
||||
return a.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, getName(), false);
|
||||
SafeParcelWriter.a(parcel, 2, this.zzk);
|
||||
SafeParcelWriter.a(parcel, 3, getVersion());
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
public Feature(String str, int i, long j) {
|
||||
this.name = str;
|
||||
this.zzk = i;
|
||||
this.zzl = j;
|
||||
}
|
||||
}
|
245
sources/com/google/android/gms/common/GoogleApiAvailability.java
Normal file
245
sources/com/google/android/gms/common/GoogleApiAvailability.java
Normal file
@@ -0,0 +1,245 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.R;
|
||||
import android.annotation.SuppressLint;
|
||||
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.res.Resources;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import com.google.android.gms.base.R$drawable;
|
||||
import com.google.android.gms.common.api.GoogleApiActivity;
|
||||
import com.google.android.gms.common.internal.ConnectionErrorMessages;
|
||||
import com.google.android.gms.common.internal.DialogRedirect;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.internal.base.zal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApiAvailability extends GoogleApiAvailabilityLight {
|
||||
private static final Object d = new Object();
|
||||
private static final GoogleApiAvailability e = new GoogleApiAvailability();
|
||||
private String c;
|
||||
|
||||
@SuppressLint({"HandlerLeak"})
|
||||
private class zaa extends zal {
|
||||
private final Context a;
|
||||
|
||||
public zaa(Context context) {
|
||||
super(Looper.myLooper() == null ? Looper.getMainLooper() : Looper.myLooper());
|
||||
this.a = context.getApplicationContext();
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i != 1) {
|
||||
StringBuilder sb = new StringBuilder(50);
|
||||
sb.append("Don't know how to handle this message: ");
|
||||
sb.append(i);
|
||||
Log.w("GoogleApiAvailability", sb.toString());
|
||||
return;
|
||||
}
|
||||
int b = GoogleApiAvailability.this.b(this.a);
|
||||
if (GoogleApiAvailability.this.b(b)) {
|
||||
GoogleApiAvailability.this.b(this.a, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GoogleApiAvailability() {
|
||||
}
|
||||
|
||||
public static GoogleApiAvailability a() {
|
||||
return e;
|
||||
}
|
||||
|
||||
public boolean b(Activity activity, int i, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
||||
Dialog a = a(activity, i, i2, onCancelListener);
|
||||
if (a == null) {
|
||||
return false;
|
||||
}
|
||||
a(activity, a, GooglePlayServicesUtil.GMS_ERROR_DIALOG, onCancelListener);
|
||||
return true;
|
||||
}
|
||||
|
||||
final void c(Context context) {
|
||||
new zaa(context).sendEmptyMessageDelayed(1, 120000L);
|
||||
}
|
||||
|
||||
public Dialog a(Activity activity, int i, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
||||
return a(activity, i, DialogRedirect.a(activity, a(activity, i, "d"), i2), onCancelListener);
|
||||
}
|
||||
|
||||
public void b(Context context, int i) {
|
||||
a(context, i, (String) null, a(context, i, 0, "n"));
|
||||
}
|
||||
|
||||
private final String b() {
|
||||
String str;
|
||||
synchronized (d) {
|
||||
str = this.c;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
public final boolean a(Context context, ConnectionResult connectionResult, int i) {
|
||||
PendingIntent a = a(context, connectionResult);
|
||||
if (a == null) {
|
||||
return false;
|
||||
}
|
||||
a(context, connectionResult.getErrorCode(), (String) null, GoogleApiActivity.a(context, a, i));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public int b(Context context) {
|
||||
return super.b(context);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public int a(Context context, int i) {
|
||||
return super.a(context, i);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public final boolean b(int i) {
|
||||
return super.b(i);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public Intent a(Context context, int i, String str) {
|
||||
return super.a(context, i, str);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public PendingIntent a(Context context, int i, int i2) {
|
||||
return super.a(context, i, i2);
|
||||
}
|
||||
|
||||
public PendingIntent a(Context context, ConnectionResult connectionResult) {
|
||||
if (connectionResult.hasResolution()) {
|
||||
return connectionResult.getResolution();
|
||||
}
|
||||
return a(context, connectionResult.getErrorCode(), 0);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.GoogleApiAvailabilityLight
|
||||
public final String a(int i) {
|
||||
return super.a(i);
|
||||
}
|
||||
|
||||
static Dialog a(Context context, int i, DialogRedirect dialogRedirect, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (i == 0) {
|
||||
return null;
|
||||
}
|
||||
TypedValue typedValue = new TypedValue();
|
||||
context.getTheme().resolveAttribute(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(ConnectionErrorMessages.b(context, i));
|
||||
if (onCancelListener != null) {
|
||||
builder.setOnCancelListener(onCancelListener);
|
||||
}
|
||||
String a = ConnectionErrorMessages.a(context, i);
|
||||
if (a != null) {
|
||||
builder.setPositiveButton(a, dialogRedirect);
|
||||
}
|
||||
String e2 = ConnectionErrorMessages.e(context, i);
|
||||
if (e2 != null) {
|
||||
builder.setTitle(e2);
|
||||
}
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
static void a(Activity activity, Dialog dialog, String str, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (activity instanceof FragmentActivity) {
|
||||
SupportErrorDialogFragment.a(dialog, onCancelListener).a(((FragmentActivity) activity).getSupportFragmentManager(), str);
|
||||
} else {
|
||||
ErrorDialogFragment.a(dialog, onCancelListener).show(activity.getFragmentManager(), str);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(20)
|
||||
private final void a(Context context, int i, String str, PendingIntent pendingIntent) {
|
||||
int i2;
|
||||
if (i == 18) {
|
||||
c(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 d2 = ConnectionErrorMessages.d(context, i);
|
||||
String c = ConnectionErrorMessages.c(context, i);
|
||||
Resources resources = context.getResources();
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
|
||||
builder.b(true);
|
||||
builder.a(true);
|
||||
builder.b(d2);
|
||||
NotificationCompat.BigTextStyle bigTextStyle = new NotificationCompat.BigTextStyle();
|
||||
bigTextStyle.a(c);
|
||||
builder.a(bigTextStyle);
|
||||
if (DeviceProperties.b(context)) {
|
||||
Preconditions.b(PlatformVersion.f());
|
||||
builder.b(context.getApplicationInfo().icon);
|
||||
builder.a(2);
|
||||
if (DeviceProperties.c(context)) {
|
||||
builder.a(R$drawable.common_full_open_on_phone, resources.getString(com.google.android.gms.base.R$string.common_open_on_phone), pendingIntent);
|
||||
} else {
|
||||
builder.a(pendingIntent);
|
||||
}
|
||||
} else {
|
||||
builder.b(R.drawable.stat_sys_warning);
|
||||
builder.c(resources.getString(com.google.android.gms.base.R$string.common_google_play_services_notification_ticker));
|
||||
builder.a(System.currentTimeMillis());
|
||||
builder.a(pendingIntent);
|
||||
builder.a((CharSequence) c);
|
||||
}
|
||||
if (PlatformVersion.i()) {
|
||||
Preconditions.b(PlatformVersion.i());
|
||||
String b = b();
|
||||
if (b == null) {
|
||||
b = "com.google.android.gms.availability";
|
||||
NotificationChannel notificationChannel = notificationManager.getNotificationChannel("com.google.android.gms.availability");
|
||||
String b2 = ConnectionErrorMessages.b(context);
|
||||
if (notificationChannel == null) {
|
||||
notificationManager.createNotificationChannel(new NotificationChannel("com.google.android.gms.availability", b2, 4));
|
||||
} else if (!b2.equals(notificationChannel.getName())) {
|
||||
notificationChannel.setName(b2);
|
||||
notificationManager.createNotificationChannel(notificationChannel);
|
||||
}
|
||||
}
|
||||
builder.a(b);
|
||||
}
|
||||
Notification a = builder.a();
|
||||
if (i == 1 || i == 2 || i == 3) {
|
||||
i2 = 10436;
|
||||
GooglePlayServicesUtilLight.sCanceledAvailabilityNotification.set(false);
|
||||
} else {
|
||||
i2 = 39789;
|
||||
}
|
||||
notificationManager.notify(i2, a);
|
||||
}
|
||||
}
|
@@ -0,0 +1,93 @@
|
||||
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.util.DeviceProperties;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApiAvailabilityLight {
|
||||
public static final int a = GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
private static final GoogleApiAvailabilityLight b = new GoogleApiAvailabilityLight();
|
||||
|
||||
GoogleApiAvailabilityLight() {
|
||||
}
|
||||
|
||||
public static GoogleApiAvailabilityLight a() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public int b(Context context) {
|
||||
return a(context, a);
|
||||
}
|
||||
|
||||
public int a(Context context, int i) {
|
||||
int isGooglePlayServicesAvailable = GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, isGooglePlayServicesAvailable)) {
|
||||
return 18;
|
||||
}
|
||||
return isGooglePlayServicesAvailable;
|
||||
}
|
||||
|
||||
public boolean b(int i) {
|
||||
return GooglePlayServicesUtilLight.isUserRecoverableError(i);
|
||||
}
|
||||
|
||||
public Intent a(Context context, int i, String str) {
|
||||
if (i != 1 && i != 2) {
|
||||
if (i != 3) {
|
||||
return null;
|
||||
}
|
||||
return com.google.android.gms.common.internal.zzg.a("com.google.android.gms");
|
||||
}
|
||||
if (context != null && DeviceProperties.c(context)) {
|
||||
return com.google.android.gms.common.internal.zzg.a();
|
||||
}
|
||||
return com.google.android.gms.common.internal.zzg.a("com.google.android.gms", a(context, str));
|
||||
}
|
||||
|
||||
public PendingIntent a(Context context, int i, int i2) {
|
||||
return a(context, i, i2, null);
|
||||
}
|
||||
|
||||
public PendingIntent a(Context context, int i, int i2, String str) {
|
||||
Intent a2 = a(context, i, str);
|
||||
if (a2 == null) {
|
||||
return null;
|
||||
}
|
||||
return PendingIntent.getActivity(context, i2, a2, 134217728);
|
||||
}
|
||||
|
||||
public int a(Context context) {
|
||||
return GooglePlayServicesUtilLight.getApkVersion(context);
|
||||
}
|
||||
|
||||
public String a(int i) {
|
||||
return GooglePlayServicesUtilLight.getErrorString(i);
|
||||
}
|
||||
|
||||
private static String a(Context context, String str) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("gcore_");
|
||||
sb.append(a);
|
||||
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.a(context).b(context.getPackageName(), 0).versionCode);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
/* loaded from: classes.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: classes.dex */
|
||||
public class GooglePlayServicesRepairableException extends UserRecoverableException {
|
||||
private final int zzaf;
|
||||
|
||||
public GooglePlayServicesRepairableException(int i, String str, Intent intent) {
|
||||
super(str, intent);
|
||||
this.zzaf = i;
|
||||
}
|
||||
|
||||
public int getConnectionStatusCode() {
|
||||
return this.zzaf;
|
||||
}
|
||||
}
|
@@ -0,0 +1,107 @@
|
||||
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.Fragment;
|
||||
import com.google.android.gms.common.internal.DialogRedirect;
|
||||
|
||||
/* loaded from: classes.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 i2) {
|
||||
return getErrorDialog(i, activity, i2, null);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static PendingIntent getErrorPendingIntent(int i, Context context, int i2) {
|
||||
return GooglePlayServicesUtilLight.getErrorPendingIntent(i, context, i2);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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 i2, DialogInterface.OnCancelListener onCancelListener) {
|
||||
return showErrorDialogFragment(i, activity, null, i2, onCancelListener);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void showErrorNotification(int i, Context context) {
|
||||
GoogleApiAvailability a = GoogleApiAvailability.a();
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(context, i) || GooglePlayServicesUtilLight.isPlayStorePossiblyUpdating(context, i)) {
|
||||
a.c(context);
|
||||
} else {
|
||||
a.b(context, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Dialog getErrorDialog(int i, Activity activity, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
||||
i = 18;
|
||||
}
|
||||
return GoogleApiAvailability.a().a(activity, i, i2, onCancelListener);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
return GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(context, i);
|
||||
}
|
||||
|
||||
public static boolean showErrorDialogFragment(int i, Activity activity, Fragment fragment, int i2, DialogInterface.OnCancelListener onCancelListener) {
|
||||
if (GooglePlayServicesUtilLight.isPlayServicesPossiblyUpdating(activity, i)) {
|
||||
i = 18;
|
||||
}
|
||||
GoogleApiAvailability a = GoogleApiAvailability.a();
|
||||
if (fragment == null) {
|
||||
return a.b(activity, i, i2, onCancelListener);
|
||||
}
|
||||
Dialog a2 = GoogleApiAvailability.a(activity, i, DialogRedirect.a(fragment, GoogleApiAvailability.a().a(activity, i, "d"), i2), onCancelListener);
|
||||
if (a2 == null) {
|
||||
return false;
|
||||
}
|
||||
GoogleApiAvailability.a(activity, a2, GMS_ERROR_DIALOG, onCancelListener);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean showErrorDialogFragment(int i, Activity activity, int i2) {
|
||||
return showErrorDialogFragment(i, activity, i2, null);
|
||||
}
|
||||
}
|
@@ -0,0 +1,297 @@
|
||||
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.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.zzp;
|
||||
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.wrappers.Wrappers;
|
||||
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GooglePlayServicesUtilLight {
|
||||
static final int GMS_AVAILABILITY_NOTIFICATION_ID = 10436;
|
||||
static final int GMS_GENERAL_ERROR_NOTIFICATION_ID = 39789;
|
||||
public static final String GOOGLE_PLAY_GAMES_PACKAGE = "com.google.android.play.games";
|
||||
|
||||
@Deprecated
|
||||
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
|
||||
|
||||
@Deprecated
|
||||
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = 12451000;
|
||||
public static final String GOOGLE_PLAY_STORE_PACKAGE = "com.android.vending";
|
||||
private static boolean zzag = false;
|
||||
private static boolean zzah = false;
|
||||
private static boolean zzai = false;
|
||||
private static boolean zzaj = false;
|
||||
static final AtomicBoolean sCanceledAvailabilityNotification = new AtomicBoolean();
|
||||
private static final AtomicBoolean zzak = new AtomicBoolean();
|
||||
|
||||
GooglePlayServicesUtilLight() {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void cancelAvailabilityErrorNotifications(Context context) {
|
||||
if (sCanceledAvailabilityNotification.getAndSet(true)) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
|
||||
if (notificationManager != null) {
|
||||
notificationManager.cancel(GMS_AVAILABILITY_NOTIFICATION_ID);
|
||||
}
|
||||
} catch (SecurityException unused) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void enableUsingApkIndependentContext() {
|
||||
zzak.set(true);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void ensurePlayServicesAvailable(Context context, int i) throws GooglePlayServicesRepairableException, GooglePlayServicesNotAvailableException {
|
||||
int a = GoogleApiAvailabilityLight.a().a(context, i);
|
||||
if (a != 0) {
|
||||
Intent a2 = GoogleApiAvailabilityLight.a().a(context, a, "e");
|
||||
StringBuilder sb = new StringBuilder(57);
|
||||
sb.append("GooglePlayServices not available due to error ");
|
||||
sb.append(a);
|
||||
Log.e("GooglePlayServicesUtil", sb.toString());
|
||||
if (a2 != null) {
|
||||
throw new GooglePlayServicesRepairableException(a, "Google Play Services not available", a2);
|
||||
}
|
||||
throw new GooglePlayServicesNotAvailableException(a);
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int getClientVersion(Context context) {
|
||||
Preconditions.b(true);
|
||||
return ClientLibraryUtils.a(context, context.getPackageName());
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static PendingIntent getErrorPendingIntent(int i, Context context, int i2) {
|
||||
return GoogleApiAvailabilityLight.a().a(context, i, i2);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static String getErrorString(int i) {
|
||||
return ConnectionResult.zza(i);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Intent getGooglePlayServicesAvailabilityRecoveryIntent(int i) {
|
||||
return GoogleApiAvailabilityLight.a().a((Context) null, i, (String) null);
|
||||
}
|
||||
|
||||
public static Context getRemoteContext(Context context) {
|
||||
try {
|
||||
return context.createPackageContext("com.google.android.gms", 3);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Resources getRemoteResource(Context context) {
|
||||
try {
|
||||
return context.getPackageManager().getResourcesForApplication("com.google.android.gms");
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean honorsDebugCertificates(Context context) {
|
||||
try {
|
||||
if (!zzaj) {
|
||||
PackageInfo b = Wrappers.a(context).b("com.google.android.gms", 64);
|
||||
GoogleSignatureVerifier.a(context);
|
||||
if (b == null || GoogleSignatureVerifier.a(b, false) || !GoogleSignatureVerifier.a(b, true)) {
|
||||
zzai = false;
|
||||
} else {
|
||||
zzai = true;
|
||||
}
|
||||
}
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.w("GooglePlayServicesUtil", "Cannot find Google Play services package name.", e);
|
||||
} finally {
|
||||
zzaj = true;
|
||||
}
|
||||
return zzai || !DeviceProperties.a();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context) {
|
||||
return isGooglePlayServicesAvailable(context, GOOGLE_PLAY_SERVICES_VERSION_CODE);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isGooglePlayServicesUid(Context context, int i) {
|
||||
return UidVerifier.a(context, i);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isPlayServicesPossiblyUpdating(Context context, int i) {
|
||||
if (i == 18) {
|
||||
return true;
|
||||
}
|
||||
if (i == 1) {
|
||||
return isUninstalledAppPossiblyUpdating(context, "com.google.android.gms");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isPlayStorePossiblyUpdating(Context context, int i) {
|
||||
if (i == 9) {
|
||||
return isUninstalledAppPossiblyUpdating(context, "com.android.vending");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@TargetApi(18)
|
||||
public static boolean isRestrictedUserProfile(Context context) {
|
||||
Bundle applicationRestrictions;
|
||||
return PlatformVersion.d() && (applicationRestrictions = ((UserManager) context.getSystemService("user")).getApplicationRestrictions(context.getPackageName())) != null && "true".equals(applicationRestrictions.getString("restricted_profile"));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isSidewinderDevice(Context context) {
|
||||
return DeviceProperties.a(context);
|
||||
}
|
||||
|
||||
@TargetApi(21)
|
||||
static boolean isUninstalledAppPossiblyUpdating(Context context, String str) {
|
||||
ApplicationInfo applicationInfo;
|
||||
boolean equals = str.equals("com.google.android.gms");
|
||||
if (PlatformVersion.g()) {
|
||||
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, UnityActivity.BLOCKLY_TYPE_NONE);
|
||||
} catch (PackageManager.NameNotFoundException unused2) {
|
||||
}
|
||||
return equals ? applicationInfo.enabled : applicationInfo.enabled && !isRestrictedUserProfile(context);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static boolean isUserRecoverableError(int i) {
|
||||
return i == 1 || i == 2 || i == 3 || i == 9;
|
||||
}
|
||||
|
||||
@TargetApi(19)
|
||||
@Deprecated
|
||||
public static boolean uidHasPackageName(Context context, int i, String str) {
|
||||
return UidVerifier.a(context, i, str);
|
||||
}
|
||||
|
||||
private static int zza(Context context, boolean z, int i) {
|
||||
Preconditions.a(i >= 0);
|
||||
PackageManager packageManager = context.getPackageManager();
|
||||
PackageInfo packageInfo = null;
|
||||
if (z) {
|
||||
try {
|
||||
packageInfo = packageManager.getPackageInfo("com.android.vending", 8256);
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play Store is missing.");
|
||||
return 9;
|
||||
}
|
||||
}
|
||||
try {
|
||||
PackageInfo packageInfo2 = packageManager.getPackageInfo("com.google.android.gms", 64);
|
||||
GoogleSignatureVerifier.a(context);
|
||||
if (!GoogleSignatureVerifier.a(packageInfo2, true)) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play services signature invalid.");
|
||||
return 9;
|
||||
}
|
||||
if (z && (!GoogleSignatureVerifier.a(packageInfo, true) || !packageInfo.signatures[0].equals(packageInfo2.signatures[0]))) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play Store signature invalid.");
|
||||
return 9;
|
||||
}
|
||||
if (com.google.android.gms.common.util.zzb.a(packageInfo2.versionCode) >= com.google.android.gms.common.util.zzb.a(i)) {
|
||||
ApplicationInfo applicationInfo = packageInfo2.applicationInfo;
|
||||
if (applicationInfo == null) {
|
||||
try {
|
||||
applicationInfo = packageManager.getApplicationInfo("com.google.android.gms", 0);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.wtf("GooglePlayServicesUtil", "Google Play services missing when getting application info.", e);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return !applicationInfo.enabled ? 3 : 0;
|
||||
}
|
||||
int i2 = packageInfo2.versionCode;
|
||||
StringBuilder sb = new StringBuilder(77);
|
||||
sb.append("Google Play services out of date. Requires ");
|
||||
sb.append(i);
|
||||
sb.append(" but found ");
|
||||
sb.append(i2);
|
||||
Log.w("GooglePlayServicesUtil", sb.toString());
|
||||
return 2;
|
||||
} catch (PackageManager.NameNotFoundException unused2) {
|
||||
Log.w("GooglePlayServicesUtil", "Google Play services is missing.");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int isGooglePlayServicesAvailable(Context context, int i) {
|
||||
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()) && !zzak.get()) {
|
||||
int b = zzp.b(context);
|
||||
if (b == 0) {
|
||||
throw new IllegalStateException("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\" />");
|
||||
}
|
||||
int i2 = GOOGLE_PLAY_SERVICES_VERSION_CODE;
|
||||
if (b != i2) {
|
||||
StringBuilder sb = new StringBuilder(320);
|
||||
sb.append("The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected ");
|
||||
sb.append(i2);
|
||||
sb.append(" but found ");
|
||||
sb.append(b);
|
||||
sb.append(". 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\" />");
|
||||
throw new IllegalStateException(sb.toString());
|
||||
}
|
||||
}
|
||||
return zza(context, (DeviceProperties.c(context) || DeviceProperties.d(context)) ? false : true, i);
|
||||
}
|
||||
}
|
@@ -0,0 +1,117 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
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.internal.Preconditions;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleSignatureVerifier {
|
||||
private static GoogleSignatureVerifier b;
|
||||
private final Context a;
|
||||
|
||||
private GoogleSignatureVerifier(Context context) {
|
||||
this.a = context.getApplicationContext();
|
||||
}
|
||||
|
||||
public static GoogleSignatureVerifier a(Context context) {
|
||||
Preconditions.a(context);
|
||||
synchronized (GoogleSignatureVerifier.class) {
|
||||
if (b == null) {
|
||||
zzc.a(context);
|
||||
b = new GoogleSignatureVerifier(context);
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private final zzm b(PackageInfo packageInfo) {
|
||||
ApplicationInfo applicationInfo;
|
||||
boolean honorsDebugCertificates = GooglePlayServicesUtilLight.honorsDebugCertificates(this.a);
|
||||
if (packageInfo == null) {
|
||||
return zzm.a("null pkg");
|
||||
}
|
||||
Signature[] signatureArr = packageInfo.signatures;
|
||||
if (signatureArr.length != 1) {
|
||||
return zzm.a("single cert required");
|
||||
}
|
||||
zzf zzfVar = new zzf(signatureArr[0].toByteArray());
|
||||
String str = packageInfo.packageName;
|
||||
zzm a = zzc.a(str, zzfVar, honorsDebugCertificates);
|
||||
return (!a.a || (applicationInfo = packageInfo.applicationInfo) == null || (applicationInfo.flags & 2) == 0 || (honorsDebugCertificates && !zzc.a(str, (zze) zzfVar, false).a)) ? a : zzm.a("debuggable release cert app rejected");
|
||||
}
|
||||
|
||||
public boolean a(int i) {
|
||||
zzm a;
|
||||
String[] a2 = Wrappers.a(this.a).a(i);
|
||||
if (a2 == null || a2.length == 0) {
|
||||
a = zzm.a("no pkgs");
|
||||
} else {
|
||||
a = null;
|
||||
for (String str : a2) {
|
||||
a = a(str, i);
|
||||
if (a.a) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
a.b();
|
||||
return a.a;
|
||||
}
|
||||
|
||||
public static boolean a(PackageInfo packageInfo, boolean z) {
|
||||
if (packageInfo != null && packageInfo.signatures != null) {
|
||||
if ((z ? a(packageInfo, zzh.a) : a(packageInfo, zzh.a[0])) != null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean a(PackageInfo packageInfo) {
|
||||
if (packageInfo == null) {
|
||||
return false;
|
||||
}
|
||||
if (a(packageInfo, false)) {
|
||||
return true;
|
||||
}
|
||||
if (a(packageInfo, true)) {
|
||||
if (GooglePlayServicesUtilLight.honorsDebugCertificates(this.a)) {
|
||||
return true;
|
||||
}
|
||||
Log.w("GoogleSignatureVerifier", "Test-keys aren't accepted on this build.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private final zzm a(String str, int i) {
|
||||
try {
|
||||
return b(Wrappers.a(this.a).a(str, 64, i));
|
||||
} catch (PackageManager.NameNotFoundException unused) {
|
||||
String valueOf = String.valueOf(str);
|
||||
return zzm.a(valueOf.length() != 0 ? "no pkg ".concat(valueOf) : new String("no pkg "));
|
||||
}
|
||||
}
|
||||
|
||||
private static zze a(PackageInfo packageInfo, zze... zzeVarArr) {
|
||||
Signature[] signatureArr = packageInfo.signatures;
|
||||
if (signatureArr == null) {
|
||||
return null;
|
||||
}
|
||||
if (signatureArr.length != 1) {
|
||||
Log.w("GoogleSignatureVerifier", "Package has more than one signature.");
|
||||
return null;
|
||||
}
|
||||
zzf zzfVar = new zzf(signatureArr[0].toByteArray());
|
||||
for (int i = 0; i < zzeVarArr.length; i++) {
|
||||
if (zzeVarArr[i].equals(zzfVar)) {
|
||||
return zzeVarArr[i];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
6
sources/com/google/android/gms/common/R$string.java
Normal file
6
sources/com/google/android/gms/common/R$string.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class R$string {
|
||||
public static final int common_google_play_services_unknown_issue = 2131820822;
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class SupportErrorDialogFragment extends DialogFragment {
|
||||
private Dialog j = null;
|
||||
private DialogInterface.OnCancelListener k = null;
|
||||
|
||||
@Override // androidx.fragment.app.DialogFragment
|
||||
public Dialog a(Bundle bundle) {
|
||||
if (this.j == null) {
|
||||
b(false);
|
||||
}
|
||||
return this.j;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.DialogFragment, android.content.DialogInterface.OnCancelListener
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
DialogInterface.OnCancelListener onCancelListener = this.k;
|
||||
if (onCancelListener != null) {
|
||||
onCancelListener.onCancel(dialogInterface);
|
||||
}
|
||||
}
|
||||
|
||||
public static SupportErrorDialogFragment a(Dialog dialog, DialogInterface.OnCancelListener onCancelListener) {
|
||||
SupportErrorDialogFragment supportErrorDialogFragment = new SupportErrorDialogFragment();
|
||||
Preconditions.a(dialog, "Cannot display null dialog");
|
||||
Dialog dialog2 = dialog;
|
||||
dialog2.setOnCancelListener(null);
|
||||
dialog2.setOnDismissListener(null);
|
||||
supportErrorDialogFragment.j = dialog2;
|
||||
if (onCancelListener != null) {
|
||||
supportErrorDialogFragment.k = onCancelListener;
|
||||
}
|
||||
return supportErrorDialogFragment;
|
||||
}
|
||||
|
||||
@Override // androidx.fragment.app.DialogFragment
|
||||
public void a(FragmentManager fragmentManager, String str) {
|
||||
super.a(fragmentManager, str);
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class UserRecoverableException extends Exception {
|
||||
private final Intent mIntent;
|
||||
|
||||
public UserRecoverableException(String str, Intent intent) {
|
||||
super(str);
|
||||
this.mIntent = intent;
|
||||
}
|
||||
|
||||
public Intent getIntent() {
|
||||
return new Intent(this.mIntent);
|
||||
}
|
||||
}
|
@@ -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: classes.dex */
|
||||
public @interface KeepName {
|
||||
}
|
108
sources/com/google/android/gms/common/api/Api.java
Normal file
108
sources/com/google/android/gms/common/api/Api.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
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.api.Api.ApiOptions;
|
||||
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 java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Api<O extends ApiOptions> {
|
||||
private final AbstractClientBuilder<?, O> a;
|
||||
private final String b;
|
||||
|
||||
public static abstract class AbstractClientBuilder<T extends Client, O> extends BaseClientBuilder<T, O> {
|
||||
public abstract T a(Context context, Looper looper, ClientSettings clientSettings, O o, GoogleApiClient$ConnectionCallbacks googleApiClient$ConnectionCallbacks, GoogleApiClient$OnConnectionFailedListener googleApiClient$OnConnectionFailedListener);
|
||||
}
|
||||
|
||||
public interface AnyClient {
|
||||
}
|
||||
|
||||
public static class AnyClientKey<C extends AnyClient> {
|
||||
}
|
||||
|
||||
public interface ApiOptions {
|
||||
|
||||
public interface HasAccountOptions extends HasOptions, NotRequiredOptions {
|
||||
Account a();
|
||||
}
|
||||
|
||||
public interface HasGoogleSignInAccountOptions extends HasOptions {
|
||||
GoogleSignInAccount b();
|
||||
}
|
||||
|
||||
public interface HasOptions extends ApiOptions {
|
||||
}
|
||||
|
||||
public interface NotRequiredOptions extends ApiOptions {
|
||||
}
|
||||
|
||||
public interface Optional extends HasOptions, NotRequiredOptions {
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class BaseClientBuilder<T extends AnyClient, O> {
|
||||
}
|
||||
|
||||
public interface Client extends AnyClient {
|
||||
void a();
|
||||
|
||||
void a(BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks);
|
||||
|
||||
void a(BaseGmsClient.SignOutCallbacks signOutCallbacks);
|
||||
|
||||
void a(IAccountAccessor iAccountAccessor, Set<Scope> set);
|
||||
|
||||
boolean b();
|
||||
|
||||
boolean d();
|
||||
|
||||
String e();
|
||||
|
||||
boolean f();
|
||||
|
||||
int g();
|
||||
|
||||
Feature[] h();
|
||||
|
||||
boolean i();
|
||||
}
|
||||
|
||||
public static final class ClientKey<C extends Client> extends AnyClientKey<C> {
|
||||
}
|
||||
|
||||
public interface SimpleClient<T extends IInterface> extends AnyClient {
|
||||
T a(IBinder iBinder);
|
||||
|
||||
void a(int i, T t);
|
||||
|
||||
String j();
|
||||
|
||||
String k();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public <C extends Client> Api(String str, AbstractClientBuilder<C, O> abstractClientBuilder, ClientKey<C> clientKey) {
|
||||
Preconditions.a(abstractClientBuilder, "Cannot construct an Api with a null ClientBuilder");
|
||||
Preconditions.a(clientKey, "Cannot construct an Api with a null ClientKey");
|
||||
this.b = str;
|
||||
this.a = abstractClientBuilder;
|
||||
}
|
||||
|
||||
public final String a() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final AbstractClientBuilder<?, O> b() {
|
||||
Preconditions.b(this.a != null, "This API was constructed with a SimpleClientBuilder. Use getSimpleClientBuilder");
|
||||
return this.a;
|
||||
}
|
||||
}
|
48
sources/com/google/android/gms/common/api/ApiException.java
Normal file
48
sources/com/google/android/gms/common/api/ApiException.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ApiException extends Exception {
|
||||
protected final Status mStatus;
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public ApiException(com.google.android.gms.common.api.Status r5) {
|
||||
/*
|
||||
r4 = this;
|
||||
int r0 = r5.getStatusCode()
|
||||
java.lang.String r1 = r5.getStatusMessage()
|
||||
if (r1 == 0) goto Lf
|
||||
java.lang.String r1 = r5.getStatusMessage()
|
||||
goto L11
|
||||
Lf:
|
||||
java.lang.String r1 = ""
|
||||
L11:
|
||||
java.lang.String r2 = java.lang.String.valueOf(r1)
|
||||
int r2 = r2.length()
|
||||
int r2 = r2 + 13
|
||||
java.lang.StringBuilder r3 = new java.lang.StringBuilder
|
||||
r3.<init>(r2)
|
||||
r3.append(r0)
|
||||
java.lang.String r0 = ": "
|
||||
r3.append(r0)
|
||||
r3.append(r1)
|
||||
java.lang.String r0 = r3.toString()
|
||||
r4.<init>(r0)
|
||||
r4.mStatus = r5
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.ApiException.<init>(com.google.android.gms.common.api.Status):void");
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return this.mStatus.getStatusCode();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getStatusMessage() {
|
||||
return this.mStatus.getStatusMessage();
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import androidx.collection.ArrayMap;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.zai;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AvailabilityException extends Exception {
|
||||
private final ArrayMap<zai<?>, ConnectionResult> zaay;
|
||||
|
||||
public AvailabilityException(ArrayMap<zai<?>, ConnectionResult> arrayMap) {
|
||||
this.zaay = arrayMap;
|
||||
}
|
||||
|
||||
public ConnectionResult getConnectionResult(GoogleApi<? extends Api.ApiOptions> googleApi) {
|
||||
zai<? extends Api.ApiOptions> c = googleApi.c();
|
||||
Preconditions.a(this.zaay.get(c) != null, "The given API was not part of the availability request.");
|
||||
return this.zaay.get(c);
|
||||
}
|
||||
|
||||
@Override // java.lang.Throwable
|
||||
public String getMessage() {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
boolean z = true;
|
||||
for (zai<?> zaiVar : this.zaay.keySet()) {
|
||||
ConnectionResult connectionResult = this.zaay.get(zaiVar);
|
||||
if (connectionResult.isSuccess()) {
|
||||
z = false;
|
||||
}
|
||||
String a = zaiVar.a();
|
||||
String valueOf = String.valueOf(connectionResult);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(a).length() + 2 + String.valueOf(valueOf).length());
|
||||
sb.append(a);
|
||||
sb.append(": ");
|
||||
sb.append(valueOf);
|
||||
arrayList.add(sb.toString());
|
||||
}
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
if (z) {
|
||||
sb2.append("None of the queried APIs are available. ");
|
||||
} else {
|
||||
sb2.append("Some of the queried APIs are unavailable. ");
|
||||
}
|
||||
sb2.append(TextUtils.join("; ", arrayList));
|
||||
return sb2.toString();
|
||||
}
|
||||
|
||||
public final ArrayMap<zai<?>, ConnectionResult> zaj() {
|
||||
return this.zaay;
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class CommonStatusCodes {
|
||||
public static String a(int i) {
|
||||
switch (i) {
|
||||
case -1:
|
||||
return "SUCCESS_CACHE";
|
||||
case 0:
|
||||
return "SUCCESS";
|
||||
case 1:
|
||||
case 9:
|
||||
case 11:
|
||||
case 12:
|
||||
default:
|
||||
StringBuilder sb = new StringBuilder(32);
|
||||
sb.append("unknown status code: ");
|
||||
sb.append(i);
|
||||
return sb.toString();
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
67
sources/com/google/android/gms/common/api/GoogleApi.java
Normal file
67
sources/com/google/android/gms/common/api/GoogleApi.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.accounts.Account;
|
||||
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.api.Api;
|
||||
import com.google.android.gms.common.api.Api.ApiOptions;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.api.internal.zace;
|
||||
import com.google.android.gms.common.api.internal.zai;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApi<O extends Api.ApiOptions> {
|
||||
private final Context a;
|
||||
private final Api<O> b;
|
||||
private final O c;
|
||||
private final zai<O> d;
|
||||
private final int e;
|
||||
|
||||
/* JADX WARN: Type inference failed for: r9v1, types: [com.google.android.gms.common.api.Api$Client] */
|
||||
public Api.Client a(Looper looper, GoogleApiManager.zaa<O> zaaVar) {
|
||||
return this.b.b().a(this.a, looper, a().a(), this.c, zaaVar, zaaVar);
|
||||
}
|
||||
|
||||
public final int b() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
public final zai<O> c() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
protected ClientSettings.Builder a() {
|
||||
Account a;
|
||||
Set<Scope> emptySet;
|
||||
GoogleSignInAccount b;
|
||||
GoogleSignInAccount b2;
|
||||
ClientSettings.Builder builder = new ClientSettings.Builder();
|
||||
O o = this.c;
|
||||
if ((o instanceof Api.ApiOptions.HasGoogleSignInAccountOptions) && (b2 = ((Api.ApiOptions.HasGoogleSignInAccountOptions) o).b()) != null) {
|
||||
a = b2.getAccount();
|
||||
} else {
|
||||
O o2 = this.c;
|
||||
a = o2 instanceof Api.ApiOptions.HasAccountOptions ? ((Api.ApiOptions.HasAccountOptions) o2).a() : null;
|
||||
}
|
||||
builder.a(a);
|
||||
O o3 = this.c;
|
||||
if ((o3 instanceof Api.ApiOptions.HasGoogleSignInAccountOptions) && (b = ((Api.ApiOptions.HasGoogleSignInAccountOptions) o3).b()) != null) {
|
||||
emptySet = b.getRequestedScopes();
|
||||
} else {
|
||||
emptySet = Collections.emptySet();
|
||||
}
|
||||
builder.a(emptySet);
|
||||
builder.a(this.a.getClass().getName());
|
||||
builder.b(this.a.getPackageName());
|
||||
return builder;
|
||||
}
|
||||
|
||||
public zace a(Context context, Handler handler) {
|
||||
return new zace(context, handler, a().a());
|
||||
}
|
||||
}
|
102
sources/com/google/android/gms/common/api/GoogleApiActivity.java
Normal file
102
sources/com/google/android/gms/common/api/GoogleApiActivity.java
Normal file
@@ -0,0 +1,102 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.os.Bundle;
|
||||
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.KeepName;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApiActivity extends Activity implements DialogInterface.OnCancelListener {
|
||||
private int a = 0;
|
||||
|
||||
public static PendingIntent a(Context context, PendingIntent pendingIntent, int i) {
|
||||
return PendingIntent.getActivity(context, 0, a(context, pendingIntent, i, true), 134217728);
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
protected void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
if (i == 1) {
|
||||
boolean booleanExtra = getIntent().getBooleanExtra("notify_manager", true);
|
||||
this.a = 0;
|
||||
setResult(i2, intent);
|
||||
if (booleanExtra) {
|
||||
GoogleApiManager a = GoogleApiManager.a(this);
|
||||
if (i2 == -1) {
|
||||
a.a();
|
||||
} else if (i2 == 0) {
|
||||
a.a(new ConnectionResult(13, null), getIntent().getIntExtra("failing_client_id", -1));
|
||||
}
|
||||
}
|
||||
} else if (i == 2) {
|
||||
this.a = 0;
|
||||
setResult(i2, intent);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // android.content.DialogInterface.OnCancelListener
|
||||
public void onCancel(DialogInterface dialogInterface) {
|
||||
this.a = 0;
|
||||
setResult(0);
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
protected void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
if (bundle != null) {
|
||||
this.a = bundle.getInt("resolution");
|
||||
}
|
||||
if (this.a != 1) {
|
||||
Bundle extras = getIntent().getExtras();
|
||||
if (extras == null) {
|
||||
Log.e("GoogleApiActivity", "Activity started without extras");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
PendingIntent pendingIntent = (PendingIntent) extras.get("pending_intent");
|
||||
Integer num = (Integer) extras.get("error_code");
|
||||
if (pendingIntent == null && num == null) {
|
||||
Log.e("GoogleApiActivity", "Activity started without resolution");
|
||||
finish();
|
||||
} else {
|
||||
if (pendingIntent == null) {
|
||||
GoogleApiAvailability.a().b(this, num.intValue(), 2, this);
|
||||
this.a = 1;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
startIntentSenderForResult(pendingIntent.getIntentSender(), 1, null, 0, 0, 0);
|
||||
this.a = 1;
|
||||
} catch (IntentSender.SendIntentException e) {
|
||||
Log.e("GoogleApiActivity", "Failed to launch pendingIntent", e);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Activity
|
||||
protected void onSaveInstanceState(Bundle bundle) {
|
||||
bundle.putInt("resolution", this.a);
|
||||
super.onSaveInstanceState(bundle);
|
||||
}
|
||||
|
||||
public static Intent a(Context context, PendingIntent pendingIntent, int i, boolean z) {
|
||||
Intent intent = new Intent(context, (Class<?>) GoogleApiActivity.class);
|
||||
intent.putExtra("pending_intent", pendingIntent);
|
||||
intent.putExtra("failing_client_id", i);
|
||||
intent.putExtra("notify_manager", z);
|
||||
return intent;
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface GoogleApiClient$ConnectionCallbacks {
|
||||
void d(Bundle bundle);
|
||||
|
||||
void i(int i);
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface GoogleApiClient$OnConnectionFailedListener {
|
||||
void a(ConnectionResult connectionResult);
|
||||
}
|
11
sources/com/google/android/gms/common/api/PendingResult.java
Normal file
11
sources/com/google/android/gms/common/api/PendingResult.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.api.Result;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class PendingResult<R extends Result> {
|
||||
|
||||
public interface StatusListener {
|
||||
void a(Status status);
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes.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: classes.dex */
|
||||
public class ResolvableApiException extends ApiException {
|
||||
public ResolvableApiException(Status status) {
|
||||
super(status);
|
||||
}
|
||||
|
||||
public PendingIntent getResolution() {
|
||||
return this.mStatus.getResolution();
|
||||
}
|
||||
|
||||
public void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
this.mStatus.startResolutionForResult(activity, i);
|
||||
}
|
||||
}
|
6
sources/com/google/android/gms/common/api/Result.java
Normal file
6
sources/com/google/android/gms/common/api/Result.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
/* loaded from: classes.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: classes.dex */
|
||||
public interface ResultCallback<R extends Result> {
|
||||
void a(R r);
|
||||
}
|
55
sources/com/google/android/gms/common/api/Scope.java
Normal file
55
sources/com/google/android/gms/common/api/Scope.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
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;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Scope extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public static final Parcelable.Creator<Scope> CREATOR = new zza();
|
||||
private final String zzap;
|
||||
private final int zzg;
|
||||
|
||||
Scope(int i, String str) {
|
||||
Preconditions.a(str, (Object) "scopeUri must not be null or empty");
|
||||
this.zzg = i;
|
||||
this.zzap = str;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof Scope) {
|
||||
return this.zzap.equals(((Scope) obj).zzap);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final String getScopeUri() {
|
||||
return this.zzap;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return this.zzap.hashCode();
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return this.zzap;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zzg);
|
||||
SafeParcelWriter.a(parcel, 2, getScopeUri(), false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
public Scope(String str) {
|
||||
this(1, str);
|
||||
}
|
||||
}
|
119
sources/com/google/android/gms/common/api/Status.java
Normal file
119
sources/com/google/android/gms/common/api/Status.java
Normal file
@@ -0,0 +1,119 @@
|
||||
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.internal.Objects;
|
||||
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;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Status extends AbstractSafeParcelable implements Result, ReflectedParcelable {
|
||||
private final int zzg;
|
||||
private final int zzh;
|
||||
private final PendingIntent zzi;
|
||||
private final String zzj;
|
||||
public static final Status RESULT_SUCCESS = new Status(0);
|
||||
public static final Status RESULT_INTERRUPTED = new Status(14);
|
||||
public static final Status RESULT_INTERNAL_ERROR = new Status(8);
|
||||
public static final Status RESULT_TIMEOUT = new Status(15);
|
||||
public static final Status RESULT_CANCELED = new Status(16);
|
||||
private static final Status zzaq = new Status(17);
|
||||
public static final Status RESULT_DEAD_CLIENT = new Status(18);
|
||||
public static final Parcelable.Creator<Status> CREATOR = new zzb();
|
||||
|
||||
Status(int i, int i2, String str, PendingIntent pendingIntent) {
|
||||
this.zzg = i;
|
||||
this.zzh = i2;
|
||||
this.zzj = str;
|
||||
this.zzi = pendingIntent;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (!(obj instanceof Status)) {
|
||||
return false;
|
||||
}
|
||||
Status status = (Status) obj;
|
||||
return this.zzg == status.zzg && this.zzh == status.zzh && Objects.a(this.zzj, status.zzj) && Objects.a(this.zzi, status.zzi);
|
||||
}
|
||||
|
||||
public final PendingIntent getResolution() {
|
||||
return this.zzi;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public final Status getStatus() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public final int getStatusCode() {
|
||||
return this.zzh;
|
||||
}
|
||||
|
||||
public final String getStatusMessage() {
|
||||
return this.zzj;
|
||||
}
|
||||
|
||||
public final boolean hasResolution() {
|
||||
return this.zzi != null;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(Integer.valueOf(this.zzg), Integer.valueOf(this.zzh), this.zzj, this.zzi);
|
||||
}
|
||||
|
||||
public final boolean isCanceled() {
|
||||
return this.zzh == 16;
|
||||
}
|
||||
|
||||
public final boolean isInterrupted() {
|
||||
return this.zzh == 14;
|
||||
}
|
||||
|
||||
public final boolean isSuccess() {
|
||||
return this.zzh <= 0;
|
||||
}
|
||||
|
||||
public final void startResolutionForResult(Activity activity, int i) throws IntentSender.SendIntentException {
|
||||
if (hasResolution()) {
|
||||
activity.startIntentSenderForResult(this.zzi.getIntentSender(), i, null, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
Objects.ToStringHelper a = Objects.a(this);
|
||||
a.a("statusCode", zzg());
|
||||
a.a("resolution", this.zzi);
|
||||
return a.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, getStatusCode());
|
||||
SafeParcelWriter.a(parcel, 2, getStatusMessage(), false);
|
||||
SafeParcelWriter.a(parcel, 3, (Parcelable) this.zzi, i, false);
|
||||
SafeParcelWriter.a(parcel, 1000, this.zzg);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
public final String zzg() {
|
||||
String str = this.zzj;
|
||||
return str != null ? str : CommonStatusCodes.a(this.zzh);
|
||||
}
|
||||
|
||||
public Status(int i) {
|
||||
this(i, null);
|
||||
}
|
||||
|
||||
public Status(int i, String str) {
|
||||
this(1, i, str, null);
|
||||
}
|
||||
|
||||
public Status(int i, String str, PendingIntent pendingIntent) {
|
||||
this(1, i, str, pendingIntent);
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class UnsupportedApiCallException extends UnsupportedOperationException {
|
||||
private final Feature zzar;
|
||||
|
||||
public UnsupportedApiCallException(Feature feature) {
|
||||
this.zzar = feature;
|
||||
}
|
||||
|
||||
@Override // java.lang.Throwable
|
||||
public final String getMessage() {
|
||||
String valueOf = String.valueOf(this.zzar);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 8);
|
||||
sb.append("Missing ");
|
||||
sb.append(valueOf);
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
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.util.PlatformVersion;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class BackgroundDetector implements Application.ActivityLifecycleCallbacks, ComponentCallbacks2 {
|
||||
private static final BackgroundDetector e = new BackgroundDetector();
|
||||
private final AtomicBoolean a = new AtomicBoolean();
|
||||
private final AtomicBoolean b = new AtomicBoolean();
|
||||
private final ArrayList<BackgroundStateChangeListener> c = new ArrayList<>();
|
||||
private boolean d = false;
|
||||
|
||||
public interface BackgroundStateChangeListener {
|
||||
void a(boolean z);
|
||||
}
|
||||
|
||||
private BackgroundDetector() {
|
||||
}
|
||||
|
||||
public static void a(Application application) {
|
||||
synchronized (e) {
|
||||
if (!e.d) {
|
||||
application.registerActivityLifecycleCallbacks(e);
|
||||
application.registerComponentCallbacks(e);
|
||||
e.d = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static BackgroundDetector b() {
|
||||
return e;
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
boolean compareAndSet = this.a.compareAndSet(true, false);
|
||||
this.b.set(true);
|
||||
if (compareAndSet) {
|
||||
b(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.a.compareAndSet(true, false);
|
||||
this.b.set(true);
|
||||
if (compareAndSet) {
|
||||
b(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.a.compareAndSet(false, true)) {
|
||||
this.b.set(true);
|
||||
b(true);
|
||||
}
|
||||
}
|
||||
|
||||
private final void b(boolean z) {
|
||||
synchronized (e) {
|
||||
ArrayList<BackgroundStateChangeListener> arrayList = this.c;
|
||||
int size = arrayList.size();
|
||||
int i = 0;
|
||||
while (i < size) {
|
||||
BackgroundStateChangeListener backgroundStateChangeListener = arrayList.get(i);
|
||||
i++;
|
||||
backgroundStateChangeListener.a(z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(16)
|
||||
public final boolean a(boolean z) {
|
||||
if (!this.b.get()) {
|
||||
if (!PlatformVersion.c()) {
|
||||
return z;
|
||||
}
|
||||
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
|
||||
ActivityManager.getMyMemoryState(runningAppProcessInfo);
|
||||
if (!this.b.getAndSet(true) && runningAppProcessInfo.importance > 100) {
|
||||
this.a.set(true);
|
||||
}
|
||||
}
|
||||
return a();
|
||||
}
|
||||
|
||||
public final boolean a() {
|
||||
return this.a.get();
|
||||
}
|
||||
|
||||
public final void a(BackgroundStateChangeListener backgroundStateChangeListener) {
|
||||
synchronized (e) {
|
||||
this.c.add(backgroundStateChangeListener);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,181 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
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.Status;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class BasePendingResult<R extends Result> extends PendingResult<R> {
|
||||
private ResultCallback<? super R> e;
|
||||
private R g;
|
||||
private Status h;
|
||||
private volatile boolean i;
|
||||
private boolean j;
|
||||
private boolean k;
|
||||
private final Object a = new Object();
|
||||
private final CountDownLatch c = new CountDownLatch(1);
|
||||
private final ArrayList<PendingResult.StatusListener> d = new ArrayList<>();
|
||||
private final AtomicReference<zacs> f = new AtomicReference<>();
|
||||
private final CallbackHandler<R> b = new CallbackHandler<>(Looper.getMainLooper());
|
||||
|
||||
public static class CallbackHandler<R extends Result> extends com.google.android.gms.internal.base.zal {
|
||||
public CallbackHandler(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
public final void a(ResultCallback<? super R> resultCallback, R r) {
|
||||
sendMessage(obtainMessage(1, new Pair(resultCallback, r)));
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // android.os.Handler
|
||||
public void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i != 1) {
|
||||
if (i == 2) {
|
||||
((BasePendingResult) message.obj).b(Status.RESULT_TIMEOUT);
|
||||
return;
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(45);
|
||||
sb.append("Don't know how to handle message: ");
|
||||
sb.append(i);
|
||||
Log.wtf("BasePendingResult", sb.toString(), new Exception());
|
||||
return;
|
||||
}
|
||||
Pair pair = (Pair) message.obj;
|
||||
ResultCallback resultCallback = (ResultCallback) pair.first;
|
||||
Result result = (Result) pair.second;
|
||||
try {
|
||||
resultCallback.a(result);
|
||||
} catch (RuntimeException e) {
|
||||
BasePendingResult.c(result);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class zaa {
|
||||
private zaa() {
|
||||
}
|
||||
|
||||
protected final void finalize() throws Throwable {
|
||||
BasePendingResult.c(BasePendingResult.this.g);
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
/* synthetic */ zaa(BasePendingResult basePendingResult, zap zapVar) {
|
||||
this();
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
new zap();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
BasePendingResult() {
|
||||
new WeakReference(null);
|
||||
}
|
||||
|
||||
public static void c(Result result) {
|
||||
if (result instanceof Releasable) {
|
||||
try {
|
||||
((Releasable) result).release();
|
||||
} catch (RuntimeException e) {
|
||||
String valueOf = String.valueOf(result);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 18);
|
||||
sb.append("Unable to release ");
|
||||
sb.append(valueOf);
|
||||
Log.w("BasePendingResult", sb.toString(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract R a(Status status);
|
||||
|
||||
public final boolean a() {
|
||||
return this.c.getCount() == 0;
|
||||
}
|
||||
|
||||
public final void b(Status status) {
|
||||
synchronized (this.a) {
|
||||
if (!a()) {
|
||||
a((BasePendingResult<R>) a(status));
|
||||
this.k = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(R r) {
|
||||
synchronized (this.a) {
|
||||
if (this.k || this.j) {
|
||||
c(r);
|
||||
return;
|
||||
}
|
||||
a();
|
||||
boolean z = true;
|
||||
Preconditions.b(!a(), "Results have already been set");
|
||||
if (this.i) {
|
||||
z = false;
|
||||
}
|
||||
Preconditions.b(z, "Result has already been consumed");
|
||||
b((BasePendingResult<R>) r);
|
||||
}
|
||||
}
|
||||
|
||||
private final R b() {
|
||||
R r;
|
||||
synchronized (this.a) {
|
||||
Preconditions.b(!this.i, "Result has already been consumed.");
|
||||
Preconditions.b(a(), "Result is not ready.");
|
||||
r = this.g;
|
||||
this.g = null;
|
||||
this.e = null;
|
||||
this.i = true;
|
||||
}
|
||||
zacs andSet = this.f.getAndSet(null);
|
||||
if (andSet != null) {
|
||||
andSet.a(this);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private final void b(R r) {
|
||||
this.g = r;
|
||||
this.c.countDown();
|
||||
this.h = this.g.getStatus();
|
||||
zap zapVar = null;
|
||||
if (this.j) {
|
||||
this.e = null;
|
||||
} else if (this.e == null) {
|
||||
if (this.g instanceof Releasable) {
|
||||
new zaa(this, zapVar);
|
||||
}
|
||||
} else {
|
||||
this.b.removeMessages(2);
|
||||
this.b.a(this.e, b());
|
||||
}
|
||||
ArrayList<PendingResult.StatusListener> arrayList = this.d;
|
||||
int size = arrayList.size();
|
||||
int i = 0;
|
||||
while (i < size) {
|
||||
PendingResult.StatusListener statusListener = arrayList.get(i);
|
||||
i++;
|
||||
statusListener.a(this.h);
|
||||
}
|
||||
this.d.clear();
|
||||
}
|
||||
}
|
@@ -0,0 +1,768 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import androidx.collection.ArrayMap;
|
||||
import androidx.collection.ArraySet;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.UnsupportedApiCallException;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.GoogleApiAvailabilityCache;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.SimpleClientAdapter;
|
||||
import com.google.android.gms.common.util.ArrayUtils;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApiManager implements Handler.Callback {
|
||||
public static final Status m = new Status(4, "Sign-out occurred while this API call was in progress.");
|
||||
private static final Status n = new Status(4, "The user must be signed in to make this API call.");
|
||||
private static final Object o = new Object();
|
||||
private static GoogleApiManager p;
|
||||
private long a = 5000;
|
||||
private long b = 120000;
|
||||
private long c = 10000;
|
||||
private final Context d;
|
||||
private final GoogleApiAvailability e;
|
||||
private final GoogleApiAvailabilityCache f;
|
||||
private final AtomicInteger g;
|
||||
private final Map<zai<?>, zaa<?>> h;
|
||||
private zaae i;
|
||||
private final Set<zai<?>> j;
|
||||
private final Set<zai<?>> k;
|
||||
private final Handler l;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
class zac implements zach, BaseGmsClient.ConnectionProgressReportCallbacks {
|
||||
private final Api.Client a;
|
||||
private final zai<?> b;
|
||||
private IAccountAccessor c = null;
|
||||
private Set<Scope> d = null;
|
||||
private boolean e = false;
|
||||
|
||||
public zac(Api.Client client, zai<?> zaiVar) {
|
||||
this.a = client;
|
||||
this.b = zaiVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.ConnectionProgressReportCallbacks
|
||||
public final void a(ConnectionResult connectionResult) {
|
||||
GoogleApiManager.this.l.post(new zabo(this, connectionResult));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zach
|
||||
public final void b(ConnectionResult connectionResult) {
|
||||
((zaa) GoogleApiManager.this.h.get(this.b)).b(connectionResult);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zach
|
||||
public final void a(IAccountAccessor iAccountAccessor, Set<Scope> set) {
|
||||
if (iAccountAccessor == null || set == null) {
|
||||
Log.wtf("GoogleApiManager", "Received null response from onSignInSuccess", new Exception());
|
||||
b(new ConnectionResult(4));
|
||||
} else {
|
||||
this.c = iAccountAccessor;
|
||||
this.d = set;
|
||||
a();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void a() {
|
||||
IAccountAccessor iAccountAccessor;
|
||||
if (!this.e || (iAccountAccessor = this.c) == null) {
|
||||
return;
|
||||
}
|
||||
this.a.a(iAccountAccessor, this.d);
|
||||
}
|
||||
|
||||
static /* synthetic */ boolean a(zac zacVar, boolean z) {
|
||||
zacVar.e = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private GoogleApiManager(Context context, Looper looper, GoogleApiAvailability googleApiAvailability) {
|
||||
new AtomicInteger(1);
|
||||
this.g = new AtomicInteger(0);
|
||||
this.h = new ConcurrentHashMap(5, 0.75f, 1);
|
||||
this.i = null;
|
||||
this.j = new ArraySet();
|
||||
this.k = new ArraySet();
|
||||
this.d = context;
|
||||
this.l = new com.google.android.gms.internal.base.zal(looper, this);
|
||||
this.e = googleApiAvailability;
|
||||
this.f = new GoogleApiAvailabilityCache(googleApiAvailability);
|
||||
Handler handler = this.l;
|
||||
handler.sendMessage(handler.obtainMessage(6));
|
||||
}
|
||||
|
||||
public static GoogleApiManager a(Context context) {
|
||||
GoogleApiManager googleApiManager;
|
||||
synchronized (o) {
|
||||
if (p == null) {
|
||||
HandlerThread handlerThread = new HandlerThread("GoogleApiHandler", 9);
|
||||
handlerThread.start();
|
||||
p = new GoogleApiManager(context.getApplicationContext(), handlerThread.getLooper(), GoogleApiAvailability.a());
|
||||
}
|
||||
googleApiManager = p;
|
||||
}
|
||||
return googleApiManager;
|
||||
}
|
||||
|
||||
final boolean b(ConnectionResult connectionResult, int i) {
|
||||
return this.e.a(this.d, connectionResult, i);
|
||||
}
|
||||
|
||||
@Override // android.os.Handler.Callback
|
||||
public boolean handleMessage(Message message) {
|
||||
zaa<?> zaaVar;
|
||||
int i = message.what;
|
||||
switch (i) {
|
||||
case 1:
|
||||
this.c = ((Boolean) message.obj).booleanValue() ? 10000L : 300000L;
|
||||
this.l.removeMessages(12);
|
||||
for (zai<?> zaiVar : this.h.keySet()) {
|
||||
Handler handler = this.l;
|
||||
handler.sendMessageDelayed(handler.obtainMessage(12, zaiVar), this.c);
|
||||
}
|
||||
return true;
|
||||
case 2:
|
||||
zak zakVar = (zak) message.obj;
|
||||
Iterator<zai<?>> it = zakVar.a().iterator();
|
||||
while (true) {
|
||||
if (it.hasNext()) {
|
||||
zai<?> next = it.next();
|
||||
zaa<?> zaaVar2 = this.h.get(next);
|
||||
if (zaaVar2 == null) {
|
||||
zakVar.a(next, new ConnectionResult(13), null);
|
||||
} else if (zaaVar2.c()) {
|
||||
zakVar.a(next, ConnectionResult.RESULT_SUCCESS, zaaVar2.f().e());
|
||||
} else if (zaaVar2.k() != null) {
|
||||
zakVar.a(next, zaaVar2.k(), null);
|
||||
} else {
|
||||
zaaVar2.a(zakVar);
|
||||
zaaVar2.a();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 3:
|
||||
for (zaa<?> zaaVar3 : this.h.values()) {
|
||||
zaaVar3.j();
|
||||
zaaVar3.a();
|
||||
}
|
||||
return true;
|
||||
case 4:
|
||||
case 8:
|
||||
case 13:
|
||||
zabv zabvVar = (zabv) message.obj;
|
||||
zaa<?> zaaVar4 = this.h.get(zabvVar.c.c());
|
||||
if (zaaVar4 == null) {
|
||||
a(zabvVar.c);
|
||||
zaaVar4 = this.h.get(zabvVar.c.c());
|
||||
}
|
||||
if (!zaaVar4.d() || this.g.get() == zabvVar.b) {
|
||||
zaaVar4.a(zabvVar.a);
|
||||
} else {
|
||||
zabvVar.a.a(m);
|
||||
zaaVar4.h();
|
||||
}
|
||||
return true;
|
||||
case 5:
|
||||
int i2 = message.arg1;
|
||||
ConnectionResult connectionResult = (ConnectionResult) message.obj;
|
||||
Iterator<zaa<?>> it2 = this.h.values().iterator();
|
||||
while (true) {
|
||||
if (it2.hasNext()) {
|
||||
zaaVar = it2.next();
|
||||
if (zaaVar.b() == i2) {
|
||||
}
|
||||
} else {
|
||||
zaaVar = null;
|
||||
}
|
||||
}
|
||||
if (zaaVar != null) {
|
||||
String a = this.e.a(connectionResult.getErrorCode());
|
||||
String errorMessage = connectionResult.getErrorMessage();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(a).length() + 69 + String.valueOf(errorMessage).length());
|
||||
sb.append("Error resolution was canceled by the user, original error message: ");
|
||||
sb.append(a);
|
||||
sb.append(": ");
|
||||
sb.append(errorMessage);
|
||||
zaaVar.a(new Status(17, sb.toString()));
|
||||
} else {
|
||||
StringBuilder sb2 = new StringBuilder(76);
|
||||
sb2.append("Could not find API instance ");
|
||||
sb2.append(i2);
|
||||
sb2.append(" while trying to fail enqueued calls.");
|
||||
Log.wtf("GoogleApiManager", sb2.toString(), new Exception());
|
||||
}
|
||||
return true;
|
||||
case 6:
|
||||
if (PlatformVersion.a() && (this.d.getApplicationContext() instanceof Application)) {
|
||||
BackgroundDetector.a((Application) this.d.getApplicationContext());
|
||||
BackgroundDetector.b().a(new zabi(this));
|
||||
if (!BackgroundDetector.b().a(true)) {
|
||||
this.c = 300000L;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 7:
|
||||
a((GoogleApi<?>) message.obj);
|
||||
return true;
|
||||
case 9:
|
||||
if (this.h.containsKey(message.obj)) {
|
||||
this.h.get(message.obj).e();
|
||||
}
|
||||
return true;
|
||||
case 10:
|
||||
Iterator<zai<?>> it3 = this.k.iterator();
|
||||
while (it3.hasNext()) {
|
||||
this.h.remove(it3.next()).h();
|
||||
}
|
||||
this.k.clear();
|
||||
return true;
|
||||
case 11:
|
||||
if (this.h.containsKey(message.obj)) {
|
||||
this.h.get(message.obj).g();
|
||||
}
|
||||
return true;
|
||||
case 12:
|
||||
if (this.h.containsKey(message.obj)) {
|
||||
this.h.get(message.obj).l();
|
||||
}
|
||||
return true;
|
||||
case 14:
|
||||
zaaf zaafVar = (zaaf) message.obj;
|
||||
zai<?> b = zaafVar.b();
|
||||
if (this.h.containsKey(b)) {
|
||||
zaafVar.a().a((TaskCompletionSource<Boolean>) Boolean.valueOf(zaa.a((zaa) this.h.get(b), false)));
|
||||
} else {
|
||||
zaafVar.a().a((TaskCompletionSource<Boolean>) false);
|
||||
}
|
||||
return true;
|
||||
case 15:
|
||||
zab zabVar = (zab) message.obj;
|
||||
if (this.h.containsKey(zabVar.a)) {
|
||||
this.h.get(zabVar.a).a(zabVar);
|
||||
}
|
||||
return true;
|
||||
case 16:
|
||||
zab zabVar2 = (zab) message.obj;
|
||||
if (this.h.containsKey(zabVar2.a)) {
|
||||
this.h.get(zabVar2.a).b(zabVar2);
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
StringBuilder sb3 = new StringBuilder(31);
|
||||
sb3.append("Unknown message id: ");
|
||||
sb3.append(i);
|
||||
Log.w("GoogleApiManager", sb3.toString());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class zaa<O extends Api.ApiOptions> implements GoogleApiClient$ConnectionCallbacks, GoogleApiClient$OnConnectionFailedListener, zar {
|
||||
private final Api.Client b;
|
||||
private final Api.AnyClient c;
|
||||
private final zai<O> d;
|
||||
private final zaab e;
|
||||
private final int h;
|
||||
private final zace i;
|
||||
private boolean j;
|
||||
private final Queue<com.google.android.gms.common.api.internal.zab> a = new LinkedList();
|
||||
private final Set<zak> f = new HashSet();
|
||||
private final Map<ListenerHolder$ListenerKey<?>, zabw> g = new HashMap();
|
||||
private final List<zab> k = new ArrayList();
|
||||
private ConnectionResult l = null;
|
||||
|
||||
public zaa(GoogleApi<O> googleApi) {
|
||||
this.b = googleApi.a(GoogleApiManager.this.l.getLooper(), this);
|
||||
Api.Client client = this.b;
|
||||
if (client instanceof SimpleClientAdapter) {
|
||||
this.c = ((SimpleClientAdapter) client).x();
|
||||
} else {
|
||||
this.c = client;
|
||||
}
|
||||
this.d = googleApi.c();
|
||||
this.e = new zaab();
|
||||
this.h = googleApi.b();
|
||||
if (this.b.i()) {
|
||||
this.i = googleApi.a(GoogleApiManager.this.d, GoogleApiManager.this.l);
|
||||
} else {
|
||||
this.i = null;
|
||||
}
|
||||
}
|
||||
|
||||
private final boolean c(ConnectionResult connectionResult) {
|
||||
synchronized (GoogleApiManager.o) {
|
||||
if (GoogleApiManager.this.i != null && GoogleApiManager.this.j.contains(this.d)) {
|
||||
GoogleApiManager.this.i.a(connectionResult, this.h);
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void m() {
|
||||
j();
|
||||
d(ConnectionResult.RESULT_SUCCESS);
|
||||
p();
|
||||
Iterator<zabw> it = this.g.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
zabw next = it.next();
|
||||
if (a(next.a.b()) != null) {
|
||||
it.remove();
|
||||
} else {
|
||||
try {
|
||||
next.a.a(this.c, new TaskCompletionSource<>());
|
||||
} catch (DeadObjectException unused) {
|
||||
i(1);
|
||||
this.b.a();
|
||||
} catch (RemoteException unused2) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
o();
|
||||
q();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void n() {
|
||||
j();
|
||||
this.j = true;
|
||||
this.e.c();
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 9, this.d), GoogleApiManager.this.a);
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 11, this.d), GoogleApiManager.this.b);
|
||||
GoogleApiManager.this.f.a();
|
||||
}
|
||||
|
||||
private final void o() {
|
||||
ArrayList arrayList = new ArrayList(this.a);
|
||||
int size = arrayList.size();
|
||||
int i = 0;
|
||||
while (i < size) {
|
||||
Object obj = arrayList.get(i);
|
||||
i++;
|
||||
com.google.android.gms.common.api.internal.zab zabVar = (com.google.android.gms.common.api.internal.zab) obj;
|
||||
if (!this.b.b()) {
|
||||
return;
|
||||
}
|
||||
if (b(zabVar)) {
|
||||
this.a.remove(zabVar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void p() {
|
||||
if (this.j) {
|
||||
GoogleApiManager.this.l.removeMessages(11, this.d);
|
||||
GoogleApiManager.this.l.removeMessages(9, this.d);
|
||||
this.j = false;
|
||||
}
|
||||
}
|
||||
|
||||
private final void q() {
|
||||
GoogleApiManager.this.l.removeMessages(12, this.d);
|
||||
GoogleApiManager.this.l.sendMessageDelayed(GoogleApiManager.this.l.obtainMessage(12, this.d), GoogleApiManager.this.c);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener
|
||||
public final void a(ConnectionResult connectionResult) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
zace zaceVar = this.i;
|
||||
if (zaceVar != null) {
|
||||
zaceVar.i();
|
||||
}
|
||||
j();
|
||||
GoogleApiManager.this.f.a();
|
||||
d(connectionResult);
|
||||
if (connectionResult.getErrorCode() == 4) {
|
||||
a(GoogleApiManager.n);
|
||||
return;
|
||||
}
|
||||
if (this.a.isEmpty()) {
|
||||
this.l = connectionResult;
|
||||
return;
|
||||
}
|
||||
if (c(connectionResult) || GoogleApiManager.this.b(connectionResult, this.h)) {
|
||||
return;
|
||||
}
|
||||
if (connectionResult.getErrorCode() == 18) {
|
||||
this.j = true;
|
||||
}
|
||||
if (this.j) {
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 9, this.d), GoogleApiManager.this.a);
|
||||
return;
|
||||
}
|
||||
String a = this.d.a();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(a).length() + 38);
|
||||
sb.append("API: ");
|
||||
sb.append(a);
|
||||
sb.append(" is not available on this device.");
|
||||
a(new Status(17, sb.toString()));
|
||||
}
|
||||
|
||||
public final void b(ConnectionResult connectionResult) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
this.b.a();
|
||||
a(connectionResult);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks
|
||||
public final void d(Bundle bundle) {
|
||||
if (Looper.myLooper() == GoogleApiManager.this.l.getLooper()) {
|
||||
m();
|
||||
} else {
|
||||
GoogleApiManager.this.l.post(new zabj(this));
|
||||
}
|
||||
}
|
||||
|
||||
public final void e() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
if (this.j) {
|
||||
a();
|
||||
}
|
||||
}
|
||||
|
||||
public final Api.Client f() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final void g() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
if (this.j) {
|
||||
p();
|
||||
a(GoogleApiManager.this.e.b(GoogleApiManager.this.d) == 18 ? new Status(8, "Connection timed out while waiting for Google Play services update to complete.") : new Status(8, "API failed to connect while resuming due to an unknown error."));
|
||||
this.b.a();
|
||||
}
|
||||
}
|
||||
|
||||
public final void h() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
a(GoogleApiManager.m);
|
||||
this.e.b();
|
||||
for (ListenerHolder$ListenerKey listenerHolder$ListenerKey : (ListenerHolder$ListenerKey[]) this.g.keySet().toArray(new ListenerHolder$ListenerKey[this.g.size()])) {
|
||||
a(new zah(listenerHolder$ListenerKey, new TaskCompletionSource()));
|
||||
}
|
||||
d(new ConnectionResult(4));
|
||||
if (this.b.b()) {
|
||||
this.b.a(new zabm(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks
|
||||
public final void i(int i) {
|
||||
if (Looper.myLooper() == GoogleApiManager.this.l.getLooper()) {
|
||||
n();
|
||||
} else {
|
||||
GoogleApiManager.this.l.post(new zabk(this));
|
||||
}
|
||||
}
|
||||
|
||||
public final void j() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
this.l = null;
|
||||
}
|
||||
|
||||
public final ConnectionResult k() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
return this.l;
|
||||
}
|
||||
|
||||
public final boolean l() {
|
||||
return a(true);
|
||||
}
|
||||
|
||||
private final boolean b(com.google.android.gms.common.api.internal.zab zabVar) {
|
||||
if (!(zabVar instanceof com.google.android.gms.common.api.internal.zac)) {
|
||||
c(zabVar);
|
||||
return true;
|
||||
}
|
||||
com.google.android.gms.common.api.internal.zac zacVar = (com.google.android.gms.common.api.internal.zac) zabVar;
|
||||
Feature a = a(zacVar.b((zaa<?>) this));
|
||||
if (a == null) {
|
||||
c(zabVar);
|
||||
return true;
|
||||
}
|
||||
if (zacVar.c(this)) {
|
||||
zab zabVar2 = new zab(this.d, a, null);
|
||||
int indexOf = this.k.indexOf(zabVar2);
|
||||
if (indexOf >= 0) {
|
||||
zab zabVar3 = this.k.get(indexOf);
|
||||
GoogleApiManager.this.l.removeMessages(15, zabVar3);
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 15, zabVar3), GoogleApiManager.this.a);
|
||||
return false;
|
||||
}
|
||||
this.k.add(zabVar2);
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 15, zabVar2), GoogleApiManager.this.a);
|
||||
GoogleApiManager.this.l.sendMessageDelayed(Message.obtain(GoogleApiManager.this.l, 16, zabVar2), GoogleApiManager.this.b);
|
||||
ConnectionResult connectionResult = new ConnectionResult(2, null);
|
||||
if (c(connectionResult)) {
|
||||
return false;
|
||||
}
|
||||
GoogleApiManager.this.b(connectionResult, this.h);
|
||||
return false;
|
||||
}
|
||||
zacVar.a(new UnsupportedApiCallException(a));
|
||||
return false;
|
||||
}
|
||||
|
||||
private final void d(ConnectionResult connectionResult) {
|
||||
for (zak zakVar : this.f) {
|
||||
String str = null;
|
||||
if (Objects.a(connectionResult, ConnectionResult.RESULT_SUCCESS)) {
|
||||
str = this.b.e();
|
||||
}
|
||||
zakVar.a(this.d, connectionResult, str);
|
||||
}
|
||||
this.f.clear();
|
||||
}
|
||||
|
||||
public final Map<ListenerHolder$ListenerKey<?>, zabw> i() {
|
||||
return this.g;
|
||||
}
|
||||
|
||||
private final void c(com.google.android.gms.common.api.internal.zab zabVar) {
|
||||
zabVar.a(this.e, d());
|
||||
try {
|
||||
zabVar.a((zaa<?>) this);
|
||||
} catch (DeadObjectException unused) {
|
||||
i(1);
|
||||
this.b.a();
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean d() {
|
||||
return this.b.i();
|
||||
}
|
||||
|
||||
final boolean c() {
|
||||
return this.b.b();
|
||||
}
|
||||
|
||||
public final void a(com.google.android.gms.common.api.internal.zab zabVar) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
if (this.b.b()) {
|
||||
if (b(zabVar)) {
|
||||
q();
|
||||
return;
|
||||
} else {
|
||||
this.a.add(zabVar);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.a.add(zabVar);
|
||||
ConnectionResult connectionResult = this.l;
|
||||
if (connectionResult != null && connectionResult.hasResolution()) {
|
||||
a(this.l);
|
||||
} else {
|
||||
a();
|
||||
}
|
||||
}
|
||||
|
||||
public final int b() {
|
||||
return this.h;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void b(zab zabVar) {
|
||||
Feature[] b;
|
||||
if (this.k.remove(zabVar)) {
|
||||
GoogleApiManager.this.l.removeMessages(15, zabVar);
|
||||
GoogleApiManager.this.l.removeMessages(16, zabVar);
|
||||
Feature feature = zabVar.b;
|
||||
ArrayList arrayList = new ArrayList(this.a.size());
|
||||
for (com.google.android.gms.common.api.internal.zab zabVar2 : this.a) {
|
||||
if ((zabVar2 instanceof com.google.android.gms.common.api.internal.zac) && (b = ((com.google.android.gms.common.api.internal.zac) zabVar2).b((zaa<?>) this)) != null && ArrayUtils.a(b, feature)) {
|
||||
arrayList.add(zabVar2);
|
||||
}
|
||||
}
|
||||
int size = arrayList.size();
|
||||
int i = 0;
|
||||
while (i < size) {
|
||||
Object obj = arrayList.get(i);
|
||||
i++;
|
||||
com.google.android.gms.common.api.internal.zab zabVar3 = (com.google.android.gms.common.api.internal.zab) obj;
|
||||
this.a.remove(zabVar3);
|
||||
zabVar3.a(new UnsupportedApiCallException(feature));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final void a(Status status) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
Iterator<com.google.android.gms.common.api.internal.zab> it = this.a.iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().a(status);
|
||||
}
|
||||
this.a.clear();
|
||||
}
|
||||
|
||||
private final boolean a(boolean z) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
if (!this.b.b() || this.g.size() != 0) {
|
||||
return false;
|
||||
}
|
||||
if (!this.e.a()) {
|
||||
this.b.a();
|
||||
return true;
|
||||
}
|
||||
if (z) {
|
||||
q();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final void a() {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
if (this.b.b() || this.b.d()) {
|
||||
return;
|
||||
}
|
||||
int a = GoogleApiManager.this.f.a(GoogleApiManager.this.d, this.b);
|
||||
if (a != 0) {
|
||||
a(new ConnectionResult(a, null));
|
||||
return;
|
||||
}
|
||||
zac zacVar = GoogleApiManager.this.new zac(this.b, this.d);
|
||||
if (this.b.i()) {
|
||||
this.i.a(zacVar);
|
||||
}
|
||||
this.b.a(zacVar);
|
||||
}
|
||||
|
||||
public final void a(zak zakVar) {
|
||||
Preconditions.a(GoogleApiManager.this.l);
|
||||
this.f.add(zakVar);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final Feature a(Feature[] featureArr) {
|
||||
if (featureArr != null && featureArr.length != 0) {
|
||||
Feature[] h = this.b.h();
|
||||
if (h == null) {
|
||||
h = new Feature[0];
|
||||
}
|
||||
ArrayMap arrayMap = new ArrayMap(h.length);
|
||||
for (Feature feature : h) {
|
||||
arrayMap.put(feature.getName(), Long.valueOf(feature.getVersion()));
|
||||
}
|
||||
for (Feature feature2 : featureArr) {
|
||||
if (!arrayMap.containsKey(feature2.getName()) || ((Long) arrayMap.get(feature2.getName())).longValue() < feature2.getVersion()) {
|
||||
return feature2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void a(zab zabVar) {
|
||||
if (this.k.contains(zabVar) && !this.j) {
|
||||
if (!this.b.b()) {
|
||||
a();
|
||||
} else {
|
||||
o();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static /* synthetic */ boolean a(zaa zaaVar, boolean z) {
|
||||
return zaaVar.a(false);
|
||||
}
|
||||
}
|
||||
|
||||
private static class zab {
|
||||
private final zai<?> a;
|
||||
private final Feature b;
|
||||
|
||||
private zab(zai<?> zaiVar, Feature feature) {
|
||||
this.a = zaiVar;
|
||||
this.b = feature;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj != null && (obj instanceof zab)) {
|
||||
zab zabVar = (zab) obj;
|
||||
if (Objects.a(this.a, zabVar.a) && Objects.a(this.b, zabVar.b)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(this.a, this.b);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
Objects.ToStringHelper a = Objects.a(this);
|
||||
a.a("key", this.a);
|
||||
a.a("feature", this.b);
|
||||
return a.toString();
|
||||
}
|
||||
|
||||
/* synthetic */ zab(zai zaiVar, Feature feature, zabi zabiVar) {
|
||||
this(zaiVar, feature);
|
||||
}
|
||||
}
|
||||
|
||||
private final void a(GoogleApi<?> googleApi) {
|
||||
zai<?> c = googleApi.c();
|
||||
zaa<?> zaaVar = this.h.get(c);
|
||||
if (zaaVar == null) {
|
||||
zaaVar = new zaa<>(googleApi);
|
||||
this.h.put(c, zaaVar);
|
||||
}
|
||||
if (zaaVar.d()) {
|
||||
this.k.add(c);
|
||||
}
|
||||
zaaVar.a();
|
||||
}
|
||||
|
||||
public final void a() {
|
||||
Handler handler = this.l;
|
||||
handler.sendMessage(handler.obtainMessage(3));
|
||||
}
|
||||
|
||||
public final void a(ConnectionResult connectionResult, int i) {
|
||||
if (b(connectionResult, i)) {
|
||||
return;
|
||||
}
|
||||
Handler handler = this.l;
|
||||
handler.sendMessage(handler.obtainMessage(5, i, 0, connectionResult));
|
||||
}
|
||||
}
|
@@ -0,0 +1,75 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.text.TextUtils;
|
||||
import com.google.android.gms.common.R$string;
|
||||
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.zzp;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes.dex */
|
||||
public final class GoogleServices {
|
||||
private static final Object d = new Object();
|
||||
private static GoogleServices e;
|
||||
private final String a;
|
||||
private final Status b;
|
||||
private final boolean c;
|
||||
|
||||
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) {
|
||||
this.c = !(resources.getInteger(identifier) != 0);
|
||||
} else {
|
||||
this.c = false;
|
||||
}
|
||||
String a = zzp.a(context);
|
||||
a = a == null ? new StringResourceValueReader(context).a("google_app_id") : a;
|
||||
if (TextUtils.isEmpty(a)) {
|
||||
this.b = new Status(10, "Missing google app id value from from string resources with name google_app_id.");
|
||||
this.a = null;
|
||||
} else {
|
||||
this.a = a;
|
||||
this.b = Status.RESULT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
public static Status a(Context context) {
|
||||
Status status;
|
||||
Preconditions.a(context, "Context must not be null.");
|
||||
synchronized (d) {
|
||||
if (e == null) {
|
||||
e = new GoogleServices(context);
|
||||
}
|
||||
status = e.b;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public static boolean b() {
|
||||
return a("isMeasurementExplicitlyDisabled").c;
|
||||
}
|
||||
|
||||
public static String a() {
|
||||
return a("getGoogleAppId").a;
|
||||
}
|
||||
|
||||
private static GoogleServices a(String str) {
|
||||
GoogleServices googleServices;
|
||||
synchronized (d) {
|
||||
if (e != null) {
|
||||
googleServices = e;
|
||||
} else {
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 34);
|
||||
sb.append("Initialize must be called before ");
|
||||
sb.append(str);
|
||||
sb.append(".");
|
||||
throw new IllegalStateException(sb.toString());
|
||||
}
|
||||
}
|
||||
return googleServices;
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class LifecycleActivity {
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.Keep;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class LifecycleCallback {
|
||||
@Keep
|
||||
private static LifecycleFragment getChimeraLifecycleFragmentImpl(LifecycleActivity lifecycleActivity) {
|
||||
throw new IllegalStateException("Method not available in SDK.");
|
||||
}
|
||||
|
||||
public void a() {
|
||||
}
|
||||
|
||||
public void a(int i, int i2, Intent intent) {
|
||||
}
|
||||
|
||||
public void a(Bundle bundle) {
|
||||
}
|
||||
|
||||
public void a(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
}
|
||||
|
||||
public void b() {
|
||||
}
|
||||
|
||||
public void b(Bundle bundle) {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
}
|
||||
|
||||
public void d() {
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface LifecycleFragment {
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ListenerHolder$ListenerKey<L> {
|
||||
private final L a;
|
||||
private final String b;
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ListenerHolder$ListenerKey)) {
|
||||
return false;
|
||||
}
|
||||
ListenerHolder$ListenerKey listenerHolder$ListenerKey = (ListenerHolder$ListenerKey) obj;
|
||||
return this.a == listenerHolder$ListenerKey.a && this.b.equals(listenerHolder$ListenerKey.b);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return (System.identityHashCode(this.a) * 31) + this.b.hashCode();
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
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.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class RegisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
public abstract void a();
|
||||
|
||||
protected abstract void a(A a, TaskCompletionSource<Void> taskCompletionSource) throws RemoteException;
|
||||
|
||||
public abstract Feature[] b();
|
||||
|
||||
public final boolean c() {
|
||||
throw null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Api.AnyClient;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class UnregisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
protected abstract void a(A a, TaskCompletionSource<Boolean> taskCompletionSource) throws RemoteException;
|
||||
}
|
48
sources/com/google/android/gms/common/api/internal/zaab.java
Normal file
48
sources/com/google/android/gms/common/api/internal/zaab.java
Normal file
@@ -0,0 +1,48 @@
|
||||
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: classes.dex */
|
||||
public final class zaab {
|
||||
private final Map<BasePendingResult<?>, Boolean> a = Collections.synchronizedMap(new WeakHashMap());
|
||||
private final Map<TaskCompletionSource<?>, Boolean> b = Collections.synchronizedMap(new WeakHashMap());
|
||||
|
||||
final boolean a() {
|
||||
return (this.a.isEmpty() && this.b.isEmpty()) ? false : true;
|
||||
}
|
||||
|
||||
public final void b() {
|
||||
a(false, GoogleApiManager.m);
|
||||
}
|
||||
|
||||
public final void c() {
|
||||
a(true, zacp.a);
|
||||
}
|
||||
|
||||
private final void a(boolean z, Status status) {
|
||||
HashMap hashMap;
|
||||
HashMap hashMap2;
|
||||
synchronized (this.a) {
|
||||
hashMap = new HashMap(this.a);
|
||||
}
|
||||
synchronized (this.b) {
|
||||
hashMap2 = new HashMap(this.b);
|
||||
}
|
||||
for (Map.Entry entry : hashMap.entrySet()) {
|
||||
if (z || ((Boolean) entry.getValue()).booleanValue()) {
|
||||
((BasePendingResult) entry.getKey()).b(status);
|
||||
}
|
||||
}
|
||||
for (Map.Entry entry2 : hashMap2.entrySet()) {
|
||||
if (z || ((Boolean) entry2.getValue()).booleanValue()) {
|
||||
((TaskCompletionSource) entry2.getKey()).b((Exception) new ApiException(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class zaae extends zal {
|
||||
}
|
17
sources/com/google/android/gms/common/api/internal/zaaf.java
Normal file
17
sources/com/google/android/gms/common/api/internal/zaaf.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zaaf {
|
||||
private final zai<?> a;
|
||||
private final TaskCompletionSource<Boolean> b;
|
||||
|
||||
public final TaskCompletionSource<Boolean> a() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final zai<?> b() {
|
||||
return this.a;
|
||||
}
|
||||
}
|
32
sources/com/google/android/gms/common/api/internal/zab.java
Normal file
32
sources/com/google/android/gms/common/api/internal/zab.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.RemoteException;
|
||||
import android.os.TransactionTooLargeException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.util.PlatformVersion;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class zab {
|
||||
public zab(int i) {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static Status a(RemoteException remoteException) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (PlatformVersion.b() && (remoteException instanceof TransactionTooLargeException)) {
|
||||
sb.append("TransactionTooLargeException: ");
|
||||
}
|
||||
sb.append(remoteException.getLocalizedMessage());
|
||||
return new Status(8, sb.toString());
|
||||
}
|
||||
|
||||
public abstract void a(Status status);
|
||||
|
||||
public abstract void a(GoogleApiManager.zaa<?> zaaVar) throws DeadObjectException;
|
||||
|
||||
public abstract void a(zaab zaabVar, boolean z);
|
||||
|
||||
public abstract void a(RuntimeException runtimeException);
|
||||
}
|
17
sources/com/google/android/gms/common/api/internal/zabi.java
Normal file
17
sources/com/google/android/gms/common/api/internal/zabi.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.BackgroundDetector;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabi implements BackgroundDetector.BackgroundStateChangeListener {
|
||||
private final /* synthetic */ GoogleApiManager a;
|
||||
|
||||
zabi(GoogleApiManager googleApiManager) {
|
||||
this.a = googleApiManager;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BackgroundDetector.BackgroundStateChangeListener
|
||||
public final void a(boolean z) {
|
||||
this.a.l.sendMessage(this.a.l.obtainMessage(1, Boolean.valueOf(z)));
|
||||
}
|
||||
}
|
17
sources/com/google/android/gms/common/api/internal/zabj.java
Normal file
17
sources/com/google/android/gms/common/api/internal/zabj.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabj implements Runnable {
|
||||
private final /* synthetic */ GoogleApiManager.zaa a;
|
||||
|
||||
zabj(GoogleApiManager.zaa zaaVar) {
|
||||
this.a = zaaVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.a.m();
|
||||
}
|
||||
}
|
17
sources/com/google/android/gms/common/api/internal/zabk.java
Normal file
17
sources/com/google/android/gms/common/api/internal/zabk.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabk implements Runnable {
|
||||
private final /* synthetic */ GoogleApiManager.zaa a;
|
||||
|
||||
zabk(GoogleApiManager.zaa zaaVar) {
|
||||
this.a = zaaVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.a.n();
|
||||
}
|
||||
}
|
18
sources/com/google/android/gms/common/api/internal/zabm.java
Normal file
18
sources/com/google/android/gms/common/api/internal/zabm.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabm implements BaseGmsClient.SignOutCallbacks {
|
||||
final /* synthetic */ GoogleApiManager.zaa a;
|
||||
|
||||
zabm(GoogleApiManager.zaa zaaVar) {
|
||||
this.a = zaaVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.SignOutCallbacks
|
||||
public final void a() {
|
||||
GoogleApiManager.this.l.post(new zabn(this));
|
||||
}
|
||||
}
|
19
sources/com/google/android/gms/common/api/internal/zabn.java
Normal file
19
sources/com/google/android/gms/common/api/internal/zabn.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Api;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabn implements Runnable {
|
||||
private final /* synthetic */ zabm a;
|
||||
|
||||
zabn(zabm zabmVar) {
|
||||
this.a = zabmVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Api.Client client;
|
||||
client = this.a.a.b;
|
||||
client.a();
|
||||
}
|
||||
}
|
46
sources/com/google/android/gms/common/api/internal/zabo.java
Normal file
46
sources/com/google/android/gms/common/api/internal/zabo.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zabo implements Runnable {
|
||||
private final /* synthetic */ ConnectionResult a;
|
||||
private final /* synthetic */ GoogleApiManager.zac b;
|
||||
|
||||
zabo(GoogleApiManager.zac zacVar, ConnectionResult connectionResult) {
|
||||
this.b = zacVar;
|
||||
this.a = connectionResult;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zai zaiVar;
|
||||
Api.Client client;
|
||||
zai zaiVar2;
|
||||
Api.Client client2;
|
||||
if (!this.a.isSuccess()) {
|
||||
Map map = GoogleApiManager.this.h;
|
||||
zaiVar = this.b.b;
|
||||
((GoogleApiManager.zaa) map.get(zaiVar)).a(this.a);
|
||||
return;
|
||||
}
|
||||
GoogleApiManager.zac.a(this.b, true);
|
||||
client = this.b.a;
|
||||
if (client.i()) {
|
||||
this.b.a();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
client2 = this.b.a;
|
||||
client2.a(null, Collections.emptySet());
|
||||
} catch (SecurityException unused) {
|
||||
Map map2 = GoogleApiManager.this.h;
|
||||
zaiVar2 = this.b.b;
|
||||
((GoogleApiManager.zaa) map2.get(zaiVar2)).a(new ConnectionResult(10));
|
||||
}
|
||||
}
|
||||
}
|
28
sources/com/google/android/gms/common/api/internal/zabq.java
Normal file
28
sources/com/google/android/gms/common/api/internal/zabq.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zabq extends BroadcastReceiver {
|
||||
private Context a;
|
||||
private final zabr b;
|
||||
|
||||
public final synchronized void a() {
|
||||
if (this.a != null) {
|
||||
this.a.unregisterReceiver(this);
|
||||
}
|
||||
this.a = null;
|
||||
}
|
||||
|
||||
@Override // android.content.BroadcastReceiver
|
||||
public final void onReceive(Context context, Intent intent) {
|
||||
Uri data = intent.getData();
|
||||
if ("com.google.android.gms".equals(data != null ? data.getSchemeSpecificPart() : null)) {
|
||||
this.b.a();
|
||||
a();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class zabr {
|
||||
public abstract void a();
|
||||
}
|
10
sources/com/google/android/gms/common/api/internal/zabv.java
Normal file
10
sources/com/google/android/gms/common/api/internal/zabv.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zabv {
|
||||
public final zab a;
|
||||
public final int b;
|
||||
public final GoogleApi<?> c;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Api;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zabw {
|
||||
public final RegisterListenerMethod<Api.AnyClient, ?> a;
|
||||
public final UnregisterListenerMethod<Api.AnyClient, ?> b;
|
||||
}
|
15
sources/com/google/android/gms/common/api/internal/zac.java
Normal file
15
sources/com/google/android/gms/common/api/internal/zac.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class zac extends zab {
|
||||
public zac(int i) {
|
||||
super(i);
|
||||
}
|
||||
|
||||
public abstract Feature[] b(GoogleApiManager.zaa<?> zaaVar);
|
||||
|
||||
public abstract boolean c(GoogleApiManager.zaa<?> zaaVar);
|
||||
}
|
114
sources/com/google/android/gms/common/api/internal/zace.java
Normal file
114
sources/com/google/android/gms/common/api/internal/zace.java
Normal file
@@ -0,0 +1,114 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ResolveAccountResponse;
|
||||
import com.google.android.gms.signin.SignInOptions;
|
||||
import com.google.android.gms.signin.internal.zaj;
|
||||
import com.google.android.gms.signin.zaa;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zace extends com.google.android.gms.signin.internal.zac implements GoogleApiClient$ConnectionCallbacks, GoogleApiClient$OnConnectionFailedListener {
|
||||
private static Api.AbstractClientBuilder<? extends com.google.android.gms.signin.zad, SignInOptions> h = zaa.c;
|
||||
private final Context a;
|
||||
private final Handler b;
|
||||
private final Api.AbstractClientBuilder<? extends com.google.android.gms.signin.zad, SignInOptions> c;
|
||||
private Set<Scope> d;
|
||||
private ClientSettings e;
|
||||
private com.google.android.gms.signin.zad f;
|
||||
private zach g;
|
||||
|
||||
public zace(Context context, Handler handler, ClientSettings clientSettings) {
|
||||
this(context, handler, clientSettings, h);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void b(zaj zajVar) {
|
||||
ConnectionResult connectionResult = zajVar.getConnectionResult();
|
||||
if (connectionResult.isSuccess()) {
|
||||
ResolveAccountResponse zacw = zajVar.zacw();
|
||||
ConnectionResult connectionResult2 = zacw.getConnectionResult();
|
||||
if (!connectionResult2.isSuccess()) {
|
||||
String valueOf = String.valueOf(connectionResult2);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 48);
|
||||
sb.append("Sign-in succeeded with resolve account failure: ");
|
||||
sb.append(valueOf);
|
||||
Log.wtf("SignInCoordinator", sb.toString(), new Exception());
|
||||
this.g.b(connectionResult2);
|
||||
this.f.a();
|
||||
return;
|
||||
}
|
||||
this.g.a(zacw.getAccountAccessor(), this.d);
|
||||
} else {
|
||||
this.g.b(connectionResult);
|
||||
}
|
||||
this.f.a();
|
||||
}
|
||||
|
||||
public final void a(zach zachVar) {
|
||||
com.google.android.gms.signin.zad zadVar = this.f;
|
||||
if (zadVar != null) {
|
||||
zadVar.a();
|
||||
}
|
||||
this.e.a(Integer.valueOf(System.identityHashCode(this)));
|
||||
Api.AbstractClientBuilder<? extends com.google.android.gms.signin.zad, SignInOptions> abstractClientBuilder = this.c;
|
||||
Context context = this.a;
|
||||
Looper looper = this.b.getLooper();
|
||||
ClientSettings clientSettings = this.e;
|
||||
this.f = abstractClientBuilder.a(context, looper, clientSettings, clientSettings.h(), this, this);
|
||||
this.g = zachVar;
|
||||
Set<Scope> set = this.d;
|
||||
if (set == null || set.isEmpty()) {
|
||||
this.b.post(new zacf(this));
|
||||
} else {
|
||||
this.f.c();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks
|
||||
public final void d(Bundle bundle) {
|
||||
this.f.a(this);
|
||||
}
|
||||
|
||||
public final void i() {
|
||||
com.google.android.gms.signin.zad zadVar = this.f;
|
||||
if (zadVar != null) {
|
||||
zadVar.a();
|
||||
}
|
||||
}
|
||||
|
||||
public zace(Context context, Handler handler, ClientSettings clientSettings, Api.AbstractClientBuilder<? extends com.google.android.gms.signin.zad, SignInOptions> abstractClientBuilder) {
|
||||
this.a = context;
|
||||
this.b = handler;
|
||||
Preconditions.a(clientSettings, "ClientSettings must not be null");
|
||||
this.e = clientSettings;
|
||||
this.d = clientSettings.g();
|
||||
this.c = abstractClientBuilder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks
|
||||
public final void i(int i) {
|
||||
this.f.a();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener
|
||||
public final void a(ConnectionResult connectionResult) {
|
||||
this.g.b(connectionResult);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.signin.internal.zad
|
||||
public final void a(zaj zajVar) {
|
||||
this.b.post(new zacg(this, zajVar));
|
||||
}
|
||||
}
|
19
sources/com/google/android/gms/common/api/internal/zacf.java
Normal file
19
sources/com/google/android/gms/common/api/internal/zacf.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zacf implements Runnable {
|
||||
private final /* synthetic */ zace a;
|
||||
|
||||
zacf(zace zaceVar) {
|
||||
this.a = zaceVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zach zachVar;
|
||||
zachVar = this.a.g;
|
||||
zachVar.b(new ConnectionResult(4));
|
||||
}
|
||||
}
|
19
sources/com/google/android/gms/common/api/internal/zacg.java
Normal file
19
sources/com/google/android/gms/common/api/internal/zacg.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.signin.internal.zaj;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zacg implements Runnable {
|
||||
private final /* synthetic */ zaj a;
|
||||
private final /* synthetic */ zace b;
|
||||
|
||||
zacg(zace zaceVar, zaj zajVar) {
|
||||
this.b = zaceVar;
|
||||
this.a = zajVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.b.b(this.a);
|
||||
}
|
||||
}
|
13
sources/com/google/android/gms/common/api/internal/zach.java
Normal file
13
sources/com/google/android/gms/common/api/internal/zach.java
Normal file
@@ -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.api.Scope;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface zach {
|
||||
void a(IAccountAccessor iAccountAccessor, Set<Scope> set);
|
||||
|
||||
void b(ConnectionResult connectionResult);
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zacp {
|
||||
public static final Status a = new Status(8, "The connection to Google Play services was lost");
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
interface zacs {
|
||||
void a(BasePendingResult<?> basePendingResult);
|
||||
}
|
48
sources/com/google/android/gms/common/api/internal/zad.java
Normal file
48
sources/com/google/android/gms/common/api/internal/zad.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class zad<T> extends zac {
|
||||
protected final TaskCompletionSource<T> a;
|
||||
|
||||
public zad(int i, TaskCompletionSource<T> taskCompletionSource) {
|
||||
super(i);
|
||||
this.a = taskCompletionSource;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zab
|
||||
public void a(Status status) {
|
||||
this.a.b(new ApiException(status));
|
||||
}
|
||||
|
||||
protected abstract void d(GoogleApiManager.zaa<?> zaaVar) throws RemoteException;
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zab
|
||||
public void a(RuntimeException runtimeException) {
|
||||
this.a.b(runtimeException);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zab
|
||||
public final void a(GoogleApiManager.zaa<?> zaaVar) throws DeadObjectException {
|
||||
Status a;
|
||||
Status a2;
|
||||
try {
|
||||
d(zaaVar);
|
||||
} catch (DeadObjectException e) {
|
||||
a2 = zab.a(e);
|
||||
a(a2);
|
||||
throw e;
|
||||
} catch (RemoteException e2) {
|
||||
a = zab.a(e2);
|
||||
a(a);
|
||||
} catch (RuntimeException e3) {
|
||||
a(e3);
|
||||
}
|
||||
}
|
||||
}
|
46
sources/com/google/android/gms/common/api/internal/zah.java
Normal file
46
sources/com/google/android/gms/common/api/internal/zah.java
Normal file
@@ -0,0 +1,46 @@
|
||||
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.api.internal.GoogleApiManager;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zah extends zad<Boolean> {
|
||||
private final ListenerHolder$ListenerKey<?> b;
|
||||
|
||||
public zah(ListenerHolder$ListenerKey<?> listenerHolder$ListenerKey, TaskCompletionSource<Boolean> taskCompletionSource) {
|
||||
super(4, taskCompletionSource);
|
||||
this.b = listenerHolder$ListenerKey;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zab
|
||||
public final /* bridge */ /* synthetic */ void a(zaab zaabVar, boolean z) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zac
|
||||
public final Feature[] b(GoogleApiManager.zaa<?> zaaVar) {
|
||||
zabw zabwVar = zaaVar.i().get(this.b);
|
||||
if (zabwVar == null) {
|
||||
return null;
|
||||
}
|
||||
return zabwVar.a.b();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zac
|
||||
public final boolean c(GoogleApiManager.zaa<?> zaaVar) {
|
||||
zabw zabwVar = zaaVar.i().get(this.b);
|
||||
return zabwVar != null && zabwVar.a.c();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zad
|
||||
public final void d(GoogleApiManager.zaa<?> zaaVar) throws RemoteException {
|
||||
zabw remove = zaaVar.i().remove(this.b);
|
||||
if (remove == null) {
|
||||
this.a.b((TaskCompletionSource<T>) false);
|
||||
} else {
|
||||
remove.b.a(zaaVar.f(), this.a);
|
||||
remove.a.a();
|
||||
}
|
||||
}
|
||||
}
|
32
sources/com/google/android/gms/common/api/internal/zai.java
Normal file
32
sources/com/google/android/gms/common/api/internal/zai.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zai<O extends Api.ApiOptions> {
|
||||
private final boolean a;
|
||||
private final int b;
|
||||
private final Api<O> c;
|
||||
private final O d;
|
||||
|
||||
public final String a() {
|
||||
return this.c.a();
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof zai)) {
|
||||
return false;
|
||||
}
|
||||
zai zaiVar = (zai) obj;
|
||||
return !this.a && !zaiVar.a && Objects.a(this.c, zaiVar.c) && Objects.a(this.d, zaiVar.d);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return this.b;
|
||||
}
|
||||
}
|
37
sources/com/google/android/gms/common/api/internal/zak.java
Normal file
37
sources/com/google/android/gms/common/api/internal/zak.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import androidx.collection.ArrayMap;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.AvailabilityException;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zak {
|
||||
private final ArrayMap<zai<?>, ConnectionResult> a;
|
||||
private final ArrayMap<zai<?>, String> b;
|
||||
private final TaskCompletionSource<Map<zai<?>, String>> c;
|
||||
private int d;
|
||||
private boolean e;
|
||||
|
||||
public final Set<zai<?>> a() {
|
||||
return this.a.keySet();
|
||||
}
|
||||
|
||||
public final void a(zai<?> zaiVar, ConnectionResult connectionResult, String str) {
|
||||
this.a.put(zaiVar, connectionResult);
|
||||
this.b.put(zaiVar, str);
|
||||
this.d--;
|
||||
if (!connectionResult.isSuccess()) {
|
||||
this.e = true;
|
||||
}
|
||||
if (this.d == 0) {
|
||||
if (!this.e) {
|
||||
this.c.a((TaskCompletionSource<Map<zai<?>, String>>) this.b);
|
||||
} else {
|
||||
this.c.a(new AvailabilityException(this.a));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
sources/com/google/android/gms/common/api/internal/zal.java
Normal file
11
sources/com/google/android/gms/common/api/internal/zal.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class zal extends LifecycleCallback implements DialogInterface.OnCancelListener {
|
||||
public final void a(ConnectionResult connectionResult, int i) {
|
||||
throw null;
|
||||
}
|
||||
}
|
12
sources/com/google/android/gms/common/api/internal/zap.java
Normal file
12
sources/com/google/android/gms/common/api/internal/zap.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zap extends ThreadLocal<Boolean> {
|
||||
zap() {
|
||||
}
|
||||
|
||||
@Override // java.lang.ThreadLocal
|
||||
protected final /* synthetic */ Boolean initialValue() {
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface zar extends GoogleApiClient$ConnectionCallbacks {
|
||||
}
|
95
sources/com/google/android/gms/common/api/internal/zza.java
Normal file
95
sources/com/google/android/gms/common/api/internal/zza.java
Normal file
@@ -0,0 +1,95 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Fragment;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.collection.ArrayMap;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zza extends Fragment implements LifecycleFragment {
|
||||
private Map<String, LifecycleCallback> a = new ArrayMap();
|
||||
|
||||
static {
|
||||
new WeakHashMap();
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
super.dump(str, fileDescriptor, printWriter, strArr);
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().a(str, fileDescriptor, printWriter, strArr);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onActivityResult(int i, int i2, Intent intent) {
|
||||
super.onActivityResult(i, i2, intent);
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().a(i, i2, intent);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onCreate(Bundle bundle) {
|
||||
super.onCreate(bundle);
|
||||
for (Map.Entry<String, LifecycleCallback> entry : this.a.entrySet()) {
|
||||
entry.getValue().a(bundle != null ? bundle.getBundle(entry.getKey()) : null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onDestroy() {
|
||||
super.onDestroy();
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().a();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onResume() {
|
||||
super.onResume();
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().b();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onSaveInstanceState(Bundle bundle) {
|
||||
super.onSaveInstanceState(bundle);
|
||||
if (bundle == null) {
|
||||
return;
|
||||
}
|
||||
for (Map.Entry<String, LifecycleCallback> entry : this.a.entrySet()) {
|
||||
Bundle bundle2 = new Bundle();
|
||||
entry.getValue().b(bundle2);
|
||||
bundle.putBundle(entry.getKey(), bundle2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onStart() {
|
||||
super.onStart();
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().c();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Fragment
|
||||
public final void onStop() {
|
||||
super.onStop();
|
||||
Iterator<LifecycleCallback> it = this.a.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
it.next().d();
|
||||
}
|
||||
}
|
||||
}
|
33
sources/com/google/android/gms/common/api/zza.java
Normal file
33
sources/com/google/android/gms/common/api/zza.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zza implements Parcelable.Creator<Scope> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Scope createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
String str = null;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 != 2) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
str = SafeParcelReader.n(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new Scope(i, str);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Scope[] newArray(int i) {
|
||||
return new Scope[i];
|
||||
}
|
||||
}
|
40
sources/com/google/android/gms/common/api/zzb.java
Normal file
40
sources/com/google/android/gms/common/api/zzb.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.api;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zzb implements Parcelable.Creator<Status> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Status createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
String str = null;
|
||||
PendingIntent pendingIntent = null;
|
||||
int i2 = 0;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 == 2) {
|
||||
str = SafeParcelReader.n(parcel, a);
|
||||
} else if (a2 == 3) {
|
||||
pendingIntent = (PendingIntent) SafeParcelReader.a(parcel, a, PendingIntent.CREATOR);
|
||||
} else if (a2 != 1000) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new Status(i, i2, str, pendingIntent);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ Status[] newArray(int i) {
|
||||
return new Status[i];
|
||||
}
|
||||
}
|
149
sources/com/google/android/gms/common/data/BitmapTeleporter.java
Normal file
149
sources/com/google/android/gms/common/data/BitmapTeleporter.java
Normal file
@@ -0,0 +1,149 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Parcel;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
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 java.io.BufferedOutputStream;
|
||||
import java.io.Closeable;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class BitmapTeleporter extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public static final Parcelable.Creator<BitmapTeleporter> CREATOR = new zaa();
|
||||
private final int mType;
|
||||
private final int zale;
|
||||
private ParcelFileDescriptor zalf;
|
||||
private Bitmap zalg;
|
||||
private boolean zalh;
|
||||
private File zali;
|
||||
|
||||
BitmapTeleporter(int i, ParcelFileDescriptor parcelFileDescriptor, int i2) {
|
||||
this.zale = i;
|
||||
this.zalf = parcelFileDescriptor;
|
||||
this.mType = i2;
|
||||
this.zalg = null;
|
||||
this.zalh = false;
|
||||
}
|
||||
|
||||
private static void zaa(Closeable closeable) {
|
||||
try {
|
||||
closeable.close();
|
||||
} catch (IOException e) {
|
||||
Log.w("BitmapTeleporter", "Could not close stream", e);
|
||||
}
|
||||
}
|
||||
|
||||
private final FileOutputStream zabz() {
|
||||
File file = this.zali;
|
||||
if (file == null) {
|
||||
throw new IllegalStateException("setTempDir() must be called before writing this object to a parcel");
|
||||
}
|
||||
try {
|
||||
File createTempFile = File.createTempFile("teleporter", ".tmp", file);
|
||||
try {
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(createTempFile);
|
||||
this.zalf = ParcelFileDescriptor.open(createTempFile, 268435456);
|
||||
createTempFile.delete();
|
||||
return fileOutputStream;
|
||||
} catch (FileNotFoundException unused) {
|
||||
throw new IllegalStateException("Temporary file is somehow already deleted");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException("Could not create temporary file", e);
|
||||
}
|
||||
}
|
||||
|
||||
public Bitmap get() {
|
||||
if (!this.zalh) {
|
||||
DataInputStream dataInputStream = new DataInputStream(new ParcelFileDescriptor.AutoCloseInputStream(this.zalf));
|
||||
try {
|
||||
try {
|
||||
byte[] bArr = new byte[dataInputStream.readInt()];
|
||||
int readInt = dataInputStream.readInt();
|
||||
int readInt2 = dataInputStream.readInt();
|
||||
Bitmap.Config valueOf = Bitmap.Config.valueOf(dataInputStream.readUTF());
|
||||
dataInputStream.read(bArr);
|
||||
zaa(dataInputStream);
|
||||
ByteBuffer wrap = ByteBuffer.wrap(bArr);
|
||||
Bitmap createBitmap = Bitmap.createBitmap(readInt, readInt2, valueOf);
|
||||
createBitmap.copyPixelsFromBuffer(wrap);
|
||||
this.zalg = createBitmap;
|
||||
this.zalh = true;
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException("Could not read from parcel file descriptor", e);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
zaa(dataInputStream);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
return this.zalg;
|
||||
}
|
||||
|
||||
public void release() {
|
||||
if (this.zalh) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
this.zalf.close();
|
||||
} catch (IOException e) {
|
||||
Log.w("BitmapTeleporter", "Could not close PFD", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void setTempDir(File file) {
|
||||
if (file == null) {
|
||||
throw new NullPointerException("Cannot set null temp directory");
|
||||
}
|
||||
this.zali = file;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
if (this.zalf == null) {
|
||||
Bitmap bitmap = this.zalg;
|
||||
ByteBuffer allocate = ByteBuffer.allocate(bitmap.getRowBytes() * bitmap.getHeight());
|
||||
bitmap.copyPixelsToBuffer(allocate);
|
||||
byte[] array = allocate.array();
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(new BufferedOutputStream(zabz()));
|
||||
try {
|
||||
try {
|
||||
dataOutputStream.writeInt(array.length);
|
||||
dataOutputStream.writeInt(bitmap.getWidth());
|
||||
dataOutputStream.writeInt(bitmap.getHeight());
|
||||
dataOutputStream.writeUTF(bitmap.getConfig().toString());
|
||||
dataOutputStream.write(array);
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException("Could not write into unlinked file", e);
|
||||
}
|
||||
} finally {
|
||||
zaa(dataOutputStream);
|
||||
}
|
||||
}
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zale);
|
||||
SafeParcelWriter.a(parcel, 2, (Parcelable) this.zalf, i | 1, false);
|
||||
SafeParcelWriter.a(parcel, 3, this.mType);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
this.zalf = null;
|
||||
}
|
||||
|
||||
public BitmapTeleporter(Bitmap bitmap) {
|
||||
this.zale = 1;
|
||||
this.zalf = null;
|
||||
this.mType = 0;
|
||||
this.zalg = bitmap;
|
||||
this.zalh = true;
|
||||
}
|
||||
}
|
416
sources/com/google/android/gms/common/data/DataHolder.java
Normal file
416
sources/com/google/android/gms/common/data/DataHolder.java
Normal file
@@ -0,0 +1,416 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.database.CharArrayBuffer;
|
||||
import android.database.Cursor;
|
||||
import android.database.CursorIndexOutOfBoundsException;
|
||||
import android.database.CursorWindow;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import com.google.android.gms.common.sqlite.CursorWrapper;
|
||||
import java.io.Closeable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes.dex */
|
||||
public final class DataHolder extends AbstractSafeParcelable implements Closeable {
|
||||
public static final Parcelable.Creator<DataHolder> CREATOR = new zac();
|
||||
private static final Builder zalx = new zab(new String[0], null);
|
||||
private boolean mClosed;
|
||||
private final int zale;
|
||||
private final String[] zalp;
|
||||
private Bundle zalq;
|
||||
private final CursorWindow[] zalr;
|
||||
private final int zals;
|
||||
private final Bundle zalt;
|
||||
private int[] zalu;
|
||||
private int zalv;
|
||||
private boolean zalw;
|
||||
|
||||
public static class zaa extends RuntimeException {
|
||||
public zaa(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
||||
|
||||
DataHolder(int i, String[] strArr, CursorWindow[] cursorWindowArr, int i2, Bundle bundle) {
|
||||
this.mClosed = false;
|
||||
this.zalw = true;
|
||||
this.zale = i;
|
||||
this.zalp = strArr;
|
||||
this.zalr = cursorWindowArr;
|
||||
this.zals = i2;
|
||||
this.zalt = bundle;
|
||||
}
|
||||
|
||||
public static Builder builder(String[] strArr) {
|
||||
return new Builder(strArr, null, 0 == true ? 1 : 0);
|
||||
}
|
||||
|
||||
public static DataHolder empty(int i) {
|
||||
return new DataHolder(zalx, i, (Bundle) null);
|
||||
}
|
||||
|
||||
private static CursorWindow[] zaa(CursorWrapper cursorWrapper) {
|
||||
int i;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
try {
|
||||
int count = cursorWrapper.getCount();
|
||||
CursorWindow window = cursorWrapper.getWindow();
|
||||
if (window == null || window.getStartPosition() != 0) {
|
||||
i = 0;
|
||||
} else {
|
||||
window.acquireReference();
|
||||
cursorWrapper.a(null);
|
||||
arrayList.add(window);
|
||||
i = window.getNumRows();
|
||||
}
|
||||
while (i < count) {
|
||||
if (!cursorWrapper.moveToPosition(i)) {
|
||||
break;
|
||||
}
|
||||
CursorWindow window2 = cursorWrapper.getWindow();
|
||||
if (window2 != null) {
|
||||
window2.acquireReference();
|
||||
cursorWrapper.a(null);
|
||||
} else {
|
||||
window2 = new CursorWindow(false);
|
||||
window2.setStartPosition(i);
|
||||
cursorWrapper.fillWindow(i, window2);
|
||||
}
|
||||
if (window2.getNumRows() == 0) {
|
||||
break;
|
||||
}
|
||||
arrayList.add(window2);
|
||||
i = window2.getStartPosition() + window2.getNumRows();
|
||||
}
|
||||
cursorWrapper.close();
|
||||
return (CursorWindow[]) arrayList.toArray(new CursorWindow[arrayList.size()]);
|
||||
} catch (Throwable th) {
|
||||
cursorWrapper.close();
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.io.Closeable, java.lang.AutoCloseable
|
||||
public final void close() {
|
||||
synchronized (this) {
|
||||
if (!this.mClosed) {
|
||||
this.mClosed = true;
|
||||
for (int i = 0; i < this.zalr.length; i++) {
|
||||
this.zalr[i].close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected final void finalize() throws Throwable {
|
||||
try {
|
||||
if (this.zalw && this.zalr.length > 0 && !isClosed()) {
|
||||
close();
|
||||
String obj = toString();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(obj).length() + 178);
|
||||
sb.append("Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them. (internal object: ");
|
||||
sb.append(obj);
|
||||
sb.append(")");
|
||||
Log.e("DataBuffer", sb.toString());
|
||||
}
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean getBoolean(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return Long.valueOf(this.zalr[i2].getLong(i, this.zalq.getInt(str))).longValue() == 1;
|
||||
}
|
||||
|
||||
public final byte[] getByteArray(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getBlob(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final int getCount() {
|
||||
return this.zalv;
|
||||
}
|
||||
|
||||
public final int getInteger(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getInt(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final long getLong(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getLong(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final Bundle getMetadata() {
|
||||
return this.zalt;
|
||||
}
|
||||
|
||||
public final int getStatusCode() {
|
||||
return this.zals;
|
||||
}
|
||||
|
||||
public final String getString(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getString(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final int getWindowIndex(int i) {
|
||||
int i2 = 0;
|
||||
Preconditions.b(i >= 0 && i < this.zalv);
|
||||
while (true) {
|
||||
int[] iArr = this.zalu;
|
||||
if (i2 >= iArr.length) {
|
||||
break;
|
||||
}
|
||||
if (i < iArr[i2]) {
|
||||
i2--;
|
||||
break;
|
||||
}
|
||||
i2++;
|
||||
}
|
||||
return i2 == this.zalu.length ? i2 - 1 : i2;
|
||||
}
|
||||
|
||||
public final boolean hasColumn(String str) {
|
||||
return this.zalq.containsKey(str);
|
||||
}
|
||||
|
||||
public final boolean hasNull(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].isNull(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final boolean isClosed() {
|
||||
boolean z;
|
||||
synchronized (this) {
|
||||
z = this.mClosed;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zalp, false);
|
||||
SafeParcelWriter.a(parcel, 2, (Parcelable[]) this.zalr, i, false);
|
||||
SafeParcelWriter.a(parcel, 3, getStatusCode());
|
||||
SafeParcelWriter.a(parcel, 4, getMetadata(), false);
|
||||
SafeParcelWriter.a(parcel, 1000, this.zale);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
if ((i & 1) != 0) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
public final double zab(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getDouble(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final void zaca() {
|
||||
this.zalq = new Bundle();
|
||||
int i = 0;
|
||||
int i2 = 0;
|
||||
while (true) {
|
||||
String[] strArr = this.zalp;
|
||||
if (i2 >= strArr.length) {
|
||||
break;
|
||||
}
|
||||
this.zalq.putInt(strArr[i2], i2);
|
||||
i2++;
|
||||
}
|
||||
this.zalu = new int[this.zalr.length];
|
||||
int i3 = 0;
|
||||
while (true) {
|
||||
CursorWindow[] cursorWindowArr = this.zalr;
|
||||
if (i >= cursorWindowArr.length) {
|
||||
this.zalv = i3;
|
||||
return;
|
||||
}
|
||||
this.zalu[i] = i3;
|
||||
i3 += this.zalr[i].getNumRows() - (i3 - cursorWindowArr[i].getStartPosition());
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private final String[] a;
|
||||
private final ArrayList<HashMap<String, Object>> b;
|
||||
|
||||
private Builder(String[] strArr, String str) {
|
||||
Preconditions.a(strArr);
|
||||
this.a = strArr;
|
||||
this.b = new ArrayList<>();
|
||||
new HashMap();
|
||||
}
|
||||
|
||||
/* synthetic */ Builder(String[] strArr, String str, zab zabVar) {
|
||||
this(strArr, null);
|
||||
}
|
||||
}
|
||||
|
||||
public DataHolder(String[] strArr, CursorWindow[] cursorWindowArr, int i, Bundle bundle) {
|
||||
this.mClosed = false;
|
||||
this.zalw = true;
|
||||
this.zale = 1;
|
||||
Preconditions.a(strArr);
|
||||
this.zalp = strArr;
|
||||
Preconditions.a(cursorWindowArr);
|
||||
this.zalr = cursorWindowArr;
|
||||
this.zals = i;
|
||||
this.zalt = bundle;
|
||||
zaca();
|
||||
}
|
||||
|
||||
private DataHolder(CursorWrapper cursorWrapper, int i, Bundle bundle) {
|
||||
this(cursorWrapper.getColumnNames(), zaa(cursorWrapper), i, bundle);
|
||||
}
|
||||
|
||||
public DataHolder(Cursor cursor, int i, Bundle bundle) {
|
||||
this(new CursorWrapper(cursor), i, bundle);
|
||||
}
|
||||
|
||||
private DataHolder(Builder builder, int i, Bundle bundle) {
|
||||
this(builder.a, zaa(builder, -1), i, (Bundle) null);
|
||||
}
|
||||
|
||||
private DataHolder(Builder builder, int i, Bundle bundle, int i2) {
|
||||
this(builder.a, zaa(builder, -1), i, bundle);
|
||||
}
|
||||
|
||||
/* synthetic */ DataHolder(Builder builder, int i, Bundle bundle, zab zabVar) {
|
||||
this(builder, i, (Bundle) null);
|
||||
}
|
||||
|
||||
private static CursorWindow[] zaa(Builder builder, int i) {
|
||||
if (builder.a.length == 0) {
|
||||
return new CursorWindow[0];
|
||||
}
|
||||
List subList = (i < 0 || i >= builder.b.size()) ? builder.b : builder.b.subList(0, i);
|
||||
int size = subList.size();
|
||||
CursorWindow cursorWindow = new CursorWindow(false);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.add(cursorWindow);
|
||||
cursorWindow.setNumColumns(builder.a.length);
|
||||
CursorWindow cursorWindow2 = cursorWindow;
|
||||
int i2 = 0;
|
||||
boolean z = false;
|
||||
while (i2 < size) {
|
||||
try {
|
||||
if (!cursorWindow2.allocRow()) {
|
||||
StringBuilder sb = new StringBuilder(72);
|
||||
sb.append("Allocating additional cursor window for large data set (row ");
|
||||
sb.append(i2);
|
||||
sb.append(")");
|
||||
Log.d("DataHolder", sb.toString());
|
||||
cursorWindow2 = new CursorWindow(false);
|
||||
cursorWindow2.setStartPosition(i2);
|
||||
cursorWindow2.setNumColumns(builder.a.length);
|
||||
arrayList.add(cursorWindow2);
|
||||
if (!cursorWindow2.allocRow()) {
|
||||
Log.e("DataHolder", "Unable to allocate row to hold data.");
|
||||
arrayList.remove(cursorWindow2);
|
||||
return (CursorWindow[]) arrayList.toArray(new CursorWindow[arrayList.size()]);
|
||||
}
|
||||
}
|
||||
Map map = (Map) subList.get(i2);
|
||||
boolean z2 = true;
|
||||
for (int i3 = 0; i3 < builder.a.length && z2; i3++) {
|
||||
String str = builder.a[i3];
|
||||
Object obj = map.get(str);
|
||||
if (obj == null) {
|
||||
z2 = cursorWindow2.putNull(i2, i3);
|
||||
} else if (obj instanceof String) {
|
||||
z2 = cursorWindow2.putString((String) obj, i2, i3);
|
||||
} else if (obj instanceof Long) {
|
||||
z2 = cursorWindow2.putLong(((Long) obj).longValue(), i2, i3);
|
||||
} else if (obj instanceof Integer) {
|
||||
z2 = cursorWindow2.putLong(((Integer) obj).intValue(), i2, i3);
|
||||
} else if (obj instanceof Boolean) {
|
||||
z2 = cursorWindow2.putLong(((Boolean) obj).booleanValue() ? 1L : 0L, i2, i3);
|
||||
} else if (obj instanceof byte[]) {
|
||||
z2 = cursorWindow2.putBlob((byte[]) obj, i2, i3);
|
||||
} else if (obj instanceof Double) {
|
||||
z2 = cursorWindow2.putDouble(((Double) obj).doubleValue(), i2, i3);
|
||||
} else if (obj instanceof Float) {
|
||||
z2 = cursorWindow2.putDouble(((Float) obj).floatValue(), i2, i3);
|
||||
} else {
|
||||
String valueOf = String.valueOf(obj);
|
||||
StringBuilder sb2 = new StringBuilder(String.valueOf(str).length() + 32 + String.valueOf(valueOf).length());
|
||||
sb2.append("Unsupported object for column ");
|
||||
sb2.append(str);
|
||||
sb2.append(": ");
|
||||
sb2.append(valueOf);
|
||||
throw new IllegalArgumentException(sb2.toString());
|
||||
}
|
||||
}
|
||||
if (z2) {
|
||||
z = false;
|
||||
} else if (!z) {
|
||||
StringBuilder sb3 = new StringBuilder(74);
|
||||
sb3.append("Couldn't populate window data for row ");
|
||||
sb3.append(i2);
|
||||
sb3.append(" - allocating new window.");
|
||||
Log.d("DataHolder", sb3.toString());
|
||||
cursorWindow2.freeLastRow();
|
||||
cursorWindow2 = new CursorWindow(false);
|
||||
cursorWindow2.setStartPosition(i2);
|
||||
cursorWindow2.setNumColumns(builder.a.length);
|
||||
arrayList.add(cursorWindow2);
|
||||
i2--;
|
||||
z = true;
|
||||
} else {
|
||||
throw new zaa("Could not add the value to a new CursorWindow. The size of value may be larger than what a CursorWindow can handle.");
|
||||
}
|
||||
i2++;
|
||||
} catch (RuntimeException e) {
|
||||
int size2 = arrayList.size();
|
||||
for (int i4 = 0; i4 < size2; i4++) {
|
||||
((CursorWindow) arrayList.get(i4)).close();
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return (CursorWindow[]) arrayList.toArray(new CursorWindow[arrayList.size()]);
|
||||
}
|
||||
|
||||
/* synthetic */ DataHolder(Builder builder, int i, Bundle bundle, int i2, zab zabVar) {
|
||||
this(builder, i, bundle, -1);
|
||||
}
|
||||
|
||||
private final void zaa(String str, int i) {
|
||||
Bundle bundle = this.zalq;
|
||||
if (bundle != null && bundle.containsKey(str)) {
|
||||
if (!isClosed()) {
|
||||
if (i < 0 || i >= this.zalv) {
|
||||
throw new CursorIndexOutOfBoundsException(i, this.zalv);
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException("Buffer is closed.");
|
||||
}
|
||||
String valueOf = String.valueOf(str);
|
||||
throw new IllegalArgumentException(valueOf.length() != 0 ? "No such column: ".concat(valueOf) : new String("No such column: "));
|
||||
}
|
||||
|
||||
public final float zaa(String str, int i, int i2) {
|
||||
zaa(str, i);
|
||||
return this.zalr[i2].getFloat(i, this.zalq.getInt(str));
|
||||
}
|
||||
|
||||
public final void zaa(String str, int i, int i2, CharArrayBuffer charArrayBuffer) {
|
||||
zaa(str, i);
|
||||
this.zalr[i2].copyStringToBuffer(i, this.zalq.getInt(str), charArrayBuffer);
|
||||
}
|
||||
}
|
37
sources/com/google/android/gms/common/data/zaa.java
Normal file
37
sources/com/google/android/gms/common/data/zaa.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zaa implements Parcelable.Creator<BitmapTeleporter> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ BitmapTeleporter createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
ParcelFileDescriptor parcelFileDescriptor = null;
|
||||
int i2 = 0;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 == 2) {
|
||||
parcelFileDescriptor = (ParcelFileDescriptor) SafeParcelReader.a(parcel, a, ParcelFileDescriptor.CREATOR);
|
||||
} else if (a2 != 3) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new BitmapTeleporter(i, parcelFileDescriptor, i2);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ BitmapTeleporter[] newArray(int i) {
|
||||
return new BitmapTeleporter[i];
|
||||
}
|
||||
}
|
10
sources/com/google/android/gms/common/data/zab.java
Normal file
10
sources/com/google/android/gms/common/data/zab.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zab extends DataHolder.Builder {
|
||||
zab(String[] strArr, String str) {
|
||||
super(strArr, null, null);
|
||||
}
|
||||
}
|
46
sources/com/google/android/gms/common/data/zac.java
Normal file
46
sources/com/google/android/gms/common/data/zac.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package com.google.android.gms.common.data;
|
||||
|
||||
import android.database.CursorWindow;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zac implements Parcelable.Creator<DataHolder> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ DataHolder createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
String[] strArr = null;
|
||||
CursorWindow[] cursorWindowArr = null;
|
||||
Bundle bundle = null;
|
||||
int i = 0;
|
||||
int i2 = 0;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
strArr = SafeParcelReader.o(parcel, a);
|
||||
} else if (a2 == 2) {
|
||||
cursorWindowArr = (CursorWindow[]) SafeParcelReader.b(parcel, a, CursorWindow.CREATOR);
|
||||
} else if (a2 == 3) {
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 == 4) {
|
||||
bundle = SafeParcelReader.f(parcel, a);
|
||||
} else if (a2 != 1000) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
DataHolder dataHolder = new DataHolder(i, strArr, cursorWindowArr, i2, bundle);
|
||||
dataHolder.zaca();
|
||||
return dataHolder;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ DataHolder[] newArray(int i) {
|
||||
return new DataHolder[i];
|
||||
}
|
||||
}
|
181
sources/com/google/android/gms/common/images/ImageManager.java
Normal file
181
sources/com/google/android/gms/common/images/ImageManager.java
Normal file
@@ -0,0 +1,181 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.os.ResultReceiver;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
import androidx.collection.LruCache;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.internal.base.zak;
|
||||
import com.google.android.gms.internal.base.zal;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ImageManager {
|
||||
private static final Object i = new Object();
|
||||
private static HashSet<Uri> j = new HashSet<>();
|
||||
private final Context a;
|
||||
private final Handler b;
|
||||
private final ExecutorService c;
|
||||
private final zaa d;
|
||||
private final zak e;
|
||||
private final Map<com.google.android.gms.common.images.zaa, ImageReceiver> f;
|
||||
private final Map<Uri, ImageReceiver> g;
|
||||
private final Map<Uri, Long> h;
|
||||
|
||||
@KeepName
|
||||
private final class ImageReceiver extends ResultReceiver {
|
||||
private final Uri mUri;
|
||||
private final ArrayList<com.google.android.gms.common.images.zaa> zamp;
|
||||
|
||||
ImageReceiver(Uri uri) {
|
||||
super(new zal(Looper.getMainLooper()));
|
||||
this.mUri = uri;
|
||||
this.zamp = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override // android.os.ResultReceiver
|
||||
public final void onReceiveResult(int i, Bundle bundle) {
|
||||
ImageManager.this.c.execute(ImageManager.this.new zab(this.mUri, (ParcelFileDescriptor) bundle.getParcelable("com.google.android.gms.extra.fileDescriptor")));
|
||||
}
|
||||
|
||||
public final void zab(com.google.android.gms.common.images.zaa zaaVar) {
|
||||
Asserts.a("ImageReceiver.addImageRequest() must be called in the main thread");
|
||||
this.zamp.add(zaaVar);
|
||||
}
|
||||
|
||||
public final void zac(com.google.android.gms.common.images.zaa zaaVar) {
|
||||
Asserts.a("ImageReceiver.removeImageRequest() must be called in the main thread");
|
||||
this.zamp.remove(zaaVar);
|
||||
}
|
||||
|
||||
public final void zace() {
|
||||
Intent intent = new Intent("com.google.android.gms.common.images.LOAD_IMAGE");
|
||||
intent.putExtra("com.google.android.gms.extras.uri", this.mUri);
|
||||
intent.putExtra("com.google.android.gms.extras.resultReceiver", this);
|
||||
intent.putExtra("com.google.android.gms.extras.priority", 3);
|
||||
ImageManager.this.a.sendBroadcast(intent);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class zaa extends LruCache<com.google.android.gms.common.images.zab, Bitmap> {
|
||||
}
|
||||
|
||||
private final class zab implements Runnable {
|
||||
private final Uri a;
|
||||
private final ParcelFileDescriptor b;
|
||||
|
||||
public zab(Uri uri, ParcelFileDescriptor parcelFileDescriptor) {
|
||||
this.a = uri;
|
||||
this.b = parcelFileDescriptor;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
boolean z;
|
||||
Bitmap bitmap;
|
||||
Asserts.b("LoadBitmapFromDiskRunnable can't be executed in the main thread");
|
||||
ParcelFileDescriptor parcelFileDescriptor = this.b;
|
||||
boolean z2 = false;
|
||||
Bitmap bitmap2 = null;
|
||||
if (parcelFileDescriptor != null) {
|
||||
try {
|
||||
bitmap2 = BitmapFactory.decodeFileDescriptor(parcelFileDescriptor.getFileDescriptor());
|
||||
} catch (OutOfMemoryError e) {
|
||||
String valueOf = String.valueOf(this.a);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 34);
|
||||
sb.append("OOM while loading bitmap for uri: ");
|
||||
sb.append(valueOf);
|
||||
Log.e("ImageManager", sb.toString(), e);
|
||||
z2 = true;
|
||||
}
|
||||
try {
|
||||
this.b.close();
|
||||
} catch (IOException e2) {
|
||||
Log.e("ImageManager", "closed failed", e2);
|
||||
}
|
||||
z = z2;
|
||||
bitmap = bitmap2;
|
||||
} else {
|
||||
bitmap = null;
|
||||
z = false;
|
||||
}
|
||||
CountDownLatch countDownLatch = new CountDownLatch(1);
|
||||
ImageManager.this.b.post(ImageManager.this.new zad(this.a, bitmap, z, countDownLatch));
|
||||
try {
|
||||
countDownLatch.await();
|
||||
} catch (InterruptedException unused) {
|
||||
String valueOf2 = String.valueOf(this.a);
|
||||
StringBuilder sb2 = new StringBuilder(String.valueOf(valueOf2).length() + 32);
|
||||
sb2.append("Latch interrupted while posting ");
|
||||
sb2.append(valueOf2);
|
||||
Log.w("ImageManager", sb2.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class zad implements Runnable {
|
||||
private final Uri a;
|
||||
private final Bitmap b;
|
||||
private final CountDownLatch c;
|
||||
private boolean d;
|
||||
|
||||
public zad(Uri uri, Bitmap bitmap, boolean z, CountDownLatch countDownLatch) {
|
||||
this.a = uri;
|
||||
this.b = bitmap;
|
||||
this.d = z;
|
||||
this.c = countDownLatch;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
Asserts.a("OnBitmapLoadedRunnable must be executed in the main thread");
|
||||
boolean z = this.b != null;
|
||||
if (ImageManager.this.d != null) {
|
||||
if (this.d) {
|
||||
ImageManager.this.d.a();
|
||||
System.gc();
|
||||
this.d = false;
|
||||
ImageManager.this.b.post(this);
|
||||
return;
|
||||
}
|
||||
if (z) {
|
||||
ImageManager.this.d.a(new com.google.android.gms.common.images.zab(this.a), this.b);
|
||||
}
|
||||
}
|
||||
ImageReceiver imageReceiver = (ImageReceiver) ImageManager.this.g.remove(this.a);
|
||||
if (imageReceiver != null) {
|
||||
ArrayList arrayList = imageReceiver.zamp;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
com.google.android.gms.common.images.zaa zaaVar = (com.google.android.gms.common.images.zaa) arrayList.get(i);
|
||||
if (z) {
|
||||
zaaVar.a(ImageManager.this.a, this.b, false);
|
||||
} else {
|
||||
ImageManager.this.h.put(this.a, Long.valueOf(SystemClock.elapsedRealtime()));
|
||||
zaaVar.a(ImageManager.this.a, ImageManager.this.e, false);
|
||||
}
|
||||
ImageManager.this.f.remove(zaaVar);
|
||||
}
|
||||
}
|
||||
this.c.countDown();
|
||||
synchronized (ImageManager.i) {
|
||||
ImageManager.j.remove(this.a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
110
sources/com/google/android/gms/common/images/WebImage.java
Normal file
110
sources/com/google/android/gms/common/images/WebImage.java
Normal file
@@ -0,0 +1,110 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.baidu.cloud.media.player.misc.IMediaFormat;
|
||||
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 java.util.Locale;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class WebImage extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<WebImage> CREATOR = new zae();
|
||||
private final int zale;
|
||||
private final int zand;
|
||||
private final int zane;
|
||||
private final Uri zanf;
|
||||
|
||||
WebImage(int i, Uri uri, int i2, int i3) {
|
||||
this.zale = i;
|
||||
this.zanf = uri;
|
||||
this.zand = i2;
|
||||
this.zane = i3;
|
||||
}
|
||||
|
||||
private static Uri zaa(JSONObject jSONObject) {
|
||||
if (jSONObject.has("url")) {
|
||||
try {
|
||||
return Uri.parse(jSONObject.getString("url"));
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj != null && (obj instanceof WebImage)) {
|
||||
WebImage webImage = (WebImage) obj;
|
||||
if (Objects.a(this.zanf, webImage.zanf) && this.zand == webImage.zand && this.zane == webImage.zane) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int getHeight() {
|
||||
return this.zane;
|
||||
}
|
||||
|
||||
public final Uri getUrl() {
|
||||
return this.zanf;
|
||||
}
|
||||
|
||||
public final int getWidth() {
|
||||
return this.zand;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(this.zanf, Integer.valueOf(this.zand), Integer.valueOf(this.zane));
|
||||
}
|
||||
|
||||
public final JSONObject toJson() {
|
||||
JSONObject jSONObject = new JSONObject();
|
||||
try {
|
||||
jSONObject.put("url", this.zanf.toString());
|
||||
jSONObject.put(IMediaFormat.KEY_WIDTH, this.zand);
|
||||
jSONObject.put(IMediaFormat.KEY_HEIGHT, this.zane);
|
||||
} catch (JSONException unused) {
|
||||
}
|
||||
return jSONObject;
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return String.format(Locale.US, "Image %dx%d %s", Integer.valueOf(this.zand), Integer.valueOf(this.zane), this.zanf.toString());
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zale);
|
||||
SafeParcelWriter.a(parcel, 2, (Parcelable) getUrl(), i, false);
|
||||
SafeParcelWriter.a(parcel, 3, getWidth());
|
||||
SafeParcelWriter.a(parcel, 4, getHeight());
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
public WebImage(Uri uri, int i, int i2) throws IllegalArgumentException {
|
||||
this(1, uri, i, i2);
|
||||
if (uri == null) {
|
||||
throw new IllegalArgumentException("url cannot be null");
|
||||
}
|
||||
if (i < 0 || i2 < 0) {
|
||||
throw new IllegalArgumentException("width and height must not be negative");
|
||||
}
|
||||
}
|
||||
|
||||
public WebImage(Uri uri) throws IllegalArgumentException {
|
||||
this(uri, 0, 0);
|
||||
}
|
||||
|
||||
public WebImage(JSONObject jSONObject) throws IllegalArgumentException {
|
||||
this(zaa(jSONObject), jSONObject.optInt(IMediaFormat.KEY_WIDTH, 0), jSONObject.optInt(IMediaFormat.KEY_HEIGHT, 0));
|
||||
}
|
||||
}
|
25
sources/com/google/android/gms/common/images/zaa.java
Normal file
25
sources/com/google/android/gms/common/images/zaa.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import com.google.android.gms.common.internal.Asserts;
|
||||
import com.google.android.gms.internal.base.zak;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class zaa {
|
||||
protected int a;
|
||||
|
||||
final void a(Context context, Bitmap bitmap, boolean z) {
|
||||
Asserts.a(bitmap);
|
||||
a(new BitmapDrawable(context.getResources(), bitmap), z, false, true);
|
||||
}
|
||||
|
||||
protected abstract void a(Drawable drawable, boolean z, boolean z2, boolean z3);
|
||||
|
||||
final void a(Context context, zak zakVar, boolean z) {
|
||||
int i = this.a;
|
||||
a(i != 0 ? context.getResources().getDrawable(i) : null, z, false, false);
|
||||
}
|
||||
}
|
27
sources/com/google/android/gms/common/images/zab.java
Normal file
27
sources/com/google/android/gms/common/images/zab.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
final class zab {
|
||||
public final Uri a;
|
||||
|
||||
public zab(Uri uri) {
|
||||
this.a = uri;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (!(obj instanceof zab)) {
|
||||
return false;
|
||||
}
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
return Objects.a(((zab) obj).a, this.a);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(this.a);
|
||||
}
|
||||
}
|
40
sources/com/google/android/gms/common/images/zae.java
Normal file
40
sources/com/google/android/gms/common/images/zae.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.images;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelReader;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class zae implements Parcelable.Creator<WebImage> {
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ WebImage createFromParcel(Parcel parcel) {
|
||||
int b = SafeParcelReader.b(parcel);
|
||||
int i = 0;
|
||||
Uri uri = null;
|
||||
int i2 = 0;
|
||||
int i3 = 0;
|
||||
while (parcel.dataPosition() < b) {
|
||||
int a = SafeParcelReader.a(parcel);
|
||||
int a2 = SafeParcelReader.a(a);
|
||||
if (a2 == 1) {
|
||||
i = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 == 2) {
|
||||
uri = (Uri) SafeParcelReader.a(parcel, a, Uri.CREATOR);
|
||||
} else if (a2 == 3) {
|
||||
i2 = SafeParcelReader.x(parcel, a);
|
||||
} else if (a2 != 4) {
|
||||
SafeParcelReader.C(parcel, a);
|
||||
} else {
|
||||
i3 = SafeParcelReader.x(parcel, a);
|
||||
}
|
||||
}
|
||||
SafeParcelReader.q(parcel, b);
|
||||
return new WebImage(i, uri, i2, i3);
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable.Creator
|
||||
public final /* synthetic */ WebImage[] newArray(int i) {
|
||||
return new WebImage[i];
|
||||
}
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.Binder;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AccountAccessor extends IAccountAccessor.Stub {
|
||||
public static Account a(IAccountAccessor iAccountAccessor) {
|
||||
if (iAccountAccessor != null) {
|
||||
long clearCallingIdentity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
return iAccountAccessor.a();
|
||||
} catch (RemoteException unused) {
|
||||
Log.w("AccountAccessor", "Remote account accessor probably died");
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(clearCallingIdentity);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
45
sources/com/google/android/gms/common/internal/Asserts.java
Normal file
45
sources/com/google/android/gms/common/internal/Asserts.java
Normal file
@@ -0,0 +1,45 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class Asserts {
|
||||
public static void a(Object obj) {
|
||||
if (obj == null) {
|
||||
throw new IllegalArgumentException("null reference");
|
||||
}
|
||||
}
|
||||
|
||||
public static void b(String str) {
|
||||
if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
|
||||
return;
|
||||
}
|
||||
String valueOf = String.valueOf(Thread.currentThread());
|
||||
String valueOf2 = String.valueOf(Looper.getMainLooper().getThread());
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 56 + String.valueOf(valueOf2).length());
|
||||
sb.append("checkNotMainThread: current thread ");
|
||||
sb.append(valueOf);
|
||||
sb.append(" IS the main thread ");
|
||||
sb.append(valueOf2);
|
||||
sb.append("!");
|
||||
Log.e("Asserts", sb.toString());
|
||||
throw new IllegalStateException(str);
|
||||
}
|
||||
|
||||
public static void a(String str) {
|
||||
if (Looper.getMainLooper().getThread() == Thread.currentThread()) {
|
||||
return;
|
||||
}
|
||||
String valueOf = String.valueOf(Thread.currentThread());
|
||||
String valueOf2 = String.valueOf(Looper.getMainLooper().getThread());
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 57 + String.valueOf(valueOf2).length());
|
||||
sb.append("checkMainThread: current thread ");
|
||||
sb.append(valueOf);
|
||||
sb.append(" IS NOT the main thread ");
|
||||
sb.append(valueOf2);
|
||||
sb.append("!");
|
||||
Log.e("Asserts", sb.toString());
|
||||
throw new IllegalStateException(str);
|
||||
}
|
||||
}
|
@@ -0,0 +1,113 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AuthAccountRequest extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<AuthAccountRequest> CREATOR = new zaa();
|
||||
private final int zale;
|
||||
|
||||
@Deprecated
|
||||
private final IBinder zanw;
|
||||
private final Scope[] zanx;
|
||||
private Integer zany;
|
||||
private Integer zanz;
|
||||
private Account zax;
|
||||
|
||||
AuthAccountRequest(int i, IBinder iBinder, Scope[] scopeArr, Integer num, Integer num2, Account account) {
|
||||
this.zale = i;
|
||||
this.zanw = iBinder;
|
||||
this.zanx = scopeArr;
|
||||
this.zany = num;
|
||||
this.zanz = num2;
|
||||
this.zax = account;
|
||||
}
|
||||
|
||||
public Account getAccount() {
|
||||
Account account = this.zax;
|
||||
if (account != null) {
|
||||
return account;
|
||||
}
|
||||
IBinder iBinder = this.zanw;
|
||||
if (iBinder != null) {
|
||||
return AccountAccessor.a(IAccountAccessor.Stub.a(iBinder));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getOauthPolicy() {
|
||||
return this.zany;
|
||||
}
|
||||
|
||||
public Integer getPolicyAction() {
|
||||
return this.zanz;
|
||||
}
|
||||
|
||||
public Set<Scope> getScopes() {
|
||||
return new HashSet(Arrays.asList(this.zanx));
|
||||
}
|
||||
|
||||
public AuthAccountRequest setOauthPolicy(Integer num) {
|
||||
this.zany = num;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AuthAccountRequest setPolicyAction(Integer num) {
|
||||
this.zanz = num;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.zale);
|
||||
SafeParcelWriter.a(parcel, 2, this.zanw, false);
|
||||
SafeParcelWriter.a(parcel, 3, (Parcelable[]) this.zanx, i, false);
|
||||
SafeParcelWriter.a(parcel, 4, this.zany, false);
|
||||
SafeParcelWriter.a(parcel, 5, this.zanz, false);
|
||||
SafeParcelWriter.a(parcel, 6, (Parcelable) this.zax, i, false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public AuthAccountRequest(IAccountAccessor iAccountAccessor, Set<Scope> set) {
|
||||
this(3, iAccountAccessor.asBinder(), (Scope[]) set.toArray(new Scope[set.size()]), null, null, null);
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public AuthAccountRequest(android.accounts.Account r8, java.util.Set<com.google.android.gms.common.api.Scope> r9) {
|
||||
/*
|
||||
r7 = this;
|
||||
int r0 = r9.size()
|
||||
com.google.android.gms.common.api.Scope[] r0 = new com.google.android.gms.common.api.Scope[r0]
|
||||
java.lang.Object[] r9 = r9.toArray(r0)
|
||||
r3 = r9
|
||||
com.google.android.gms.common.api.Scope[] r3 = (com.google.android.gms.common.api.Scope[]) r3
|
||||
com.google.android.gms.common.internal.Preconditions.a(r8)
|
||||
r6 = r8
|
||||
android.accounts.Account r6 = (android.accounts.Account) r6
|
||||
r1 = 3
|
||||
r2 = 0
|
||||
r4 = 0
|
||||
r5 = 0
|
||||
r0 = r7
|
||||
r0.<init>(r1, r2, r3, r4, r5, r6)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.internal.AuthAccountRequest.<init>(android.accounts.Account, java.util.Set):void");
|
||||
}
|
||||
}
|
@@ -0,0 +1,803 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.GmsClientSupervisor;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class BaseGmsClient<T extends IInterface> {
|
||||
private static final Feature[] v = new Feature[0];
|
||||
private zzh a;
|
||||
private final Context b;
|
||||
private final GmsClientSupervisor c;
|
||||
private final GoogleApiAvailabilityLight d;
|
||||
final Handler e;
|
||||
private final Object f;
|
||||
private final Object g;
|
||||
private IGmsServiceBroker h;
|
||||
protected ConnectionProgressReportCallbacks i;
|
||||
private T j;
|
||||
private final ArrayList<zzc<?>> k;
|
||||
private zze l;
|
||||
private int m;
|
||||
private final BaseConnectionCallbacks n;
|
||||
private final BaseOnConnectionFailedListener o;
|
||||
private final int p;
|
||||
private final String q;
|
||||
private ConnectionResult r;
|
||||
private boolean s;
|
||||
private volatile com.google.android.gms.common.internal.zzb t;
|
||||
protected AtomicInteger u;
|
||||
|
||||
public interface BaseConnectionCallbacks {
|
||||
void d(Bundle bundle);
|
||||
|
||||
void i(int i);
|
||||
}
|
||||
|
||||
public interface BaseOnConnectionFailedListener {
|
||||
void a(ConnectionResult connectionResult);
|
||||
}
|
||||
|
||||
public interface ConnectionProgressReportCallbacks {
|
||||
void a(ConnectionResult connectionResult);
|
||||
}
|
||||
|
||||
protected class LegacyClientCallbackAdapter implements ConnectionProgressReportCallbacks {
|
||||
public LegacyClientCallbackAdapter() {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.ConnectionProgressReportCallbacks
|
||||
public void a(ConnectionResult connectionResult) {
|
||||
if (connectionResult.isSuccess()) {
|
||||
BaseGmsClient baseGmsClient = BaseGmsClient.this;
|
||||
baseGmsClient.a((IAccountAccessor) null, baseGmsClient.r());
|
||||
} else if (BaseGmsClient.this.o != null) {
|
||||
BaseGmsClient.this.o.a(connectionResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface SignOutCallbacks {
|
||||
void a();
|
||||
}
|
||||
|
||||
private abstract class zza extends zzc<Boolean> {
|
||||
private final int d;
|
||||
private final Bundle e;
|
||||
|
||||
protected zza(int i, Bundle bundle) {
|
||||
super(true);
|
||||
this.d = i;
|
||||
this.e = bundle;
|
||||
}
|
||||
|
||||
protected abstract void a(ConnectionResult connectionResult);
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zzc
|
||||
protected final /* synthetic */ void a(Boolean bool) {
|
||||
if (bool == null) {
|
||||
BaseGmsClient.this.b(1, null);
|
||||
return;
|
||||
}
|
||||
int i = this.d;
|
||||
if (i == 0) {
|
||||
if (e()) {
|
||||
return;
|
||||
}
|
||||
BaseGmsClient.this.b(1, null);
|
||||
a(new ConnectionResult(8, null));
|
||||
return;
|
||||
}
|
||||
if (i == 10) {
|
||||
BaseGmsClient.this.b(1, null);
|
||||
throw new IllegalStateException(String.format("A fatal developer error has occurred. Class name: %s. Start service action: %s. Service Descriptor: %s. ", getClass().getSimpleName(), BaseGmsClient.this.u(), BaseGmsClient.this.t()));
|
||||
}
|
||||
BaseGmsClient.this.b(1, null);
|
||||
Bundle bundle = this.e;
|
||||
a(new ConnectionResult(this.d, bundle != null ? (PendingIntent) bundle.getParcelable("pendingIntent") : null));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zzc
|
||||
protected final void c() {
|
||||
}
|
||||
|
||||
protected abstract boolean e();
|
||||
}
|
||||
|
||||
final class zzb extends com.google.android.gms.internal.common.zze {
|
||||
public zzb(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
private static void a(Message message) {
|
||||
zzc zzcVar = (zzc) message.obj;
|
||||
zzcVar.c();
|
||||
zzcVar.b();
|
||||
}
|
||||
|
||||
private static boolean b(Message message) {
|
||||
int i = message.what;
|
||||
return i == 2 || i == 1 || i == 7;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
if (BaseGmsClient.this.u.get() != message.arg1) {
|
||||
if (b(message)) {
|
||||
a(message);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
int i = message.what;
|
||||
if ((i == 1 || i == 7 || i == 4 || i == 5) && !BaseGmsClient.this.d()) {
|
||||
a(message);
|
||||
return;
|
||||
}
|
||||
int i2 = message.what;
|
||||
if (i2 == 4) {
|
||||
BaseGmsClient.this.r = new ConnectionResult(message.arg2);
|
||||
if (BaseGmsClient.this.z() && !BaseGmsClient.this.s) {
|
||||
BaseGmsClient.this.b(3, null);
|
||||
return;
|
||||
}
|
||||
ConnectionResult connectionResult = BaseGmsClient.this.r != null ? BaseGmsClient.this.r : new ConnectionResult(8);
|
||||
BaseGmsClient.this.i.a(connectionResult);
|
||||
BaseGmsClient.this.a(connectionResult);
|
||||
return;
|
||||
}
|
||||
if (i2 == 5) {
|
||||
ConnectionResult connectionResult2 = BaseGmsClient.this.r != null ? BaseGmsClient.this.r : new ConnectionResult(8);
|
||||
BaseGmsClient.this.i.a(connectionResult2);
|
||||
BaseGmsClient.this.a(connectionResult2);
|
||||
return;
|
||||
}
|
||||
if (i2 == 3) {
|
||||
Object obj = message.obj;
|
||||
ConnectionResult connectionResult3 = new ConnectionResult(message.arg2, obj instanceof PendingIntent ? (PendingIntent) obj : null);
|
||||
BaseGmsClient.this.i.a(connectionResult3);
|
||||
BaseGmsClient.this.a(connectionResult3);
|
||||
return;
|
||||
}
|
||||
if (i2 == 6) {
|
||||
BaseGmsClient.this.b(5, null);
|
||||
if (BaseGmsClient.this.n != null) {
|
||||
BaseGmsClient.this.n.i(message.arg2);
|
||||
}
|
||||
BaseGmsClient.this.a(message.arg2);
|
||||
BaseGmsClient.this.a(5, 1, (int) null);
|
||||
return;
|
||||
}
|
||||
if (i2 == 2 && !BaseGmsClient.this.b()) {
|
||||
a(message);
|
||||
return;
|
||||
}
|
||||
if (b(message)) {
|
||||
((zzc) message.obj).d();
|
||||
return;
|
||||
}
|
||||
int i3 = message.what;
|
||||
StringBuilder sb = new StringBuilder(45);
|
||||
sb.append("Don't know how to handle message: ");
|
||||
sb.append(i3);
|
||||
Log.wtf("GmsClient", sb.toString(), new Exception());
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract class zzc<TListener> {
|
||||
private TListener a;
|
||||
private boolean b = false;
|
||||
|
||||
public zzc(TListener tlistener) {
|
||||
this.a = tlistener;
|
||||
}
|
||||
|
||||
public final void a() {
|
||||
synchronized (this) {
|
||||
this.a = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void a(TListener tlistener);
|
||||
|
||||
public final void b() {
|
||||
a();
|
||||
synchronized (BaseGmsClient.this.k) {
|
||||
BaseGmsClient.this.k.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void c();
|
||||
|
||||
public final void d() {
|
||||
TListener tlistener;
|
||||
synchronized (this) {
|
||||
tlistener = this.a;
|
||||
if (this.b) {
|
||||
String valueOf = String.valueOf(this);
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 47);
|
||||
sb.append("Callback proxy ");
|
||||
sb.append(valueOf);
|
||||
sb.append(" being reused. This is not safe.");
|
||||
Log.w("GmsClient", sb.toString());
|
||||
}
|
||||
}
|
||||
if (tlistener != null) {
|
||||
try {
|
||||
a(tlistener);
|
||||
} catch (RuntimeException e) {
|
||||
c();
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
c();
|
||||
}
|
||||
synchronized (this) {
|
||||
this.b = true;
|
||||
}
|
||||
b();
|
||||
}
|
||||
}
|
||||
|
||||
public final class zze implements ServiceConnection {
|
||||
private final int a;
|
||||
|
||||
public zze(int i) {
|
||||
this.a = i;
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceConnected(ComponentName componentName, final IBinder iBinder) {
|
||||
IGmsServiceBroker iGmsServiceBroker;
|
||||
if (iBinder == null) {
|
||||
BaseGmsClient.this.c(16);
|
||||
return;
|
||||
}
|
||||
synchronized (BaseGmsClient.this.g) {
|
||||
BaseGmsClient baseGmsClient = BaseGmsClient.this;
|
||||
if (iBinder == null) {
|
||||
iGmsServiceBroker = null;
|
||||
} else {
|
||||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.internal.IGmsServiceBroker");
|
||||
iGmsServiceBroker = (queryLocalInterface == null || !(queryLocalInterface instanceof IGmsServiceBroker)) ? new IGmsServiceBroker(iBinder) { // from class: com.google.android.gms.common.internal.IGmsServiceBroker$Stub$zza
|
||||
private final IBinder a;
|
||||
|
||||
{
|
||||
this.a = iBinder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.IGmsServiceBroker
|
||||
public final void a(IGmsCallbacks iGmsCallbacks, GetServiceRequest getServiceRequest) throws RemoteException {
|
||||
Parcel obtain = Parcel.obtain();
|
||||
Parcel obtain2 = Parcel.obtain();
|
||||
try {
|
||||
obtain.writeInterfaceToken("com.google.android.gms.common.internal.IGmsServiceBroker");
|
||||
obtain.writeStrongBinder(iGmsCallbacks != null ? iGmsCallbacks.asBinder() : null);
|
||||
if (getServiceRequest != null) {
|
||||
obtain.writeInt(1);
|
||||
getServiceRequest.writeToParcel(obtain, 0);
|
||||
} else {
|
||||
obtain.writeInt(0);
|
||||
}
|
||||
this.a.transact(46, obtain, obtain2, 0);
|
||||
obtain2.readException();
|
||||
} finally {
|
||||
obtain2.recycle();
|
||||
obtain.recycle();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.os.IInterface
|
||||
public final IBinder asBinder() {
|
||||
return this.a;
|
||||
}
|
||||
} : (IGmsServiceBroker) queryLocalInterface;
|
||||
}
|
||||
baseGmsClient.h = iGmsServiceBroker;
|
||||
}
|
||||
BaseGmsClient.this.a(0, (Bundle) null, this.a);
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceDisconnected(ComponentName componentName) {
|
||||
synchronized (BaseGmsClient.this.g) {
|
||||
BaseGmsClient.this.h = null;
|
||||
}
|
||||
Handler handler = BaseGmsClient.this.e;
|
||||
handler.sendMessage(handler.obtainMessage(6, this.a, 1));
|
||||
}
|
||||
}
|
||||
|
||||
protected final class zzf extends zza {
|
||||
private final IBinder g;
|
||||
|
||||
public zzf(int i, IBinder iBinder, Bundle bundle) {
|
||||
super(i, bundle);
|
||||
this.g = iBinder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zza
|
||||
protected final void a(ConnectionResult connectionResult) {
|
||||
if (BaseGmsClient.this.o != null) {
|
||||
BaseGmsClient.this.o.a(connectionResult);
|
||||
}
|
||||
BaseGmsClient.this.a(connectionResult);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zza
|
||||
protected final boolean e() {
|
||||
try {
|
||||
String interfaceDescriptor = this.g.getInterfaceDescriptor();
|
||||
if (!BaseGmsClient.this.t().equals(interfaceDescriptor)) {
|
||||
String t = BaseGmsClient.this.t();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(t).length() + 34 + String.valueOf(interfaceDescriptor).length());
|
||||
sb.append("service descriptor mismatch: ");
|
||||
sb.append(t);
|
||||
sb.append(" vs. ");
|
||||
sb.append(interfaceDescriptor);
|
||||
Log.e("GmsClient", sb.toString());
|
||||
return false;
|
||||
}
|
||||
IInterface a = BaseGmsClient.this.a(this.g);
|
||||
if (a == null || !(BaseGmsClient.this.a(2, 4, (int) a) || BaseGmsClient.this.a(3, 4, (int) a))) {
|
||||
return false;
|
||||
}
|
||||
BaseGmsClient.this.r = null;
|
||||
Bundle n = BaseGmsClient.this.n();
|
||||
if (BaseGmsClient.this.n == null) {
|
||||
return true;
|
||||
}
|
||||
BaseGmsClient.this.n.d(n);
|
||||
return true;
|
||||
} catch (RemoteException unused) {
|
||||
Log.w("GmsClient", "service probably died");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected final class zzg extends zza {
|
||||
public zzg(int i, Bundle bundle) {
|
||||
super(i, null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zza
|
||||
protected final void a(ConnectionResult connectionResult) {
|
||||
BaseGmsClient.this.i.a(connectionResult);
|
||||
BaseGmsClient.this.a(connectionResult);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.zza
|
||||
protected final boolean e() {
|
||||
BaseGmsClient.this.i.a(ConnectionResult.RESULT_SUCCESS);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
new String[]{"service_esmobile", "service_googleme"};
|
||||
}
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
protected BaseGmsClient(android.content.Context r10, android.os.Looper r11, int r12, com.google.android.gms.common.internal.BaseGmsClient.BaseConnectionCallbacks r13, com.google.android.gms.common.internal.BaseGmsClient.BaseOnConnectionFailedListener r14, java.lang.String r15) {
|
||||
/*
|
||||
r9 = this;
|
||||
com.google.android.gms.common.internal.GmsClientSupervisor r3 = com.google.android.gms.common.internal.GmsClientSupervisor.a(r10)
|
||||
com.google.android.gms.common.GoogleApiAvailabilityLight r4 = com.google.android.gms.common.GoogleApiAvailabilityLight.a()
|
||||
com.google.android.gms.common.internal.Preconditions.a(r13)
|
||||
r6 = r13
|
||||
com.google.android.gms.common.internal.BaseGmsClient$BaseConnectionCallbacks r6 = (com.google.android.gms.common.internal.BaseGmsClient.BaseConnectionCallbacks) r6
|
||||
com.google.android.gms.common.internal.Preconditions.a(r14)
|
||||
r7 = r14
|
||||
com.google.android.gms.common.internal.BaseGmsClient$BaseOnConnectionFailedListener r7 = (com.google.android.gms.common.internal.BaseGmsClient.BaseOnConnectionFailedListener) r7
|
||||
r0 = r9
|
||||
r1 = r10
|
||||
r2 = r11
|
||||
r5 = r12
|
||||
r8 = r15
|
||||
r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.internal.BaseGmsClient.<init>(android.content.Context, android.os.Looper, int, com.google.android.gms.common.internal.BaseGmsClient$BaseConnectionCallbacks, com.google.android.gms.common.internal.BaseGmsClient$BaseOnConnectionFailedListener, java.lang.String):void");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void a(com.google.android.gms.common.internal.zzb zzbVar) {
|
||||
this.t = zzbVar;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void b(int i, T t) {
|
||||
Preconditions.a((i == 4) == (t != null));
|
||||
synchronized (this.f) {
|
||||
this.m = i;
|
||||
this.j = t;
|
||||
a(i, (int) t);
|
||||
if (i != 1) {
|
||||
if (i == 2 || i == 3) {
|
||||
if (this.l != null && this.a != null) {
|
||||
String c = this.a.c();
|
||||
String a = this.a.a();
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(c).length() + 70 + String.valueOf(a).length());
|
||||
sb.append("Calling connect() while still connected, missing disconnect() for ");
|
||||
sb.append(c);
|
||||
sb.append(" on ");
|
||||
sb.append(a);
|
||||
Log.e("GmsClient", sb.toString());
|
||||
this.c.a(this.a.c(), this.a.a(), this.a.b(), this.l, x());
|
||||
this.u.incrementAndGet();
|
||||
}
|
||||
this.l = new zze(this.u.get());
|
||||
this.a = (this.m != 3 || q() == null) ? new zzh(v(), u(), false, 129) : new zzh(o().getPackageName(), q(), true, 129);
|
||||
if (!this.c.a(new GmsClientSupervisor.zza(this.a.c(), this.a.a(), this.a.b()), this.l, x())) {
|
||||
String c2 = this.a.c();
|
||||
String a2 = this.a.a();
|
||||
StringBuilder sb2 = new StringBuilder(String.valueOf(c2).length() + 34 + String.valueOf(a2).length());
|
||||
sb2.append("unable to connect to service: ");
|
||||
sb2.append(c2);
|
||||
sb2.append(" on ");
|
||||
sb2.append(a2);
|
||||
Log.e("GmsClient", sb2.toString());
|
||||
a(16, (Bundle) null, this.u.get());
|
||||
}
|
||||
} else if (i == 4) {
|
||||
a((BaseGmsClient<T>) t);
|
||||
}
|
||||
} else if (this.l != null) {
|
||||
this.c.a(u(), v(), 129, this.l, x());
|
||||
this.l = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void c(int i) {
|
||||
int i2;
|
||||
if (y()) {
|
||||
i2 = 5;
|
||||
this.s = true;
|
||||
} else {
|
||||
i2 = 4;
|
||||
}
|
||||
Handler handler = this.e;
|
||||
handler.sendMessage(handler.obtainMessage(i2, this.u.get(), 16));
|
||||
}
|
||||
|
||||
private final String x() {
|
||||
String str = this.q;
|
||||
return str == null ? this.b.getClass().getName() : str;
|
||||
}
|
||||
|
||||
private final boolean y() {
|
||||
boolean z;
|
||||
synchronized (this.f) {
|
||||
z = this.m == 3;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean z() {
|
||||
if (this.s || TextUtils.isEmpty(t()) || TextUtils.isEmpty(q())) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
Class.forName(t());
|
||||
return true;
|
||||
} catch (ClassNotFoundException unused) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract T a(IBinder iBinder);
|
||||
|
||||
void a(int i, T t) {
|
||||
}
|
||||
|
||||
public boolean d() {
|
||||
boolean z;
|
||||
synchronized (this.f) {
|
||||
z = this.m == 2 || this.m == 3;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
public String e() {
|
||||
zzh zzhVar;
|
||||
if (!b() || (zzhVar = this.a) == null) {
|
||||
throw new RuntimeException("Failed to connect when checking package");
|
||||
}
|
||||
return zzhVar.a();
|
||||
}
|
||||
|
||||
public boolean f() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int g() {
|
||||
return GoogleApiAvailabilityLight.a;
|
||||
}
|
||||
|
||||
public final Feature[] h() {
|
||||
com.google.android.gms.common.internal.zzb zzbVar = this.t;
|
||||
if (zzbVar == null) {
|
||||
return null;
|
||||
}
|
||||
return zzbVar.zzda;
|
||||
}
|
||||
|
||||
public boolean i() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void j() {
|
||||
int a = this.d.a(this.b, g());
|
||||
if (a == 0) {
|
||||
a(new LegacyClientCallbackAdapter());
|
||||
} else {
|
||||
b(1, null);
|
||||
a(new LegacyClientCallbackAdapter(), a, (PendingIntent) null);
|
||||
}
|
||||
}
|
||||
|
||||
protected final void k() {
|
||||
if (!b()) {
|
||||
throw new IllegalStateException("Not connected. Call connect() and wait for onConnected() to be called.");
|
||||
}
|
||||
}
|
||||
|
||||
public Account l() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Feature[] m() {
|
||||
return v;
|
||||
}
|
||||
|
||||
public Bundle n() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public final Context o() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
protected Bundle p() {
|
||||
return new Bundle();
|
||||
}
|
||||
|
||||
protected String q() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected Set<Scope> r() {
|
||||
return Collections.EMPTY_SET;
|
||||
}
|
||||
|
||||
public final T s() throws DeadObjectException {
|
||||
T t;
|
||||
synchronized (this.f) {
|
||||
if (this.m == 5) {
|
||||
throw new DeadObjectException();
|
||||
}
|
||||
k();
|
||||
Preconditions.b(this.j != null, "Client is connected but service is null");
|
||||
t = this.j;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
protected abstract String t();
|
||||
|
||||
protected abstract String u();
|
||||
|
||||
protected String v() {
|
||||
return "com.google.android.gms";
|
||||
}
|
||||
|
||||
public boolean w() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void a(T t) {
|
||||
System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static final class zzd extends IGmsCallbacks.zza {
|
||||
private BaseGmsClient a;
|
||||
private final int b;
|
||||
|
||||
public zzd(BaseGmsClient baseGmsClient, int i) {
|
||||
this.a = baseGmsClient;
|
||||
this.b = i;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.IGmsCallbacks
|
||||
public final void a(int i, IBinder iBinder, Bundle bundle) {
|
||||
Preconditions.a(this.a, "onPostInitComplete can be called only once per call to getRemoteService");
|
||||
this.a.a(i, iBinder, bundle, this.b);
|
||||
this.a = null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.IGmsCallbacks
|
||||
public final void b(int i, Bundle bundle) {
|
||||
Log.wtf("GmsClient", "received deprecated onAccountValidationComplete callback, ignoring", new Exception());
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.IGmsCallbacks
|
||||
public final void a(int i, IBinder iBinder, com.google.android.gms.common.internal.zzb zzbVar) {
|
||||
Preconditions.a(this.a, "onPostInitCompleteWithConnectionInfo can be called only once per call togetRemoteService");
|
||||
Preconditions.a(zzbVar);
|
||||
this.a.a(zzbVar);
|
||||
a(i, iBinder, zzbVar.zzcz);
|
||||
}
|
||||
}
|
||||
|
||||
protected void a(int i) {
|
||||
System.currentTimeMillis();
|
||||
}
|
||||
|
||||
protected void a(ConnectionResult connectionResult) {
|
||||
connectionResult.getErrorCode();
|
||||
System.currentTimeMillis();
|
||||
}
|
||||
|
||||
protected BaseGmsClient(Context context, Looper looper, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailabilityLight googleApiAvailabilityLight, int i, BaseConnectionCallbacks baseConnectionCallbacks, BaseOnConnectionFailedListener baseOnConnectionFailedListener, String str) {
|
||||
this.f = new Object();
|
||||
this.g = new Object();
|
||||
this.k = new ArrayList<>();
|
||||
this.m = 1;
|
||||
this.r = null;
|
||||
this.s = false;
|
||||
this.t = null;
|
||||
this.u = new AtomicInteger(0);
|
||||
Preconditions.a(context, "Context must not be null");
|
||||
this.b = context;
|
||||
Preconditions.a(looper, "Looper must not be null");
|
||||
Preconditions.a(gmsClientSupervisor, "Supervisor must not be null");
|
||||
this.c = gmsClientSupervisor;
|
||||
Preconditions.a(googleApiAvailabilityLight, "API availability must not be null");
|
||||
this.d = googleApiAvailabilityLight;
|
||||
this.e = new zzb(looper);
|
||||
this.p = i;
|
||||
this.n = baseConnectionCallbacks;
|
||||
this.o = baseOnConnectionFailedListener;
|
||||
this.q = str;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean a(int i, int i2, T t) {
|
||||
synchronized (this.f) {
|
||||
if (this.m != i) {
|
||||
return false;
|
||||
}
|
||||
b(i2, t);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public void a(ConnectionProgressReportCallbacks connectionProgressReportCallbacks) {
|
||||
Preconditions.a(connectionProgressReportCallbacks, "Connection progress callbacks cannot be null.");
|
||||
this.i = connectionProgressReportCallbacks;
|
||||
b(2, null);
|
||||
}
|
||||
|
||||
public void a() {
|
||||
this.u.incrementAndGet();
|
||||
synchronized (this.k) {
|
||||
int size = this.k.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
this.k.get(i).a();
|
||||
}
|
||||
this.k.clear();
|
||||
}
|
||||
synchronized (this.g) {
|
||||
this.h = null;
|
||||
}
|
||||
b(1, null);
|
||||
}
|
||||
|
||||
protected void a(ConnectionProgressReportCallbacks connectionProgressReportCallbacks, int i, PendingIntent pendingIntent) {
|
||||
Preconditions.a(connectionProgressReportCallbacks, "Connection progress callbacks cannot be null.");
|
||||
this.i = connectionProgressReportCallbacks;
|
||||
Handler handler = this.e;
|
||||
handler.sendMessage(handler.obtainMessage(3, this.u.get(), i, pendingIntent));
|
||||
}
|
||||
|
||||
protected void a(int i, IBinder iBinder, Bundle bundle, int i2) {
|
||||
Handler handler = this.e;
|
||||
handler.sendMessage(handler.obtainMessage(1, i2, -1, new zzf(i, iBinder, bundle)));
|
||||
}
|
||||
|
||||
protected final void a(int i, Bundle bundle, int i2) {
|
||||
Handler handler = this.e;
|
||||
handler.sendMessage(handler.obtainMessage(7, i2, -1, new zzg(i, null)));
|
||||
}
|
||||
|
||||
public void a(IAccountAccessor iAccountAccessor, Set<Scope> set) {
|
||||
Bundle p = p();
|
||||
GetServiceRequest getServiceRequest = new GetServiceRequest(this.p);
|
||||
getServiceRequest.zzdh = this.b.getPackageName();
|
||||
getServiceRequest.zzdk = p;
|
||||
if (set != null) {
|
||||
getServiceRequest.zzdj = (Scope[]) set.toArray(new Scope[set.size()]);
|
||||
}
|
||||
if (i()) {
|
||||
getServiceRequest.zzdl = l() != null ? l() : new Account("<<default account>>", "com.google");
|
||||
if (iAccountAccessor != null) {
|
||||
getServiceRequest.zzdi = iAccountAccessor.asBinder();
|
||||
}
|
||||
} else if (w()) {
|
||||
getServiceRequest.zzdl = l();
|
||||
}
|
||||
getServiceRequest.zzdm = v;
|
||||
getServiceRequest.zzdn = m();
|
||||
try {
|
||||
synchronized (this.g) {
|
||||
if (this.h != null) {
|
||||
this.h.a(new zzd(this, this.u.get()), getServiceRequest);
|
||||
} else {
|
||||
Log.w("GmsClient", "mServiceBroker is null, client disconnected");
|
||||
}
|
||||
}
|
||||
} catch (DeadObjectException e) {
|
||||
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
|
||||
b(1);
|
||||
} catch (RemoteException e2) {
|
||||
e = e2;
|
||||
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
|
||||
a(8, (IBinder) null, (Bundle) null, this.u.get());
|
||||
} catch (SecurityException e3) {
|
||||
throw e3;
|
||||
} catch (RuntimeException e4) {
|
||||
e = e4;
|
||||
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
|
||||
a(8, (IBinder) null, (Bundle) null, this.u.get());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean b() {
|
||||
boolean z;
|
||||
synchronized (this.f) {
|
||||
z = this.m == 4;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
public void b(int i) {
|
||||
Handler handler = this.e;
|
||||
handler.sendMessage(handler.obtainMessage(6, this.u.get(), i));
|
||||
}
|
||||
|
||||
public void a(SignOutCallbacks signOutCallbacks) {
|
||||
signOutCallbacks.a();
|
||||
}
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.annotation.KeepName;
|
||||
|
||||
@KeepName
|
||||
/* loaded from: classes.dex */
|
||||
public final class BinderWrapper implements Parcelable {
|
||||
public static final Parcelable.Creator<BinderWrapper> CREATOR = new zza();
|
||||
private IBinder zzcy;
|
||||
|
||||
public BinderWrapper() {
|
||||
this.zzcy = null;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public final void writeToParcel(Parcel parcel, int i) {
|
||||
parcel.writeStrongBinder(this.zzcy);
|
||||
}
|
||||
|
||||
public BinderWrapper(IBinder iBinder) {
|
||||
this.zzcy = null;
|
||||
this.zzcy = iBinder;
|
||||
}
|
||||
|
||||
private BinderWrapper(Parcel parcel) {
|
||||
this.zzcy = null;
|
||||
this.zzcy = parcel.readStrongBinder();
|
||||
}
|
||||
|
||||
/* synthetic */ BinderWrapper(Parcel parcel, zza zzaVar) {
|
||||
this(parcel);
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class ClientIdentity extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<ClientIdentity> CREATOR = new zab();
|
||||
private final String packageName;
|
||||
private final int uid;
|
||||
|
||||
public ClientIdentity(int i, String str) {
|
||||
this.uid = i;
|
||||
this.packageName = str;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj != null && (obj instanceof ClientIdentity)) {
|
||||
ClientIdentity clientIdentity = (ClientIdentity) obj;
|
||||
if (clientIdentity.uid == this.uid && Objects.a(clientIdentity.packageName, this.packageName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
int i = this.uid;
|
||||
String str = this.packageName;
|
||||
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 12);
|
||||
sb.append(i);
|
||||
sb.append(":");
|
||||
sb.append(str);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.uid);
|
||||
SafeParcelWriter.a(parcel, 2, this.packageName, false);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
}
|
@@ -0,0 +1,120 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.view.View;
|
||||
import androidx.collection.ArraySet;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.signin.SignInOptions;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ClientSettings {
|
||||
private final Account a;
|
||||
private final Set<Scope> b;
|
||||
private final Set<Scope> c;
|
||||
private final Map<Api<?>, OptionalApiSettings> d;
|
||||
private final String e;
|
||||
private final String f;
|
||||
private final SignInOptions g;
|
||||
private Integer h;
|
||||
|
||||
public static final class Builder {
|
||||
private Account a;
|
||||
private ArraySet<Scope> b;
|
||||
private Map<Api<?>, OptionalApiSettings> c;
|
||||
private View e;
|
||||
private String f;
|
||||
private String g;
|
||||
private int d = 0;
|
||||
private SignInOptions h = SignInOptions.i;
|
||||
|
||||
public final Builder a(Account account) {
|
||||
this.a = account;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder b(String str) {
|
||||
this.f = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder a(Collection<Scope> collection) {
|
||||
if (this.b == null) {
|
||||
this.b = new ArraySet<>();
|
||||
}
|
||||
this.b.addAll(collection);
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Builder a(String str) {
|
||||
this.g = str;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final ClientSettings a() {
|
||||
return new ClientSettings(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h);
|
||||
}
|
||||
}
|
||||
|
||||
public static final class OptionalApiSettings {
|
||||
public final Set<Scope> a;
|
||||
}
|
||||
|
||||
public ClientSettings(Account account, Set<Scope> set, Map<Api<?>, OptionalApiSettings> map, int i, View view, String str, String str2, SignInOptions signInOptions) {
|
||||
this.a = account;
|
||||
this.b = set == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(set);
|
||||
this.d = map == null ? Collections.EMPTY_MAP : map;
|
||||
this.e = str;
|
||||
this.f = str2;
|
||||
this.g = signInOptions;
|
||||
HashSet hashSet = new HashSet(this.b);
|
||||
Iterator<OptionalApiSettings> it = this.d.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
hashSet.addAll(it.next().a);
|
||||
}
|
||||
this.c = Collections.unmodifiableSet(hashSet);
|
||||
}
|
||||
|
||||
public final Account a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public final Account b() {
|
||||
Account account = this.a;
|
||||
return account != null ? account : new Account("<<default account>>", "com.google");
|
||||
}
|
||||
|
||||
public final Set<Scope> c() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public final Integer d() {
|
||||
return this.h;
|
||||
}
|
||||
|
||||
public final String e() {
|
||||
return this.f;
|
||||
}
|
||||
|
||||
public final String f() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
public final Set<Scope> g() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final SignInOptions h() {
|
||||
return this.g;
|
||||
}
|
||||
|
||||
public final void a(Integer num) {
|
||||
this.h = num;
|
||||
}
|
||||
}
|
@@ -0,0 +1,172 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.R;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import androidx.collection.SimpleArrayMap;
|
||||
import com.google.android.gms.base.R$string;
|
||||
import com.google.android.gms.common.GooglePlayServicesUtil;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.common.wrappers.Wrappers;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class ConnectionErrorMessages {
|
||||
private static final SimpleArrayMap<String, String> a = new SimpleArrayMap<>();
|
||||
|
||||
public static String a(Context context, int i) {
|
||||
Resources resources = context.getResources();
|
||||
return i != 1 ? i != 2 ? i != 3 ? resources.getString(R.string.ok) : resources.getString(R$string.common_google_play_services_enable_button) : resources.getString(R$string.common_google_play_services_update_button) : resources.getString(R$string.common_google_play_services_install_button);
|
||||
}
|
||||
|
||||
public static String b(Context context, int i) {
|
||||
Resources resources = context.getResources();
|
||||
String a2 = a(context);
|
||||
if (i == 1) {
|
||||
return resources.getString(R$string.common_google_play_services_install_text, a2);
|
||||
}
|
||||
if (i == 2) {
|
||||
return DeviceProperties.c(context) ? resources.getString(R$string.common_google_play_services_wear_update_text) : resources.getString(R$string.common_google_play_services_update_text, a2);
|
||||
}
|
||||
if (i == 3) {
|
||||
return resources.getString(R$string.common_google_play_services_enable_text, a2);
|
||||
}
|
||||
if (i == 5) {
|
||||
return a(context, "common_google_play_services_invalid_account_text", a2);
|
||||
}
|
||||
if (i == 7) {
|
||||
return a(context, "common_google_play_services_network_error_text", a2);
|
||||
}
|
||||
if (i == 9) {
|
||||
return resources.getString(R$string.common_google_play_services_unsupported_text, a2);
|
||||
}
|
||||
if (i == 20) {
|
||||
return a(context, "common_google_play_services_restricted_profile_text", a2);
|
||||
}
|
||||
switch (i) {
|
||||
case 16:
|
||||
return a(context, "common_google_play_services_api_unavailable_text", a2);
|
||||
case 17:
|
||||
return a(context, "common_google_play_services_sign_in_failed_text", a2);
|
||||
case 18:
|
||||
return resources.getString(R$string.common_google_play_services_updating_text, a2);
|
||||
default:
|
||||
return resources.getString(com.google.android.gms.common.R$string.common_google_play_services_unknown_issue, a2);
|
||||
}
|
||||
}
|
||||
|
||||
public static String c(Context context, int i) {
|
||||
return i == 6 ? a(context, "common_google_play_services_resolution_required_text", a(context)) : b(context, i);
|
||||
}
|
||||
|
||||
public static String d(Context context, int i) {
|
||||
String a2 = i == 6 ? a(context, "common_google_play_services_resolution_required_title") : e(context, i);
|
||||
return a2 == null ? context.getResources().getString(R$string.common_google_play_services_notification_ticker) : a2;
|
||||
}
|
||||
|
||||
public static String e(Context context, int i) {
|
||||
Resources resources = context.getResources();
|
||||
switch (i) {
|
||||
case 1:
|
||||
return resources.getString(R$string.common_google_play_services_install_title);
|
||||
case 2:
|
||||
return resources.getString(R$string.common_google_play_services_update_title);
|
||||
case 3:
|
||||
return resources.getString(R$string.common_google_play_services_enable_title);
|
||||
case 4:
|
||||
case 6:
|
||||
case 18:
|
||||
return null;
|
||||
case 5:
|
||||
Log.e("GoogleApiAvailability", "An invalid account was specified when connecting. Please provide a valid account.");
|
||||
return a(context, "common_google_play_services_invalid_account_title");
|
||||
case 7:
|
||||
Log.e("GoogleApiAvailability", "Network error occurred. Please retry request later.");
|
||||
return a(context, "common_google_play_services_network_error_title");
|
||||
case 8:
|
||||
Log.e("GoogleApiAvailability", "Internal error occurred. Please see logs for detailed information");
|
||||
return null;
|
||||
case 9:
|
||||
Log.e("GoogleApiAvailability", "Google Play services is invalid. Cannot recover.");
|
||||
return null;
|
||||
case 10:
|
||||
Log.e("GoogleApiAvailability", "Developer error occurred. Please see logs for detailed information");
|
||||
return null;
|
||||
case 11:
|
||||
Log.e("GoogleApiAvailability", "The application is not licensed to the user.");
|
||||
return null;
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 19:
|
||||
default:
|
||||
StringBuilder sb = new StringBuilder(33);
|
||||
sb.append("Unexpected error code ");
|
||||
sb.append(i);
|
||||
Log.e("GoogleApiAvailability", sb.toString());
|
||||
return null;
|
||||
case 16:
|
||||
Log.e("GoogleApiAvailability", "One of the API components you attempted to connect to is not available.");
|
||||
return null;
|
||||
case 17:
|
||||
Log.e("GoogleApiAvailability", "The specified account could not be signed in.");
|
||||
return a(context, "common_google_play_services_sign_in_failed_title");
|
||||
case 20:
|
||||
Log.e("GoogleApiAvailability", "The current user profile is restricted and could not use authenticated features.");
|
||||
return a(context, "common_google_play_services_restricted_profile_title");
|
||||
}
|
||||
}
|
||||
|
||||
public static String a(Context context) {
|
||||
String packageName = context.getPackageName();
|
||||
try {
|
||||
return Wrappers.a(context).b(packageName).toString();
|
||||
} catch (PackageManager.NameNotFoundException | NullPointerException unused) {
|
||||
String str = context.getApplicationInfo().name;
|
||||
return TextUtils.isEmpty(str) ? packageName : str;
|
||||
}
|
||||
}
|
||||
|
||||
private static String a(Context context, String str, String str2) {
|
||||
Resources resources = context.getResources();
|
||||
String a2 = a(context, str);
|
||||
if (a2 == null) {
|
||||
a2 = resources.getString(com.google.android.gms.common.R$string.common_google_play_services_unknown_issue);
|
||||
}
|
||||
return String.format(resources.getConfiguration().locale, a2, str2);
|
||||
}
|
||||
|
||||
private static String a(Context context, String str) {
|
||||
synchronized (a) {
|
||||
String str2 = a.get(str);
|
||||
if (str2 != null) {
|
||||
return str2;
|
||||
}
|
||||
Resources remoteResource = GooglePlayServicesUtil.getRemoteResource(context);
|
||||
if (remoteResource == null) {
|
||||
return null;
|
||||
}
|
||||
int identifier = remoteResource.getIdentifier(str, "string", "com.google.android.gms");
|
||||
if (identifier == 0) {
|
||||
String valueOf = String.valueOf(str);
|
||||
Log.w("GoogleApiAvailability", valueOf.length() != 0 ? "Missing resource: ".concat(valueOf) : new String("Missing resource: "));
|
||||
return null;
|
||||
}
|
||||
String string = remoteResource.getString(identifier);
|
||||
if (TextUtils.isEmpty(string)) {
|
||||
String valueOf2 = String.valueOf(str);
|
||||
Log.w("GoogleApiAvailability", valueOf2.length() != 0 ? "Got empty resource: ".concat(valueOf2) : new String("Got empty resource: "));
|
||||
return null;
|
||||
}
|
||||
a.put(str, string);
|
||||
return string;
|
||||
}
|
||||
}
|
||||
|
||||
public static String b(Context context) {
|
||||
return context.getResources().getString(R$string.common_google_play_services_notification_channel_name);
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class DialogRedirect implements DialogInterface.OnClickListener {
|
||||
public static DialogRedirect a(Activity activity, Intent intent, int i) {
|
||||
return new zac(intent, activity, i);
|
||||
}
|
||||
|
||||
protected abstract void a();
|
||||
|
||||
@Override // android.content.DialogInterface.OnClickListener
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
try {
|
||||
a();
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.e("DialogRedirect", "Failed to start resolution intent", e);
|
||||
} finally {
|
||||
dialogInterface.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
public static DialogRedirect a(Fragment fragment, Intent intent, int i) {
|
||||
return new zad(intent, fragment, i);
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class DowngradeableSafeParcel extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
private static final Object zzdb = new Object();
|
||||
private static ClassLoader zzdc;
|
||||
private static Integer zzdd;
|
||||
private boolean zzde = false;
|
||||
|
||||
protected static boolean canUnparcelSafely(String str) {
|
||||
zzp();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected static Integer getUnparcelClientVersion() {
|
||||
synchronized (zzdb) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ClassLoader zzp() {
|
||||
synchronized (zzdb) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected abstract boolean prepareForClientVersion(int i);
|
||||
|
||||
public void setShouldDowngrade(boolean z) {
|
||||
this.zzde = z;
|
||||
}
|
||||
|
||||
protected boolean shouldDowngrade() {
|
||||
return this.zzde;
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
||||
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GetServiceRequest extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<GetServiceRequest> CREATOR = new zzd();
|
||||
private final int version;
|
||||
private final int zzdf;
|
||||
private int zzdg;
|
||||
String zzdh;
|
||||
IBinder zzdi;
|
||||
Scope[] zzdj;
|
||||
Bundle zzdk;
|
||||
Account zzdl;
|
||||
Feature[] zzdm;
|
||||
Feature[] zzdn;
|
||||
private boolean zzdo;
|
||||
|
||||
public GetServiceRequest(int i) {
|
||||
this.version = 4;
|
||||
this.zzdg = GoogleApiAvailabilityLight.a;
|
||||
this.zzdf = i;
|
||||
this.zzdo = true;
|
||||
}
|
||||
|
||||
public Bundle getExtraArgs() {
|
||||
return this.zzdk;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int a = SafeParcelWriter.a(parcel);
|
||||
SafeParcelWriter.a(parcel, 1, this.version);
|
||||
SafeParcelWriter.a(parcel, 2, this.zzdf);
|
||||
SafeParcelWriter.a(parcel, 3, this.zzdg);
|
||||
SafeParcelWriter.a(parcel, 4, this.zzdh, false);
|
||||
SafeParcelWriter.a(parcel, 5, this.zzdi, false);
|
||||
SafeParcelWriter.a(parcel, 6, (Parcelable[]) this.zzdj, i, false);
|
||||
SafeParcelWriter.a(parcel, 7, this.zzdk, false);
|
||||
SafeParcelWriter.a(parcel, 8, (Parcelable) this.zzdl, i, false);
|
||||
SafeParcelWriter.a(parcel, 10, (Parcelable[]) this.zzdm, i, false);
|
||||
SafeParcelWriter.a(parcel, 11, (Parcelable[]) this.zzdn, i, false);
|
||||
SafeParcelWriter.a(parcel, 12, this.zzdo);
|
||||
SafeParcelWriter.a(parcel, a);
|
||||
}
|
||||
|
||||
GetServiceRequest(int i, int i2, int i3, String str, IBinder iBinder, Scope[] scopeArr, Bundle bundle, Account account, Feature[] featureArr, Feature[] featureArr2, boolean z) {
|
||||
this.version = i;
|
||||
this.zzdf = i2;
|
||||
this.zzdg = i3;
|
||||
if ("com.google.android.gms".equals(str)) {
|
||||
this.zzdh = "com.google.android.gms";
|
||||
} else {
|
||||
this.zzdh = str;
|
||||
}
|
||||
if (i < 2) {
|
||||
this.zzdl = iBinder != null ? AccountAccessor.a(IAccountAccessor.Stub.a(iBinder)) : null;
|
||||
} else {
|
||||
this.zzdi = iBinder;
|
||||
this.zzdl = account;
|
||||
}
|
||||
this.zzdj = scopeArr;
|
||||
this.zzdk = bundle;
|
||||
this.zzdm = featureArr;
|
||||
this.zzdn = featureArr2;
|
||||
this.zzdo = z;
|
||||
}
|
||||
}
|
@@ -0,0 +1,99 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
import android.os.IInterface;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks;
|
||||
import com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class GmsClient<T extends IInterface> extends BaseGmsClient<T> implements Api.Client, GmsClientEventManager$GmsClientEventState {
|
||||
private final Set<Scope> w;
|
||||
private final Account x;
|
||||
|
||||
/* JADX WARN: Illegal instructions before constructor call */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
protected GmsClient(android.content.Context r10, android.os.Looper r11, int r12, com.google.android.gms.common.internal.ClientSettings r13, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks r14, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener r15) {
|
||||
/*
|
||||
r9 = this;
|
||||
com.google.android.gms.common.internal.GmsClientSupervisor r3 = com.google.android.gms.common.internal.GmsClientSupervisor.a(r10)
|
||||
com.google.android.gms.common.GoogleApiAvailability r4 = com.google.android.gms.common.GoogleApiAvailability.a()
|
||||
com.google.android.gms.common.internal.Preconditions.a(r14)
|
||||
r7 = r14
|
||||
com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks r7 = (com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks) r7
|
||||
com.google.android.gms.common.internal.Preconditions.a(r15)
|
||||
r8 = r15
|
||||
com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener r8 = (com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener) r8
|
||||
r0 = r9
|
||||
r1 = r10
|
||||
r2 = r11
|
||||
r5 = r12
|
||||
r6 = r13
|
||||
r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8)
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.internal.GmsClient.<init>(android.content.Context, android.os.Looper, int, com.google.android.gms.common.internal.ClientSettings, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener):void");
|
||||
}
|
||||
|
||||
private static BaseGmsClient.BaseConnectionCallbacks a(GoogleApiClient$ConnectionCallbacks googleApiClient$ConnectionCallbacks) {
|
||||
if (googleApiClient$ConnectionCallbacks == null) {
|
||||
return null;
|
||||
}
|
||||
return new zaf(googleApiClient$ConnectionCallbacks);
|
||||
}
|
||||
|
||||
private final Set<Scope> b(Set<Scope> set) {
|
||||
a(set);
|
||||
Iterator<Scope> it = set.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (!set.contains(it.next())) {
|
||||
throw new IllegalStateException("Expanding scopes is not permitted, use implied scopes instead");
|
||||
}
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
protected Set<Scope> a(Set<Scope> set) {
|
||||
return set;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient, com.google.android.gms.common.api.Api.Client
|
||||
public int g() {
|
||||
return super.g();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient
|
||||
public final Account l() {
|
||||
return this.x;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient
|
||||
protected final Set<Scope> r() {
|
||||
return this.w;
|
||||
}
|
||||
|
||||
private static BaseGmsClient.BaseOnConnectionFailedListener a(GoogleApiClient$OnConnectionFailedListener googleApiClient$OnConnectionFailedListener) {
|
||||
if (googleApiClient$OnConnectionFailedListener == null) {
|
||||
return null;
|
||||
}
|
||||
return new zag(googleApiClient$OnConnectionFailedListener);
|
||||
}
|
||||
|
||||
protected GmsClient(Context context, Looper looper, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailability googleApiAvailability, int i, ClientSettings clientSettings, GoogleApiClient$ConnectionCallbacks googleApiClient$ConnectionCallbacks, GoogleApiClient$OnConnectionFailedListener googleApiClient$OnConnectionFailedListener) {
|
||||
super(context, looper, gmsClientSupervisor, googleApiAvailability, i, a(googleApiClient$ConnectionCallbacks), a(googleApiClient$OnConnectionFailedListener), clientSettings.e());
|
||||
this.x = clientSettings.a();
|
||||
Set<Scope> c = clientSettings.c();
|
||||
b(c);
|
||||
this.w = c;
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface GmsClientEventManager$GmsClientEventState {
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class GmsClientSupervisor {
|
||||
private static final Object a = new Object();
|
||||
private static GmsClientSupervisor b;
|
||||
|
||||
protected static final class zza {
|
||||
private final String a;
|
||||
private final String b;
|
||||
private final ComponentName c;
|
||||
private final int d;
|
||||
|
||||
public zza(String str, String str2, int i) {
|
||||
Preconditions.b(str);
|
||||
this.a = str;
|
||||
Preconditions.b(str2);
|
||||
this.b = str2;
|
||||
this.c = null;
|
||||
this.d = i;
|
||||
}
|
||||
|
||||
public final ComponentName a() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public final String b() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public final int c() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof zza)) {
|
||||
return false;
|
||||
}
|
||||
zza zzaVar = (zza) obj;
|
||||
return Objects.a(this.a, zzaVar.a) && Objects.a(this.b, zzaVar.b) && Objects.a(this.c, zzaVar.c) && this.d == zzaVar.d;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.a(this.a, this.b, this.c, Integer.valueOf(this.d));
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
String str = this.a;
|
||||
return str == null ? this.c.flattenToString() : str;
|
||||
}
|
||||
|
||||
public final Intent a(Context context) {
|
||||
String str = this.a;
|
||||
return str != null ? new Intent(str).setPackage(this.b) : new Intent().setComponent(this.c);
|
||||
}
|
||||
}
|
||||
|
||||
public static GmsClientSupervisor a(Context context) {
|
||||
synchronized (a) {
|
||||
if (b == null) {
|
||||
b = new zze(context.getApplicationContext());
|
||||
}
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
protected abstract boolean a(zza zzaVar, ServiceConnection serviceConnection, String str);
|
||||
|
||||
protected abstract void b(zza zzaVar, ServiceConnection serviceConnection, String str);
|
||||
|
||||
public final void a(String str, String str2, int i, ServiceConnection serviceConnection, String str3) {
|
||||
b(new zza(str, str2, i), serviceConnection, str3);
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.SparseIntArray;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class GoogleApiAvailabilityCache {
|
||||
private final SparseIntArray a = new SparseIntArray();
|
||||
private GoogleApiAvailabilityLight b;
|
||||
|
||||
public GoogleApiAvailabilityCache(GoogleApiAvailabilityLight googleApiAvailabilityLight) {
|
||||
Preconditions.a(googleApiAvailabilityLight);
|
||||
this.b = googleApiAvailabilityLight;
|
||||
}
|
||||
|
||||
public int a(Context context, Api.Client client) {
|
||||
Preconditions.a(context);
|
||||
Preconditions.a(client);
|
||||
if (!client.f()) {
|
||||
return 0;
|
||||
}
|
||||
int g = client.g();
|
||||
int i = this.a.get(g, -1);
|
||||
if (i != -1) {
|
||||
return i;
|
||||
}
|
||||
int i2 = 0;
|
||||
while (true) {
|
||||
if (i2 < this.a.size()) {
|
||||
int keyAt = this.a.keyAt(i2);
|
||||
if (keyAt > g && this.a.get(keyAt) == 0) {
|
||||
i = 0;
|
||||
break;
|
||||
}
|
||||
i2++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == -1) {
|
||||
i = this.b.a(context, g);
|
||||
}
|
||||
this.a.put(g, i);
|
||||
return i;
|
||||
}
|
||||
|
||||
public void a() {
|
||||
this.a.clear();
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface IAccountAccessor extends IInterface {
|
||||
|
||||
public static abstract class Stub extends com.google.android.gms.internal.common.zzb implements IAccountAccessor {
|
||||
|
||||
public static class zza extends com.google.android.gms.internal.common.zza implements IAccountAccessor {
|
||||
zza(IBinder iBinder) {
|
||||
super(iBinder, "com.google.android.gms.common.internal.IAccountAccessor");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.IAccountAccessor
|
||||
public final Account a() throws RemoteException {
|
||||
Parcel a = a(2, i());
|
||||
Account account = (Account) com.google.android.gms.internal.common.zzc.a(a, Account.CREATOR);
|
||||
a.recycle();
|
||||
return account;
|
||||
}
|
||||
}
|
||||
|
||||
public static IAccountAccessor a(IBinder iBinder) {
|
||||
if (iBinder == null) {
|
||||
return null;
|
||||
}
|
||||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.internal.IAccountAccessor");
|
||||
return queryLocalInterface instanceof IAccountAccessor ? (IAccountAccessor) queryLocalInterface : new zza(iBinder);
|
||||
}
|
||||
}
|
||||
|
||||
Account a() throws RemoteException;
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface IGmsCallbacks extends IInterface {
|
||||
|
||||
public static abstract class zza extends com.google.android.gms.internal.common.zzb implements IGmsCallbacks {
|
||||
public zza() {
|
||||
super("com.google.android.gms.common.internal.IGmsCallbacks");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.internal.common.zzb
|
||||
protected final boolean a(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
|
||||
if (i == 1) {
|
||||
a(parcel.readInt(), parcel.readStrongBinder(), (Bundle) com.google.android.gms.internal.common.zzc.a(parcel, Bundle.CREATOR));
|
||||
} else if (i == 2) {
|
||||
b(parcel.readInt(), (Bundle) com.google.android.gms.internal.common.zzc.a(parcel, Bundle.CREATOR));
|
||||
} else {
|
||||
if (i != 3) {
|
||||
return false;
|
||||
}
|
||||
a(parcel.readInt(), parcel.readStrongBinder(), (zzb) com.google.android.gms.internal.common.zzc.a(parcel, zzb.CREATOR));
|
||||
}
|
||||
parcel2.writeNoException();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void a(int i, IBinder iBinder, Bundle bundle) throws RemoteException;
|
||||
|
||||
void a(int i, IBinder iBinder, zzb zzbVar) throws RemoteException;
|
||||
|
||||
void b(int i, Bundle bundle) throws RemoteException;
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.internal;
|
||||
|
||||
import android.os.IInterface;
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public interface IGmsServiceBroker extends IInterface {
|
||||
void a(IGmsCallbacks iGmsCallbacks, GetServiceRequest getServiceRequest) throws RemoteException;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user