Initial version -- added millennium read funcionality
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class ActivityLifecycleObserver {
|
||||
public static final ActivityLifecycleObserver of(Activity activity) {
|
||||
return new zab(zaa.zaa(activity));
|
||||
}
|
||||
|
||||
public abstract ActivityLifecycleObserver onStopCallOnce(Runnable runnable);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.ApiExceptionUtil;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class ApiExceptionMapper implements StatusExceptionMapper {
|
||||
@Override // com.google.android.gms.common.api.internal.StatusExceptionMapper
|
||||
public final Exception getException(Status status) {
|
||||
return ApiExceptionUtil.fromStatus(status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class ApiKey<O extends Api.ApiOptions> {
|
||||
private final int zaa;
|
||||
private final Api zab;
|
||||
private final Api.ApiOptions zac;
|
||||
private final String zad;
|
||||
|
||||
private ApiKey(Api api, Api.ApiOptions apiOptions, String str) {
|
||||
this.zab = api;
|
||||
this.zac = apiOptions;
|
||||
this.zad = str;
|
||||
this.zaa = Objects.hashCode(api, apiOptions, str);
|
||||
}
|
||||
|
||||
public static <O extends Api.ApiOptions> ApiKey<O> getSharedApiKey(Api<O> api, O o, String str) {
|
||||
return new ApiKey<>(api, o, str);
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ApiKey)) {
|
||||
return false;
|
||||
}
|
||||
ApiKey apiKey = (ApiKey) obj;
|
||||
return Objects.equal(this.zab, apiKey.zab) && Objects.equal(this.zac, apiKey.zac) && Objects.equal(this.zad, apiKey.zad);
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final String zaa() {
|
||||
return this.zab.zad();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class BackgroundDetector implements Application.ActivityLifecycleCallbacks, ComponentCallbacks2 {
|
||||
private static final BackgroundDetector zza = new BackgroundDetector();
|
||||
private final AtomicBoolean zzb = new AtomicBoolean();
|
||||
private final AtomicBoolean zzc = new AtomicBoolean();
|
||||
private final ArrayList zzd = new ArrayList();
|
||||
private boolean zze = false;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
public interface BackgroundStateChangeListener {
|
||||
void onBackgroundStateChanged(boolean z);
|
||||
}
|
||||
|
||||
private BackgroundDetector() {
|
||||
}
|
||||
|
||||
public static BackgroundDetector getInstance() {
|
||||
return zza;
|
||||
}
|
||||
|
||||
public static void initialize(Application application) {
|
||||
BackgroundDetector backgroundDetector = zza;
|
||||
synchronized (backgroundDetector) {
|
||||
if (!backgroundDetector.zze) {
|
||||
application.registerActivityLifecycleCallbacks(backgroundDetector);
|
||||
application.registerComponentCallbacks(backgroundDetector);
|
||||
backgroundDetector.zze = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void zza(boolean z) {
|
||||
synchronized (zza) {
|
||||
Iterator it = this.zzd.iterator();
|
||||
while (it.hasNext()) {
|
||||
((BackgroundStateChangeListener) it.next()).onBackgroundStateChanged(z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addListener(BackgroundStateChangeListener backgroundStateChangeListener) {
|
||||
synchronized (zza) {
|
||||
this.zzd.add(backgroundStateChangeListener);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInBackground() {
|
||||
return this.zzb.get();
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
AtomicBoolean atomicBoolean = this.zzc;
|
||||
boolean zCompareAndSet = this.zzb.compareAndSet(true, false);
|
||||
atomicBoolean.set(true);
|
||||
if (zCompareAndSet) {
|
||||
zza(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityDestroyed(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityPaused(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityResumed(Activity activity) {
|
||||
AtomicBoolean atomicBoolean = this.zzc;
|
||||
boolean zCompareAndSet = this.zzb.compareAndSet(true, false);
|
||||
atomicBoolean.set(true);
|
||||
if (zCompareAndSet) {
|
||||
zza(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityStarted(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.app.Application.ActivityLifecycleCallbacks
|
||||
public final void onActivityStopped(Activity activity) {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks
|
||||
public final void onConfigurationChanged(Configuration configuration) {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks
|
||||
public final void onLowMemory() {
|
||||
}
|
||||
|
||||
@Override // android.content.ComponentCallbacks2
|
||||
public final void onTrimMemory(int i) {
|
||||
if (i == 20 && this.zzb.compareAndSet(false, true)) {
|
||||
this.zzc.set(true);
|
||||
zza(true);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean readCurrentStateIfPossible(boolean z) {
|
||||
if (!this.zzc.get()) {
|
||||
if (!PlatformVersion.isAtLeastJellyBean()) {
|
||||
return z;
|
||||
}
|
||||
ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
|
||||
ActivityManager.getMyMemoryState(runningAppProcessInfo);
|
||||
if (!this.zzc.getAndSet(true) && runningAppProcessInfo.importance > 100) {
|
||||
this.zzb.set(true);
|
||||
}
|
||||
}
|
||||
return isInBackground();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BasePendingResult;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class BaseImplementation {
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public interface ResultHolder<R> {
|
||||
void setFailedResult(Status status);
|
||||
|
||||
void setResult(R r);
|
||||
}
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static abstract class ApiMethodImpl<R extends Result, A extends Api.AnyClient> extends BasePendingResult<R> implements ResultHolder<R> {
|
||||
private final Api<?> api;
|
||||
private final Api.AnyClientKey<A> clientKey;
|
||||
|
||||
@Deprecated
|
||||
protected ApiMethodImpl(Api.AnyClientKey<A> anyClientKey, GoogleApiClient googleApiClient) {
|
||||
super((GoogleApiClient) Preconditions.checkNotNull(googleApiClient, "GoogleApiClient must not be null"));
|
||||
this.clientKey = (Api.AnyClientKey) Preconditions.checkNotNull(anyClientKey);
|
||||
this.api = null;
|
||||
}
|
||||
|
||||
private void setFailedResult(RemoteException remoteException) {
|
||||
setFailedResult(new Status(8, remoteException.getLocalizedMessage(), (PendingIntent) null));
|
||||
}
|
||||
|
||||
protected abstract void doExecute(A a) throws RemoteException;
|
||||
|
||||
public final Api<?> getApi() {
|
||||
return this.api;
|
||||
}
|
||||
|
||||
public final Api.AnyClientKey<A> getClientKey() {
|
||||
return this.clientKey;
|
||||
}
|
||||
|
||||
protected void onSetFailedResult(R r) {
|
||||
}
|
||||
|
||||
public final void run(A a) throws DeadObjectException {
|
||||
try {
|
||||
doExecute(a);
|
||||
} catch (DeadObjectException e) {
|
||||
setFailedResult(e);
|
||||
throw e;
|
||||
} catch (RemoteException e2) {
|
||||
setFailedResult(e2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BaseImplementation.ResultHolder
|
||||
public /* bridge */ /* synthetic */ void setResult(Object obj) {
|
||||
super.setResult((Result) obj);
|
||||
}
|
||||
|
||||
protected ApiMethodImpl(Api<?> api, GoogleApiClient googleApiClient) {
|
||||
super((GoogleApiClient) Preconditions.checkNotNull(googleApiClient, "GoogleApiClient must not be null"));
|
||||
Preconditions.checkNotNull(api, "Api must not be null");
|
||||
this.clientKey = api.zab();
|
||||
this.api = api;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BaseImplementation.ResultHolder
|
||||
public final void setFailedResult(Status status) {
|
||||
Preconditions.checkArgument(!status.isSuccess(), "Failed result must not be success");
|
||||
R rCreateFailedResult = createFailedResult(status);
|
||||
setResult((Result) rCreateFailedResult);
|
||||
onSetFailedResult(rCreateFailedResult);
|
||||
}
|
||||
|
||||
protected ApiMethodImpl(BasePendingResult.CallbackHandler<R> callbackHandler) {
|
||||
super(callbackHandler);
|
||||
this.clientKey = new Api.AnyClientKey<>();
|
||||
this.api = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,380 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Releasable;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import com.google.android.gms.common.internal.ICancelToken;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class BasePendingResult<R extends Result> extends PendingResult<R> {
|
||||
static final ThreadLocal zaa = new zaq();
|
||||
public static final /* synthetic */ int zad = 0;
|
||||
private zas resultGuardian;
|
||||
protected final CallbackHandler zab;
|
||||
protected final WeakReference zac;
|
||||
private final Object zae;
|
||||
private final CountDownLatch zaf;
|
||||
private final ArrayList zag;
|
||||
private ResultCallback zah;
|
||||
private final AtomicReference zai;
|
||||
private Result zaj;
|
||||
private Status zak;
|
||||
private volatile boolean zal;
|
||||
private boolean zam;
|
||||
private boolean zan;
|
||||
private ICancelToken zao;
|
||||
private volatile zada zap;
|
||||
private boolean zaq;
|
||||
|
||||
@Deprecated
|
||||
BasePendingResult() {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(Looper.getMainLooper());
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
|
||||
private final Result zaa() {
|
||||
Result result;
|
||||
synchronized (this.zae) {
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
result = this.zaj;
|
||||
this.zaj = null;
|
||||
this.zah = null;
|
||||
this.zal = true;
|
||||
}
|
||||
zadb zadbVar = (zadb) this.zai.getAndSet(null);
|
||||
if (zadbVar != null) {
|
||||
zadbVar.zaa.zab.remove(this);
|
||||
}
|
||||
return (Result) Preconditions.checkNotNull(result);
|
||||
}
|
||||
|
||||
private final void zab(Result result) {
|
||||
this.zaj = result;
|
||||
this.zak = result.getStatus();
|
||||
zar zarVar = null;
|
||||
this.zao = null;
|
||||
this.zaf.countDown();
|
||||
if (this.zam) {
|
||||
this.zah = null;
|
||||
} else {
|
||||
ResultCallback resultCallback = this.zah;
|
||||
if (resultCallback != null) {
|
||||
this.zab.removeMessages(2);
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else if (this.zaj instanceof Releasable) {
|
||||
this.resultGuardian = new zas(this, zarVar);
|
||||
}
|
||||
}
|
||||
ArrayList arrayList = this.zag;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
((PendingResult.StatusListener) arrayList.get(i)).onComplete(this.zak);
|
||||
}
|
||||
this.zag.clear();
|
||||
}
|
||||
|
||||
public static void zal(Result result) {
|
||||
if (result instanceof Releasable) {
|
||||
try {
|
||||
((Releasable) result).release();
|
||||
} catch (RuntimeException e) {
|
||||
Log.w("BasePendingResult", "Unable to release ".concat(String.valueOf(String.valueOf(result))), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
Preconditions.checkArgument(statusListener != null, "Callback cannot be null.");
|
||||
synchronized (this.zae) {
|
||||
if (isReady()) {
|
||||
statusListener.onComplete(this.zak);
|
||||
} else {
|
||||
this.zag.add(statusListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final R await() {
|
||||
Preconditions.checkNotMainThread("await must not be called on the UI thread");
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed");
|
||||
Preconditions.checkState(this.zap == null, "Cannot await if then() has been called.");
|
||||
try {
|
||||
this.zaf.await();
|
||||
} catch (InterruptedException unused) {
|
||||
forceFailureUnlessReady(Status.RESULT_INTERRUPTED);
|
||||
}
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
return (R) zaa();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public void cancel() {
|
||||
synchronized (this.zae) {
|
||||
if (!this.zam && !this.zal) {
|
||||
ICancelToken iCancelToken = this.zao;
|
||||
if (iCancelToken != null) {
|
||||
try {
|
||||
iCancelToken.cancel();
|
||||
} catch (RemoteException unused) {
|
||||
}
|
||||
}
|
||||
zal(this.zaj);
|
||||
this.zam = true;
|
||||
zab(createFailedResult(Status.RESULT_CANCELED));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract R createFailedResult(Status status);
|
||||
|
||||
@Deprecated
|
||||
public final void forceFailureUnlessReady(Status status) {
|
||||
synchronized (this.zae) {
|
||||
if (!isReady()) {
|
||||
setResult(createFailedResult(status));
|
||||
this.zan = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
boolean z;
|
||||
synchronized (this.zae) {
|
||||
z = this.zam;
|
||||
}
|
||||
return z;
|
||||
}
|
||||
|
||||
public final boolean isReady() {
|
||||
return this.zaf.getCount() == 0;
|
||||
}
|
||||
|
||||
protected final void setCancelToken(ICancelToken iCancelToken) {
|
||||
synchronized (this.zae) {
|
||||
this.zao = iCancelToken;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback) {
|
||||
synchronized (this.zae) {
|
||||
if (resultCallback == null) {
|
||||
this.zah = null;
|
||||
return;
|
||||
}
|
||||
boolean z = true;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
if (this.zap != null) {
|
||||
z = false;
|
||||
}
|
||||
Preconditions.checkState(z, "Cannot set callbacks if then() has been called.");
|
||||
if (isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (isReady()) {
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else {
|
||||
this.zah = resultCallback;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform) {
|
||||
TransformedResult<S> transformedResultThen;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
synchronized (this.zae) {
|
||||
Preconditions.checkState(this.zap == null, "Cannot call then() twice.");
|
||||
Preconditions.checkState(this.zah == null, "Cannot call then() if callbacks are set.");
|
||||
Preconditions.checkState(!this.zam, "Cannot call then() if result was canceled.");
|
||||
this.zaq = true;
|
||||
this.zap = new zada(this.zac);
|
||||
transformedResultThen = this.zap.then(resultTransform);
|
||||
if (isReady()) {
|
||||
this.zab.zaa(this.zap, zaa());
|
||||
} else {
|
||||
this.zah = this.zap;
|
||||
}
|
||||
}
|
||||
return transformedResultThen;
|
||||
}
|
||||
|
||||
public final void zak() {
|
||||
boolean z = true;
|
||||
if (!this.zaq && !((Boolean) zaa.get()).booleanValue()) {
|
||||
z = false;
|
||||
}
|
||||
this.zaq = z;
|
||||
}
|
||||
|
||||
public final boolean zam() {
|
||||
boolean zIsCanceled;
|
||||
synchronized (this.zae) {
|
||||
if (((GoogleApiClient) this.zac.get()) == null || !this.zaq) {
|
||||
cancel();
|
||||
}
|
||||
zIsCanceled = isCanceled();
|
||||
}
|
||||
return zIsCanceled;
|
||||
}
|
||||
|
||||
public final void zan(zadb zadbVar) {
|
||||
this.zai.set(zadbVar);
|
||||
}
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static class CallbackHandler<R extends Result> extends com.google.android.gms.internal.base.zau {
|
||||
public CallbackHandler() {
|
||||
super(Looper.getMainLooper());
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i != 1) {
|
||||
if (i == 2) {
|
||||
((BasePendingResult) message.obj).forceFailureUnlessReady(Status.RESULT_TIMEOUT);
|
||||
return;
|
||||
}
|
||||
Log.wtf("BasePendingResult", "Don't know how to handle message: " + message.what, new Exception());
|
||||
return;
|
||||
}
|
||||
Pair pair = (Pair) message.obj;
|
||||
ResultCallback resultCallback = (ResultCallback) pair.first;
|
||||
Result result = (Result) pair.second;
|
||||
try {
|
||||
resultCallback.onResult(result);
|
||||
} catch (RuntimeException e) {
|
||||
BasePendingResult.zal(result);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaa(ResultCallback resultCallback, Result result) {
|
||||
int i = BasePendingResult.zad;
|
||||
sendMessage(obtainMessage(1, new Pair((ResultCallback) Preconditions.checkNotNull(resultCallback), result)));
|
||||
}
|
||||
|
||||
public CallbackHandler(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
}
|
||||
|
||||
public final void setResult(R r) {
|
||||
synchronized (this.zae) {
|
||||
if (this.zan || this.zam) {
|
||||
zal(r);
|
||||
return;
|
||||
}
|
||||
isReady();
|
||||
Preconditions.checkState(!isReady(), "Results have already been set");
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed");
|
||||
zab(r);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
protected BasePendingResult(Looper looper) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(looper);
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final R await(long j, TimeUnit timeUnit) {
|
||||
if (j > 0) {
|
||||
Preconditions.checkNotMainThread("await must not be called on the UI thread when time is greater than zero.");
|
||||
}
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
Preconditions.checkState(this.zap == null, "Cannot await if then() has been called.");
|
||||
try {
|
||||
if (!this.zaf.await(j, timeUnit)) {
|
||||
forceFailureUnlessReady(Status.RESULT_TIMEOUT);
|
||||
}
|
||||
} catch (InterruptedException unused) {
|
||||
forceFailureUnlessReady(Status.RESULT_INTERRUPTED);
|
||||
}
|
||||
Preconditions.checkState(isReady(), "Result is not ready.");
|
||||
return (R) zaa();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback, long j, TimeUnit timeUnit) {
|
||||
synchronized (this.zae) {
|
||||
if (resultCallback == null) {
|
||||
this.zah = null;
|
||||
return;
|
||||
}
|
||||
boolean z = true;
|
||||
Preconditions.checkState(!this.zal, "Result has already been consumed.");
|
||||
if (this.zap != null) {
|
||||
z = false;
|
||||
}
|
||||
Preconditions.checkState(z, "Cannot set callbacks if then() has been called.");
|
||||
if (isCanceled()) {
|
||||
return;
|
||||
}
|
||||
if (isReady()) {
|
||||
this.zab.zaa(resultCallback, zaa());
|
||||
} else {
|
||||
this.zah = resultCallback;
|
||||
CallbackHandler callbackHandler = this.zab;
|
||||
callbackHandler.sendMessageDelayed(callbackHandler.obtainMessage(2, this), timeUnit.toMillis(j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected BasePendingResult(GoogleApiClient googleApiClient) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = new CallbackHandler(googleApiClient != null ? googleApiClient.getLooper() : Looper.getMainLooper());
|
||||
this.zac = new WeakReference(googleApiClient);
|
||||
}
|
||||
|
||||
protected BasePendingResult(CallbackHandler<R> callbackHandler) {
|
||||
this.zae = new Object();
|
||||
this.zaf = new CountDownLatch(1);
|
||||
this.zag = new ArrayList();
|
||||
this.zai = new AtomicReference();
|
||||
this.zaq = false;
|
||||
this.zab = (CallbackHandler) Preconditions.checkNotNull(callbackHandler, "CallbackHandler must not be null");
|
||||
this.zac = new WeakReference(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface ConnectionCallbacks {
|
||||
void onConnected(Bundle bundle);
|
||||
|
||||
void onConnectionSuspended(int i);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class DataHolderNotifier<L> implements ListenerHolder.Notifier<L> {
|
||||
private final DataHolder zaa;
|
||||
|
||||
protected DataHolderNotifier(DataHolder dataHolder) {
|
||||
this.zaa = dataHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ListenerHolder.Notifier
|
||||
public final void notifyListener(L l) {
|
||||
notifyListener(l, this.zaa);
|
||||
}
|
||||
|
||||
protected abstract void notifyListener(L l, DataHolder dataHolder);
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ListenerHolder.Notifier
|
||||
public void onNotifyListenerFailed() {
|
||||
DataHolder dataHolder = this.zaa;
|
||||
if (dataHolder != null) {
|
||||
dataHolder.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Releasable;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class DataHolderResult implements Result, Releasable {
|
||||
protected final DataHolder mDataHolder;
|
||||
protected final Status mStatus;
|
||||
|
||||
protected DataHolderResult(DataHolder dataHolder) {
|
||||
this(dataHolder, new Status(dataHolder.getStatusCode()));
|
||||
}
|
||||
|
||||
protected DataHolderResult(DataHolder dataHolder, Status status) {
|
||||
this.mStatus = status;
|
||||
this.mDataHolder = dataHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Result
|
||||
public Status getStatus() {
|
||||
return this.mStatus;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Releasable
|
||||
public void release() {
|
||||
DataHolder dataHolder = this.mDataHolder;
|
||||
if (dataHolder != null) {
|
||||
dataHolder.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,435 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import androidx.collection.ArraySet;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.GmsClientSupervisor;
|
||||
import com.google.android.gms.common.internal.MethodInvocation;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfigManager;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfiguration;
|
||||
import com.google.android.gms.common.internal.TelemetryData;
|
||||
import com.google.android.gms.common.internal.TelemetryLogging;
|
||||
import com.google.android.gms.common.internal.TelemetryLoggingClient;
|
||||
import com.google.android.gms.common.util.DeviceProperties;
|
||||
import com.google.android.gms.location.DeviceOrientationRequest;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class GoogleApiManager implements Handler.Callback {
|
||||
public static final Status zaa = new Status(4, "Sign-out occurred while this API call was in progress.");
|
||||
private static final Status zab = new Status(4, "The user must be signed in to make this API call.");
|
||||
private static final Object zac = new Object();
|
||||
private static GoogleApiManager zad;
|
||||
private TelemetryData zag;
|
||||
private TelemetryLoggingClient zah;
|
||||
private final Context zai;
|
||||
private final GoogleApiAvailability zaj;
|
||||
private final com.google.android.gms.common.internal.zal zak;
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final Handler zar;
|
||||
private volatile boolean zas;
|
||||
private long zae = DeviceOrientationRequest.OUTPUT_PERIOD_MEDIUM;
|
||||
private boolean zaf = false;
|
||||
private final AtomicInteger zal = new AtomicInteger(1);
|
||||
private final AtomicInteger zam = new AtomicInteger(0);
|
||||
private final Map zan = new ConcurrentHashMap(5, 0.75f, 1);
|
||||
private zaae zao = null;
|
||||
private final Set zap = new ArraySet();
|
||||
private final Set zaq = new ArraySet();
|
||||
|
||||
private GoogleApiManager(Context context, Looper looper, GoogleApiAvailability googleApiAvailability) {
|
||||
this.zas = true;
|
||||
this.zai = context;
|
||||
com.google.android.gms.internal.base.zau zauVar = new com.google.android.gms.internal.base.zau(looper, this);
|
||||
this.zar = zauVar;
|
||||
this.zaj = googleApiAvailability;
|
||||
this.zak = new com.google.android.gms.common.internal.zal(googleApiAvailability);
|
||||
if (DeviceProperties.isAuto(context)) {
|
||||
this.zas = false;
|
||||
}
|
||||
zauVar.sendMessage(zauVar.obtainMessage(6));
|
||||
}
|
||||
|
||||
public static void reportSignOut() {
|
||||
synchronized (zac) {
|
||||
GoogleApiManager googleApiManager = zad;
|
||||
if (googleApiManager != null) {
|
||||
googleApiManager.zam.incrementAndGet();
|
||||
Handler handler = googleApiManager.zar;
|
||||
handler.sendMessageAtFrontOfQueue(handler.obtainMessage(10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public static Status zaF(ApiKey apiKey, ConnectionResult connectionResult) {
|
||||
return new Status(connectionResult, "API: " + apiKey.zaa() + " is not available on this device. Connection failed with: " + String.valueOf(connectionResult));
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
private final zabq zaG(GoogleApi googleApi) {
|
||||
Map map = this.zan;
|
||||
ApiKey apiKey = googleApi.getApiKey();
|
||||
zabq zabqVar = (zabq) map.get(apiKey);
|
||||
if (zabqVar == null) {
|
||||
zabqVar = new zabq(this, googleApi);
|
||||
this.zan.put(apiKey, zabqVar);
|
||||
}
|
||||
if (zabqVar.zaA()) {
|
||||
this.zaq.add(apiKey);
|
||||
}
|
||||
zabqVar.zao();
|
||||
return zabqVar;
|
||||
}
|
||||
|
||||
private final TelemetryLoggingClient zaH() {
|
||||
if (this.zah == null) {
|
||||
this.zah = TelemetryLogging.getClient(this.zai);
|
||||
}
|
||||
return this.zah;
|
||||
}
|
||||
|
||||
private final void zaI() {
|
||||
TelemetryData telemetryData = this.zag;
|
||||
if (telemetryData != null) {
|
||||
if (telemetryData.zaa() > 0 || zaD()) {
|
||||
zaH().log(telemetryData);
|
||||
}
|
||||
this.zag = null;
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaJ(TaskCompletionSource taskCompletionSource, int i, GoogleApi googleApi) {
|
||||
zacd zacdVarZaa;
|
||||
if (i == 0 || (zacdVarZaa = zacd.zaa(this, i, googleApi.getApiKey())) == null) {
|
||||
return;
|
||||
}
|
||||
Task task = taskCompletionSource.getTask();
|
||||
final Handler handler = this.zar;
|
||||
handler.getClass();
|
||||
task.addOnCompleteListener(new Executor() { // from class: com.google.android.gms.common.api.internal.zabk
|
||||
@Override // java.util.concurrent.Executor
|
||||
public final void execute(Runnable runnable) {
|
||||
handler.post(runnable);
|
||||
}
|
||||
}, zacdVarZaa);
|
||||
}
|
||||
|
||||
public static GoogleApiManager zaj() {
|
||||
GoogleApiManager googleApiManager;
|
||||
synchronized (zac) {
|
||||
Preconditions.checkNotNull(zad, "Must guarantee manager is non-null before using getInstance");
|
||||
googleApiManager = zad;
|
||||
}
|
||||
return googleApiManager;
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public static GoogleApiManager zak(Context context) {
|
||||
GoogleApiManager googleApiManager;
|
||||
synchronized (zac) {
|
||||
if (zad == null) {
|
||||
zad = new GoogleApiManager(context.getApplicationContext(), GmsClientSupervisor.getOrStartHandlerThread().getLooper(), GoogleApiAvailability.getInstance());
|
||||
}
|
||||
googleApiManager = zad;
|
||||
}
|
||||
return googleApiManager;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler.Callback
|
||||
public final boolean handleMessage(Message message) {
|
||||
zabq zabqVar = null;
|
||||
switch (message.what) {
|
||||
case 1:
|
||||
this.zae = true == ((Boolean) message.obj).booleanValue() ? DeviceOrientationRequest.OUTPUT_PERIOD_MEDIUM : 300000L;
|
||||
this.zar.removeMessages(12);
|
||||
for (ApiKey apiKey : this.zan.keySet()) {
|
||||
Handler handler = this.zar;
|
||||
handler.sendMessageDelayed(handler.obtainMessage(12, apiKey), this.zae);
|
||||
}
|
||||
return true;
|
||||
case 2:
|
||||
zal zalVar = (zal) message.obj;
|
||||
Iterator it = zalVar.zab().iterator();
|
||||
while (true) {
|
||||
if (it.hasNext()) {
|
||||
ApiKey apiKey2 = (ApiKey) it.next();
|
||||
zabq zabqVar2 = (zabq) this.zan.get(apiKey2);
|
||||
if (zabqVar2 == null) {
|
||||
zalVar.zac(apiKey2, new ConnectionResult(13), null);
|
||||
} else if (zabqVar2.zaz()) {
|
||||
zalVar.zac(apiKey2, ConnectionResult.RESULT_SUCCESS, zabqVar2.zaf().getEndpointPackageName());
|
||||
} else {
|
||||
ConnectionResult connectionResultZad = zabqVar2.zad();
|
||||
if (connectionResultZad != null) {
|
||||
zalVar.zac(apiKey2, connectionResultZad, null);
|
||||
} else {
|
||||
zabqVar2.zat(zalVar);
|
||||
zabqVar2.zao();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 3:
|
||||
for (zabq zabqVar3 : this.zan.values()) {
|
||||
zabqVar3.zan();
|
||||
zabqVar3.zao();
|
||||
}
|
||||
return true;
|
||||
case 4:
|
||||
case 8:
|
||||
case 13:
|
||||
zach zachVar = (zach) message.obj;
|
||||
zabq zabqVarZaG = (zabq) this.zan.get(zachVar.zac.getApiKey());
|
||||
if (zabqVarZaG == null) {
|
||||
zabqVarZaG = zaG(zachVar.zac);
|
||||
}
|
||||
if (!zabqVarZaG.zaA() || this.zam.get() == zachVar.zab) {
|
||||
zabqVarZaG.zap(zachVar.zaa);
|
||||
} else {
|
||||
zachVar.zaa.zad(zaa);
|
||||
zabqVarZaG.zav();
|
||||
}
|
||||
return true;
|
||||
case 5:
|
||||
int i = message.arg1;
|
||||
ConnectionResult connectionResult = (ConnectionResult) message.obj;
|
||||
Iterator it2 = this.zan.values().iterator();
|
||||
while (true) {
|
||||
if (it2.hasNext()) {
|
||||
zabq zabqVar4 = (zabq) it2.next();
|
||||
if (zabqVar4.zab() == i) {
|
||||
zabqVar = zabqVar4;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (zabqVar == null) {
|
||||
Log.wtf("GoogleApiManager", "Could not find API instance " + i + " while trying to fail enqueued calls.", new Exception());
|
||||
} else if (connectionResult.getErrorCode() == 13) {
|
||||
zabqVar.zaE(new Status(17, "Error resolution was canceled by the user, original error message: " + this.zaj.getErrorString(connectionResult.getErrorCode()) + ": " + connectionResult.getErrorMessage()));
|
||||
} else {
|
||||
zabqVar.zaE(zaF(zabqVar.zad, connectionResult));
|
||||
}
|
||||
return true;
|
||||
case 6:
|
||||
if (this.zai.getApplicationContext() instanceof Application) {
|
||||
BackgroundDetector.initialize((Application) this.zai.getApplicationContext());
|
||||
BackgroundDetector.getInstance().addListener(new zabl(this));
|
||||
if (!BackgroundDetector.getInstance().readCurrentStateIfPossible(true)) {
|
||||
this.zae = 300000L;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 7:
|
||||
zaG((GoogleApi) message.obj);
|
||||
return true;
|
||||
case 9:
|
||||
if (this.zan.containsKey(message.obj)) {
|
||||
((zabq) this.zan.get(message.obj)).zau();
|
||||
}
|
||||
return true;
|
||||
case 10:
|
||||
Iterator it3 = this.zaq.iterator();
|
||||
while (it3.hasNext()) {
|
||||
zabq zabqVar5 = (zabq) this.zan.remove((ApiKey) it3.next());
|
||||
if (zabqVar5 != null) {
|
||||
zabqVar5.zav();
|
||||
}
|
||||
}
|
||||
this.zaq.clear();
|
||||
return true;
|
||||
case 11:
|
||||
if (this.zan.containsKey(message.obj)) {
|
||||
((zabq) this.zan.get(message.obj)).zaw();
|
||||
}
|
||||
return true;
|
||||
case 12:
|
||||
if (this.zan.containsKey(message.obj)) {
|
||||
((zabq) this.zan.get(message.obj)).zaB();
|
||||
}
|
||||
return true;
|
||||
case 14:
|
||||
zaaf zaafVar = (zaaf) message.obj;
|
||||
ApiKey apiKeyZaa = zaafVar.zaa();
|
||||
if (this.zan.containsKey(apiKeyZaa)) {
|
||||
zaafVar.zab().setResult(Boolean.valueOf(((zabq) this.zan.get(apiKeyZaa)).zaO(false)));
|
||||
} else {
|
||||
zaafVar.zab().setResult(false);
|
||||
}
|
||||
return true;
|
||||
case 15:
|
||||
zabs zabsVar = (zabs) message.obj;
|
||||
if (this.zan.containsKey(zabsVar.zaa)) {
|
||||
zabq.zal((zabq) this.zan.get(zabsVar.zaa), zabsVar);
|
||||
}
|
||||
return true;
|
||||
case 16:
|
||||
zabs zabsVar2 = (zabs) message.obj;
|
||||
if (this.zan.containsKey(zabsVar2.zaa)) {
|
||||
zabq.zam((zabq) this.zan.get(zabsVar2.zaa), zabsVar2);
|
||||
}
|
||||
return true;
|
||||
case 17:
|
||||
zaI();
|
||||
return true;
|
||||
case 18:
|
||||
zace zaceVar = (zace) message.obj;
|
||||
if (zaceVar.zac == 0) {
|
||||
zaH().log(new TelemetryData(zaceVar.zab, Arrays.asList(zaceVar.zaa)));
|
||||
} else {
|
||||
TelemetryData telemetryData = this.zag;
|
||||
if (telemetryData != null) {
|
||||
List listZab = telemetryData.zab();
|
||||
if (telemetryData.zaa() != zaceVar.zab || (listZab != null && listZab.size() >= zaceVar.zad)) {
|
||||
this.zar.removeMessages(17);
|
||||
zaI();
|
||||
} else {
|
||||
this.zag.zac(zaceVar.zaa);
|
||||
}
|
||||
}
|
||||
if (this.zag == null) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.add(zaceVar.zaa);
|
||||
this.zag = new TelemetryData(zaceVar.zab, arrayList);
|
||||
Handler handler2 = this.zar;
|
||||
handler2.sendMessageDelayed(handler2.obtainMessage(17), zaceVar.zac);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
case 19:
|
||||
this.zaf = false;
|
||||
return true;
|
||||
default:
|
||||
Log.w("GoogleApiManager", "Unknown message id: " + message.what);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaA(zaae zaaeVar) {
|
||||
synchronized (zac) {
|
||||
if (this.zao != zaaeVar) {
|
||||
this.zao = zaaeVar;
|
||||
this.zap.clear();
|
||||
}
|
||||
this.zap.addAll(zaaeVar.zaa());
|
||||
}
|
||||
}
|
||||
|
||||
final void zaB(zaae zaaeVar) {
|
||||
synchronized (zac) {
|
||||
if (this.zao == zaaeVar) {
|
||||
this.zao = null;
|
||||
this.zap.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final boolean zaD() {
|
||||
if (this.zaf) {
|
||||
return false;
|
||||
}
|
||||
RootTelemetryConfiguration config = RootTelemetryConfigManager.getInstance().getConfig();
|
||||
if (config != null && !config.getMethodInvocationTelemetryEnabled()) {
|
||||
return false;
|
||||
}
|
||||
int iZaa = this.zak.zaa(this.zai, 203400000);
|
||||
return iZaa == -1 || iZaa == 0;
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
final boolean zaE(ConnectionResult connectionResult, int i) {
|
||||
return this.zaj.zah(this.zai, connectionResult, i);
|
||||
}
|
||||
|
||||
public final int zaa() {
|
||||
return this.zal.getAndIncrement();
|
||||
}
|
||||
|
||||
final zabq zai(ApiKey apiKey) {
|
||||
return (zabq) this.zan.get(apiKey);
|
||||
}
|
||||
|
||||
public final Task zam(Iterable iterable) {
|
||||
zal zalVar = new zal(iterable);
|
||||
this.zar.sendMessage(this.zar.obtainMessage(2, zalVar));
|
||||
return zalVar.zaa();
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final Task zan(GoogleApi googleApi) {
|
||||
zaaf zaafVar = new zaaf(googleApi.getApiKey());
|
||||
this.zar.sendMessage(this.zar.obtainMessage(14, zaafVar));
|
||||
return zaafVar.zab().getTask();
|
||||
}
|
||||
|
||||
public final Task zao(GoogleApi googleApi, RegisterListenerMethod registerListenerMethod, UnregisterListenerMethod unregisterListenerMethod, Runnable runnable) {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
zaJ(taskCompletionSource, registerListenerMethod.zaa(), googleApi);
|
||||
this.zar.sendMessage(this.zar.obtainMessage(8, new zach(new zaf(new zaci(registerListenerMethod, unregisterListenerMethod, runnable), taskCompletionSource), this.zam.get(), googleApi)));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
public final Task zap(GoogleApi googleApi, ListenerHolder.ListenerKey listenerKey, int i) {
|
||||
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
|
||||
zaJ(taskCompletionSource, i, googleApi);
|
||||
this.zar.sendMessage(this.zar.obtainMessage(13, new zach(new zah(listenerKey, taskCompletionSource), this.zam.get(), googleApi)));
|
||||
return taskCompletionSource.getTask();
|
||||
}
|
||||
|
||||
public final void zau(GoogleApi googleApi, int i, BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
this.zar.sendMessage(this.zar.obtainMessage(4, new zach(new zae(i, apiMethodImpl), this.zam.get(), googleApi)));
|
||||
}
|
||||
|
||||
public final void zav(GoogleApi googleApi, int i, TaskApiCall taskApiCall, TaskCompletionSource taskCompletionSource, StatusExceptionMapper statusExceptionMapper) {
|
||||
zaJ(taskCompletionSource, taskApiCall.zaa(), googleApi);
|
||||
this.zar.sendMessage(this.zar.obtainMessage(4, new zach(new zag(i, taskApiCall, taskCompletionSource, statusExceptionMapper), this.zam.get(), googleApi)));
|
||||
}
|
||||
|
||||
final void zaw(MethodInvocation methodInvocation, int i, long j, int i2) {
|
||||
this.zar.sendMessage(this.zar.obtainMessage(18, new zace(methodInvocation, i, j, i2)));
|
||||
}
|
||||
|
||||
public final void zax(ConnectionResult connectionResult, int i) {
|
||||
if (zaE(connectionResult, i)) {
|
||||
return;
|
||||
}
|
||||
Handler handler = this.zar;
|
||||
handler.sendMessage(handler.obtainMessage(5, i, 0, connectionResult));
|
||||
}
|
||||
|
||||
public final void zay() {
|
||||
Handler handler = this.zar;
|
||||
handler.sendMessage(handler.obtainMessage(3));
|
||||
}
|
||||
|
||||
public final void zaz(GoogleApi googleApi) {
|
||||
Handler handler = this.zar;
|
||||
handler.sendMessage(handler.obtainMessage(7, googleApi));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
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;
|
||||
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.zzah;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
@Deprecated
|
||||
public final class GoogleServices {
|
||||
private static final Object zza = new Object();
|
||||
private static GoogleServices zzb;
|
||||
private final String zzc;
|
||||
private final Status zzd;
|
||||
private final boolean zze;
|
||||
private final boolean zzf;
|
||||
|
||||
GoogleServices(Context context) {
|
||||
Resources resources = context.getResources();
|
||||
int identifier = resources.getIdentifier("google_app_measurement_enable", "integer", resources.getResourcePackageName(R.string.common_google_play_services_unknown_issue));
|
||||
if (identifier != 0) {
|
||||
int integer = resources.getInteger(identifier);
|
||||
boolean z = integer == 0;
|
||||
z = integer != 0;
|
||||
this.zzf = z;
|
||||
} else {
|
||||
this.zzf = false;
|
||||
}
|
||||
this.zze = z;
|
||||
String strZzb = zzah.zzb(context);
|
||||
strZzb = strZzb == null ? new StringResourceValueReader(context).getString("google_app_id") : strZzb;
|
||||
if (TextUtils.isEmpty(strZzb)) {
|
||||
this.zzd = new Status(10, "Missing google app id value from from string resources with name google_app_id.");
|
||||
this.zzc = null;
|
||||
} else {
|
||||
this.zzc = strZzb;
|
||||
this.zzd = Status.RESULT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
GoogleServices(String str, boolean z) {
|
||||
this.zzc = str;
|
||||
this.zzd = Status.RESULT_SUCCESS;
|
||||
this.zze = z;
|
||||
this.zzf = !z;
|
||||
}
|
||||
|
||||
private static GoogleServices checkInitialized(String str) {
|
||||
GoogleServices googleServices;
|
||||
synchronized (zza) {
|
||||
googleServices = zzb;
|
||||
if (googleServices == null) {
|
||||
throw new IllegalStateException("Initialize must be called before " + str + ".");
|
||||
}
|
||||
}
|
||||
return googleServices;
|
||||
}
|
||||
|
||||
static void clearInstanceForTest() {
|
||||
synchronized (zza) {
|
||||
zzb = null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getGoogleAppId() {
|
||||
return checkInitialized("getGoogleAppId").zzc;
|
||||
}
|
||||
|
||||
public static Status initialize(Context context) {
|
||||
Status status;
|
||||
Preconditions.checkNotNull(context, "Context must not be null.");
|
||||
synchronized (zza) {
|
||||
if (zzb == null) {
|
||||
zzb = new GoogleServices(context);
|
||||
}
|
||||
status = zzb.zzd;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public static boolean isMeasurementEnabled() {
|
||||
GoogleServices googleServicesCheckInitialized = checkInitialized("isMeasurementEnabled");
|
||||
return googleServicesCheckInitialized.zzd.isSuccess() && googleServicesCheckInitialized.zze;
|
||||
}
|
||||
|
||||
public static boolean isMeasurementExplicitlyDisabled() {
|
||||
return checkInitialized("isMeasurementExplicitlyDisabled").zzf;
|
||||
}
|
||||
|
||||
Status checkGoogleAppId(String str) {
|
||||
String str2 = this.zzc;
|
||||
if (str2 == null || str2.equals(str)) {
|
||||
return Status.RESULT_SUCCESS;
|
||||
}
|
||||
return new Status(10, "Initialize was called with two different Google App IDs. Only the first app ID will be used: '" + this.zzc + "'.");
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public static Status initialize(Context context, String str, boolean z) {
|
||||
Preconditions.checkNotNull(context, "Context must not be null.");
|
||||
Preconditions.checkNotEmpty(str, "App ID must be nonempty.");
|
||||
synchronized (zza) {
|
||||
GoogleServices googleServices = zzb;
|
||||
if (googleServices != null) {
|
||||
return googleServices.checkGoogleAppId(str);
|
||||
}
|
||||
GoogleServices googleServices2 = new GoogleServices(str, z);
|
||||
zzb = googleServices2;
|
||||
return googleServices2.zzd;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.IInterface;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface IStatusCallback extends IInterface {
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static abstract class Stub extends com.google.android.gms.internal.base.zab implements IStatusCallback {
|
||||
public Stub() {
|
||||
super("com.google.android.gms.common.api.internal.IStatusCallback");
|
||||
}
|
||||
|
||||
public static IStatusCallback asInterface(IBinder iBinder) {
|
||||
if (iBinder == null) {
|
||||
return null;
|
||||
}
|
||||
IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.api.internal.IStatusCallback");
|
||||
return iInterfaceQueryLocalInterface instanceof IStatusCallback ? (IStatusCallback) iInterfaceQueryLocalInterface : new zaby(iBinder);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.internal.base.zab
|
||||
protected final boolean zaa(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
|
||||
if (i != 1) {
|
||||
return false;
|
||||
}
|
||||
Status status = (Status) com.google.android.gms.internal.base.zac.zaa(parcel, Status.CREATOR);
|
||||
com.google.android.gms.internal.base.zac.zab(parcel);
|
||||
onResult(status);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void onResult(Status status) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContextWrapper;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class LifecycleActivity {
|
||||
private final Object zza;
|
||||
|
||||
public LifecycleActivity(Activity activity) {
|
||||
Preconditions.checkNotNull(activity, "Activity must not be null");
|
||||
this.zza = activity;
|
||||
}
|
||||
|
||||
public final Activity zza() {
|
||||
return (Activity) this.zza;
|
||||
}
|
||||
|
||||
public final FragmentActivity zzb() {
|
||||
return (FragmentActivity) this.zza;
|
||||
}
|
||||
|
||||
public final boolean zzc() {
|
||||
return this.zza instanceof Activity;
|
||||
}
|
||||
|
||||
public final boolean zzd() {
|
||||
return this.zza instanceof FragmentActivity;
|
||||
}
|
||||
|
||||
public LifecycleActivity(ContextWrapper contextWrapper) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContextWrapper;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class LifecycleCallback {
|
||||
protected final LifecycleFragment mLifecycleFragment;
|
||||
|
||||
protected LifecycleCallback(LifecycleFragment lifecycleFragment) {
|
||||
this.mLifecycleFragment = lifecycleFragment;
|
||||
}
|
||||
|
||||
private static LifecycleFragment getChimeraLifecycleFragmentImpl(LifecycleActivity lifecycleActivity) {
|
||||
throw new IllegalStateException("Method not available in SDK.");
|
||||
}
|
||||
|
||||
public static LifecycleFragment getFragment(Activity activity) {
|
||||
return getFragment(new LifecycleActivity(activity));
|
||||
}
|
||||
|
||||
public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
}
|
||||
|
||||
public Activity getActivity() {
|
||||
Activity lifecycleActivity = this.mLifecycleFragment.getLifecycleActivity();
|
||||
Preconditions.checkNotNull(lifecycleActivity);
|
||||
return lifecycleActivity;
|
||||
}
|
||||
|
||||
public void onActivityResult(int i, int i2, Intent intent) {
|
||||
}
|
||||
|
||||
public void onCreate(Bundle bundle) {
|
||||
}
|
||||
|
||||
public void onDestroy() {
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
}
|
||||
|
||||
public void onSaveInstanceState(Bundle bundle) {
|
||||
}
|
||||
|
||||
public void onStart() {
|
||||
}
|
||||
|
||||
public void onStop() {
|
||||
}
|
||||
|
||||
public static LifecycleFragment getFragment(ContextWrapper contextWrapper) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
protected static LifecycleFragment getFragment(LifecycleActivity lifecycleActivity) {
|
||||
if (lifecycleActivity.zzd()) {
|
||||
return zzd.zzc(lifecycleActivity.zzb());
|
||||
}
|
||||
if (lifecycleActivity.zzc()) {
|
||||
return zzb.zzc(lifecycleActivity.zza());
|
||||
}
|
||||
throw new IllegalArgumentException("Can't get fragment for unexpected activity.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface LifecycleFragment {
|
||||
void addCallback(String str, LifecycleCallback lifecycleCallback);
|
||||
|
||||
<T extends LifecycleCallback> T getCallbackOrNull(String str, Class<T> cls);
|
||||
|
||||
Activity getLifecycleActivity();
|
||||
|
||||
boolean isCreated();
|
||||
|
||||
boolean isStarted();
|
||||
|
||||
void startActivityForResult(Intent intent, int i);
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.concurrent.HandlerExecutor;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class ListenerHolder<L> {
|
||||
private final Executor zaa;
|
||||
private volatile Object zab;
|
||||
private volatile ListenerKey zac;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static final class ListenerKey<L> {
|
||||
private final Object zaa;
|
||||
private final String zab;
|
||||
|
||||
ListenerKey(L l, String str) {
|
||||
this.zaa = l;
|
||||
this.zab = str;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ListenerKey)) {
|
||||
return false;
|
||||
}
|
||||
ListenerKey listenerKey = (ListenerKey) obj;
|
||||
return this.zaa == listenerKey.zaa && this.zab.equals(listenerKey.zab);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (System.identityHashCode(this.zaa) * 31) + this.zab.hashCode();
|
||||
}
|
||||
|
||||
public String toIdString() {
|
||||
return this.zab + "@" + System.identityHashCode(this.zaa);
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public interface Notifier<L> {
|
||||
void notifyListener(L l);
|
||||
|
||||
void onNotifyListenerFailed();
|
||||
}
|
||||
|
||||
ListenerHolder(Looper looper, L l, String str) {
|
||||
this.zaa = new HandlerExecutor(looper);
|
||||
this.zab = Preconditions.checkNotNull(l, "Listener must not be null");
|
||||
this.zac = new ListenerKey(l, Preconditions.checkNotEmpty(str));
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
this.zab = null;
|
||||
this.zac = null;
|
||||
}
|
||||
|
||||
public ListenerKey<L> getListenerKey() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
public boolean hasListener() {
|
||||
return this.zab != null;
|
||||
}
|
||||
|
||||
public void notifyListener(final Notifier<? super L> notifier) {
|
||||
Preconditions.checkNotNull(notifier, "Notifier must not be null");
|
||||
this.zaa.execute(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacb
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zaa.zaa(notifier);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
final void zaa(Notifier notifier) {
|
||||
Object obj = this.zab;
|
||||
if (obj == null) {
|
||||
notifier.onNotifyListenerFailed();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
notifier.notifyListener(obj);
|
||||
} catch (RuntimeException e) {
|
||||
notifier.onNotifyListenerFailed();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
ListenerHolder(Executor executor, L l, String str) {
|
||||
this.zaa = (Executor) Preconditions.checkNotNull(executor, "Executor must not be null");
|
||||
this.zab = Preconditions.checkNotNull(l, "Listener must not be null");
|
||||
this.zac = new ListenerKey(l, Preconditions.checkNotEmpty(str));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class ListenerHolders {
|
||||
private final Set zaa = Collections.newSetFromMap(new WeakHashMap());
|
||||
|
||||
public static <L> ListenerHolder<L> createListenerHolder(L l, Looper looper, String str) {
|
||||
Preconditions.checkNotNull(l, "Listener must not be null");
|
||||
Preconditions.checkNotNull(looper, "Looper must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
return new ListenerHolder<>(looper, l, str);
|
||||
}
|
||||
|
||||
public static <L> ListenerHolder.ListenerKey<L> createListenerKey(L l, String str) {
|
||||
Preconditions.checkNotNull(l, "Listener must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
Preconditions.checkNotEmpty(str, "Listener type must not be empty");
|
||||
return new ListenerHolder.ListenerKey<>(l, str);
|
||||
}
|
||||
|
||||
public final ListenerHolder zaa(Object obj, Looper looper, String str) {
|
||||
Set set = this.zaa;
|
||||
ListenerHolder listenerHolderCreateListenerHolder = createListenerHolder(obj, looper, "NO_TYPE");
|
||||
set.add(listenerHolderCreateListenerHolder);
|
||||
return listenerHolderCreateListenerHolder;
|
||||
}
|
||||
|
||||
public final void zab() {
|
||||
Iterator it = this.zaa.iterator();
|
||||
while (it.hasNext()) {
|
||||
((ListenerHolder) it.next()).clear();
|
||||
}
|
||||
this.zaa.clear();
|
||||
}
|
||||
|
||||
public static <L> ListenerHolder<L> createListenerHolder(L l, Executor executor, String str) {
|
||||
Preconditions.checkNotNull(l, "Listener must not be null");
|
||||
Preconditions.checkNotNull(executor, "Executor must not be null");
|
||||
Preconditions.checkNotNull(str, "Listener type must not be null");
|
||||
return new ListenerHolder<>(executor, l, str);
|
||||
}
|
||||
}
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Scope;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.GmsClientSupervisor;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class NonGmsServiceBrokerClient implements Api.Client, ServiceConnection {
|
||||
private static final String zaa = "NonGmsServiceBrokerClient";
|
||||
private final String zab;
|
||||
private final String zac;
|
||||
private final ComponentName zad;
|
||||
private final Context zae;
|
||||
private final ConnectionCallbacks zaf;
|
||||
private final Handler zag;
|
||||
private final OnConnectionFailedListener zah;
|
||||
private IBinder zai;
|
||||
private boolean zaj;
|
||||
private String zak;
|
||||
private String zal;
|
||||
|
||||
public NonGmsServiceBrokerClient(Context context, Looper looper, ComponentName componentName, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this(context, looper, null, null, componentName, connectionCallbacks, onConnectionFailedListener);
|
||||
}
|
||||
|
||||
private final void zad() {
|
||||
if (Thread.currentThread() != this.zag.getLooper().getThread()) {
|
||||
throw new IllegalStateException("This method should only run on the NonGmsServiceBrokerClient's handler thread.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void connect(BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks) {
|
||||
zad();
|
||||
String.valueOf(this.zai);
|
||||
if (isConnected()) {
|
||||
try {
|
||||
disconnect("connect() called when already connected");
|
||||
} catch (Exception unused) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
ComponentName componentName = this.zad;
|
||||
if (componentName != null) {
|
||||
intent.setComponent(componentName);
|
||||
} else {
|
||||
intent.setPackage(this.zab).setAction(this.zac);
|
||||
}
|
||||
boolean zBindService = this.zae.bindService(intent, this, GmsClientSupervisor.getDefaultBindFlags());
|
||||
this.zaj = zBindService;
|
||||
if (!zBindService) {
|
||||
this.zai = null;
|
||||
this.zah.onConnectionFailed(new ConnectionResult(16));
|
||||
}
|
||||
String.valueOf(this.zai);
|
||||
} catch (SecurityException e) {
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void disconnect() {
|
||||
zad();
|
||||
String.valueOf(this.zai);
|
||||
try {
|
||||
this.zae.unbindService(this);
|
||||
} catch (IllegalArgumentException unused) {
|
||||
}
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Feature[] getAvailableFeatures() {
|
||||
return new Feature[0];
|
||||
}
|
||||
|
||||
public IBinder getBinder() {
|
||||
zad();
|
||||
return this.zai;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final String getEndpointPackageName() {
|
||||
String str = this.zab;
|
||||
if (str != null) {
|
||||
return str;
|
||||
}
|
||||
Preconditions.checkNotNull(this.zad);
|
||||
return this.zad.getPackageName();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final String getLastDisconnectMessage() {
|
||||
return this.zak;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final int getMinApkVersion() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void getRemoteService(IAccountAccessor iAccountAccessor, Set<Scope> set) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Feature[] getRequiredFeatures() {
|
||||
return new Feature[0];
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Set<Scope> getScopesForConnectionlessNonSignIn() {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final IBinder getServiceBrokerBinder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final Intent getSignInIntent() {
|
||||
return new Intent();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean isConnected() {
|
||||
zad();
|
||||
return this.zai != null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean isConnecting() {
|
||||
zad();
|
||||
return this.zaj;
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceConnected(ComponentName componentName, final IBinder iBinder) {
|
||||
this.zag.post(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacg
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zaa.zaa(iBinder);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // android.content.ServiceConnection
|
||||
public final void onServiceDisconnected(ComponentName componentName) {
|
||||
this.zag.post(new Runnable() { // from class: com.google.android.gms.common.api.internal.zacf
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zaa.zab();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void onUserSignOut(BaseGmsClient.SignOutCallbacks signOutCallbacks) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean providesSignIn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresAccount() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresGooglePlayServices() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final boolean requiresSignIn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
final /* synthetic */ void zaa(IBinder iBinder) {
|
||||
this.zaj = false;
|
||||
this.zai = iBinder;
|
||||
String.valueOf(iBinder);
|
||||
this.zaf.onConnected(new Bundle());
|
||||
}
|
||||
|
||||
final /* synthetic */ void zab() {
|
||||
this.zaj = false;
|
||||
this.zai = null;
|
||||
String.valueOf((Object) null);
|
||||
this.zaf.onConnectionSuspended(1);
|
||||
}
|
||||
|
||||
public final void zac(String str) {
|
||||
this.zal = str;
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:7:0x001e, code lost:
|
||||
|
||||
if (r6 != null) goto L8;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
private NonGmsServiceBrokerClient(android.content.Context r2, android.os.Looper r3, java.lang.String r4, java.lang.String r5, android.content.ComponentName r6, com.google.android.gms.common.api.internal.ConnectionCallbacks r7, com.google.android.gms.common.api.internal.OnConnectionFailedListener r8) {
|
||||
/*
|
||||
r1 = this;
|
||||
r1.<init>()
|
||||
r0 = 0
|
||||
r1.zaj = r0
|
||||
r0 = 0
|
||||
r1.zak = r0
|
||||
r1.zae = r2
|
||||
com.google.android.gms.internal.base.zau r2 = new com.google.android.gms.internal.base.zau
|
||||
r2.<init>(r3)
|
||||
r1.zag = r2
|
||||
r1.zaf = r7
|
||||
r1.zah = r8
|
||||
if (r4 == 0) goto L1e
|
||||
if (r5 == 0) goto L1e
|
||||
if (r6 != 0) goto L27
|
||||
r6 = r0
|
||||
goto L20
|
||||
L1e:
|
||||
if (r6 == 0) goto L27
|
||||
L20:
|
||||
r1.zab = r4
|
||||
r1.zac = r5
|
||||
r1.zad = r6
|
||||
return
|
||||
L27:
|
||||
java.lang.AssertionError r2 = new java.lang.AssertionError
|
||||
java.lang.String r3 = "Must specify either package or component, but not both"
|
||||
r2.<init>(r3)
|
||||
throw r2
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.NonGmsServiceBrokerClient.<init>(android.content.Context, android.os.Looper, java.lang.String, java.lang.String, android.content.ComponentName, com.google.android.gms.common.api.internal.ConnectionCallbacks, com.google.android.gms.common.api.internal.OnConnectionFailedListener):void");
|
||||
}
|
||||
|
||||
public NonGmsServiceBrokerClient(Context context, Looper looper, String str, String str2, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this(context, looper, str, str2, null, connectionCallbacks, onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.Api.Client
|
||||
public final void disconnect(String str) {
|
||||
zad();
|
||||
this.zak = str;
|
||||
disconnect();
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface OnConnectionFailedListener {
|
||||
void onConnectionFailed(ConnectionResult connectionResult);
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.OptionalPendingResult;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class OptionalPendingResultImpl<R extends Result> extends OptionalPendingResult<R> {
|
||||
private final BasePendingResult zaa;
|
||||
|
||||
public OptionalPendingResultImpl(PendingResult pendingResult) {
|
||||
this.zaa = (BasePendingResult) pendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
this.zaa.addStatusListener(statusListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await() {
|
||||
return (R) this.zaa.await();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void cancel() {
|
||||
this.zaa.cancel();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.OptionalPendingResult
|
||||
public final R get() {
|
||||
if (this.zaa.isReady()) {
|
||||
return (R) this.zaa.await(0L, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
throw new IllegalStateException("Result is not available. Check that isDone() returns true before calling get().");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
return this.zaa.isCanceled();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.OptionalPendingResult
|
||||
public final boolean isDone() {
|
||||
return this.zaa.isReady();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback) {
|
||||
this.zaa.setResultCallback(resultCallback);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super R, ? extends S> resultTransform) {
|
||||
return this.zaa.then(resultTransform);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final R await(long j, TimeUnit timeUnit) {
|
||||
return (R) this.zaa.await(j, timeUnit);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super R> resultCallback, long j, TimeUnit timeUnit) {
|
||||
this.zaa.setResultCallback(resultCallback, j, timeUnit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.ResultTransform;
|
||||
import com.google.android.gms.common.api.TransformedResult;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class PendingResultFacade<A extends Result, B extends Result> extends PendingResult<B> {
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void addStatusListener(PendingResult.StatusListener statusListener) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final B await() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final B await(long j, TimeUnit timeUnit) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void cancel() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final boolean isCanceled() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super B> resultCallback) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
public final void setResultCallback(ResultCallback<? super B> resultCallback, long j, TimeUnit timeUnit) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final <S extends Result> TransformedResult<S> then(ResultTransform<? super B, ? extends S> resultTransform) {
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class RegisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
private final ListenerHolder zaa;
|
||||
private final Feature[] zab;
|
||||
private final boolean zac;
|
||||
private final int zad;
|
||||
|
||||
protected RegisterListenerMethod(ListenerHolder<L> listenerHolder) {
|
||||
this(listenerHolder, null, false, 0);
|
||||
}
|
||||
|
||||
protected RegisterListenerMethod(ListenerHolder<L> listenerHolder, Feature[] featureArr, boolean z, int i) {
|
||||
this.zaa = listenerHolder;
|
||||
this.zab = featureArr;
|
||||
this.zac = z;
|
||||
this.zad = i;
|
||||
}
|
||||
|
||||
public void clearListener() {
|
||||
this.zaa.clear();
|
||||
}
|
||||
|
||||
public ListenerHolder.ListenerKey<L> getListenerKey() {
|
||||
return this.zaa.getListenerKey();
|
||||
}
|
||||
|
||||
public Feature[] getRequiredFeatures() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
protected abstract void registerListener(A a, TaskCompletionSource<Void> taskCompletionSource) throws RemoteException;
|
||||
|
||||
public final int zaa() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
public final boolean zab() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
protected RegisterListenerMethod(ListenerHolder<L> listenerHolder, Feature[] featureArr, boolean z) {
|
||||
this(listenerHolder, featureArr, z, 0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class RegistrationMethods<A extends Api.AnyClient, L> {
|
||||
public final RegisterListenerMethod<A, L> register;
|
||||
public final UnregisterListenerMethod zaa;
|
||||
public final Runnable zab;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static class Builder<A extends Api.AnyClient, L> {
|
||||
private RemoteCall zaa;
|
||||
private RemoteCall zab;
|
||||
private ListenerHolder zad;
|
||||
private Feature[] zae;
|
||||
private int zag;
|
||||
private Runnable zac = zacj.zaa;
|
||||
private boolean zaf = true;
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
/* synthetic */ Builder(zacm zacmVar) {
|
||||
}
|
||||
|
||||
public RegistrationMethods<A, L> build() {
|
||||
Preconditions.checkArgument(this.zaa != null, "Must set register function");
|
||||
Preconditions.checkArgument(this.zab != null, "Must set unregister function");
|
||||
Preconditions.checkArgument(this.zad != null, "Must set holder");
|
||||
return new RegistrationMethods<>(new zack(this, this.zad, this.zae, this.zaf, this.zag), new zacl(this, (ListenerHolder.ListenerKey) Preconditions.checkNotNull(this.zad.getListenerKey(), "Key must not be null")), this.zac, null);
|
||||
}
|
||||
|
||||
public Builder<A, L> onConnectionSuspended(Runnable runnable) {
|
||||
this.zac = runnable;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> register(RemoteCall<A, TaskCompletionSource<Void>> remoteCall) {
|
||||
this.zaa = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> setAutoResolveMissingFeatures(boolean z) {
|
||||
this.zaf = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> setFeatures(Feature... featureArr) {
|
||||
this.zae = featureArr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> setMethodKey(int i) {
|
||||
this.zag = i;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> unregister(RemoteCall<A, TaskCompletionSource<Boolean>> remoteCall) {
|
||||
this.zab = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, L> withHolder(ListenerHolder<L> listenerHolder) {
|
||||
this.zad = listenerHolder;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/* synthetic */ RegistrationMethods(RegisterListenerMethod registerListenerMethod, UnregisterListenerMethod unregisterListenerMethod, Runnable runnable, zacn zacnVar) {
|
||||
this.register = registerListenerMethod;
|
||||
this.zaa = unregisterListenerMethod;
|
||||
this.zab = runnable;
|
||||
}
|
||||
|
||||
public static <A extends Api.AnyClient, L> Builder<A, L> builder() {
|
||||
return new Builder<>(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface RemoteCall<T, U> {
|
||||
void accept(T t, U u) throws RemoteException;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface SignInConnectionListener {
|
||||
void onComplete();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.api.internal.IStatusCallback;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class StatusCallback extends IStatusCallback.Stub {
|
||||
private final BaseImplementation.ResultHolder<Status> resultHolder;
|
||||
|
||||
public StatusCallback(BaseImplementation.ResultHolder<Status> resultHolder) {
|
||||
this.resultHolder = resultHolder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.IStatusCallback
|
||||
public void onResult(Status status) {
|
||||
this.resultHolder.setResult(status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-basement@@18.3.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface StatusExceptionMapper {
|
||||
Exception getException(Status status);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class StatusPendingResult extends BasePendingResult<Status> {
|
||||
@Deprecated
|
||||
public StatusPendingResult(Looper looper) {
|
||||
super(looper);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BasePendingResult
|
||||
protected final /* bridge */ /* synthetic */ Result createFailedResult(Status status) {
|
||||
return status;
|
||||
}
|
||||
|
||||
public StatusPendingResult(GoogleApiClient googleApiClient) {
|
||||
super(googleApiClient);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.BiConsumer;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class TaskApiCall<A extends Api.AnyClient, ResultT> {
|
||||
private final Feature[] zaa;
|
||||
private final boolean zab;
|
||||
private final int zac;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
public static class Builder<A extends Api.AnyClient, ResultT> {
|
||||
private RemoteCall zaa;
|
||||
private Feature[] zac;
|
||||
private boolean zab = true;
|
||||
private int zad = 0;
|
||||
|
||||
private Builder() {
|
||||
}
|
||||
|
||||
/* synthetic */ Builder(zacw zacwVar) {
|
||||
}
|
||||
|
||||
public TaskApiCall<A, ResultT> build() {
|
||||
Preconditions.checkArgument(this.zaa != null, "execute parameter required");
|
||||
return new zacv(this, this.zac, this.zab, this.zad);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public Builder<A, ResultT> execute(final BiConsumer<A, TaskCompletionSource<ResultT>> biConsumer) {
|
||||
this.zaa = new RemoteCall() { // from class: com.google.android.gms.common.api.internal.zacu
|
||||
@Override // com.google.android.gms.common.api.internal.RemoteCall
|
||||
public final void accept(Object obj, Object obj2) {
|
||||
biConsumer.accept((Api.AnyClient) obj, (TaskCompletionSource) obj2);
|
||||
}
|
||||
};
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, ResultT> run(RemoteCall<A, TaskCompletionSource<ResultT>> remoteCall) {
|
||||
this.zaa = remoteCall;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, ResultT> setAutoResolveMissingFeatures(boolean z) {
|
||||
this.zab = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, ResultT> setFeatures(Feature... featureArr) {
|
||||
this.zac = featureArr;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<A, ResultT> setMethodKey(int i) {
|
||||
this.zad = i;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public TaskApiCall() {
|
||||
this.zaa = null;
|
||||
this.zab = false;
|
||||
this.zac = 0;
|
||||
}
|
||||
|
||||
protected TaskApiCall(Feature[] featureArr, boolean z, int i) {
|
||||
this.zaa = featureArr;
|
||||
boolean z2 = false;
|
||||
if (featureArr != null && z) {
|
||||
z2 = true;
|
||||
}
|
||||
this.zab = z2;
|
||||
this.zac = i;
|
||||
}
|
||||
|
||||
public static <A extends Api.AnyClient, ResultT> Builder<A, ResultT> builder() {
|
||||
return new Builder<>(null);
|
||||
}
|
||||
|
||||
protected abstract void doExecute(A a, TaskCompletionSource<ResultT> taskCompletionSource) throws RemoteException;
|
||||
|
||||
public boolean shouldAutoResolveMissingFeatures() {
|
||||
return this.zab;
|
||||
}
|
||||
|
||||
public final int zaa() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
public final Feature[] zab() {
|
||||
return this.zaa;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.ApiExceptionUtil;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class TaskUtil {
|
||||
public static void setResultOrApiException(Status status, TaskCompletionSource<Void> taskCompletionSource) {
|
||||
setResultOrApiException(status, null, taskCompletionSource);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static Task<Void> toVoidTaskThatFailsOnFalse(Task<Boolean> task) {
|
||||
return task.continueWith(new zacx());
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public static <ResultT> boolean trySetResultOrApiException(Status status, ResultT resultt, TaskCompletionSource<ResultT> taskCompletionSource) {
|
||||
return status.isSuccess() ? taskCompletionSource.trySetResult(resultt) : taskCompletionSource.trySetException(ApiExceptionUtil.fromStatus(status));
|
||||
}
|
||||
|
||||
public static <ResultT> void setResultOrApiException(Status status, ResultT resultt, TaskCompletionSource<ResultT> taskCompletionSource) {
|
||||
if (status.isSuccess()) {
|
||||
taskCompletionSource.setResult(resultt);
|
||||
} else {
|
||||
taskCompletionSource.setException(ApiExceptionUtil.fromStatus(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
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.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class UnregisterListenerMethod<A extends Api.AnyClient, L> {
|
||||
private final ListenerHolder.ListenerKey zaa;
|
||||
|
||||
protected UnregisterListenerMethod(ListenerHolder.ListenerKey<L> listenerKey) {
|
||||
this.zaa = listenerKey;
|
||||
}
|
||||
|
||||
public ListenerHolder.ListenerKey<L> getListenerKey() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
protected abstract void unregisterListener(A a, TaskCompletionSource<Boolean> taskCompletionSource) throws RemoteException;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaa extends LifecycleCallback {
|
||||
private List zaa;
|
||||
|
||||
private zaa(LifecycleFragment lifecycleFragment) {
|
||||
super(lifecycleFragment);
|
||||
this.zaa = new ArrayList();
|
||||
this.mLifecycleFragment.addCallback("LifecycleObserverOnStop", this);
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ zaa zaa(Activity activity) {
|
||||
zaa zaaVar;
|
||||
synchronized (activity) {
|
||||
LifecycleFragment fragment = getFragment(activity);
|
||||
zaaVar = (zaa) fragment.getCallbackOrNull("LifecycleObserverOnStop", zaa.class);
|
||||
if (zaaVar == null) {
|
||||
zaaVar = new zaa(fragment);
|
||||
}
|
||||
}
|
||||
return zaaVar;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final synchronized void zac(Runnable runnable) {
|
||||
this.zaa.add(runnable);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStop() {
|
||||
List list;
|
||||
synchronized (this) {
|
||||
list = this.zaa;
|
||||
this.zaa = new ArrayList();
|
||||
}
|
||||
Iterator it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
((Runnable) it.next()).run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import androidx.collection.ArrayMap;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaaa implements zaca {
|
||||
private final Context zaa;
|
||||
private final zabe zab;
|
||||
private final Looper zac;
|
||||
private final zabi zad;
|
||||
private final zabi zae;
|
||||
private final Map zaf;
|
||||
private final Api.Client zah;
|
||||
private Bundle zai;
|
||||
private final Lock zam;
|
||||
private final Set zag = Collections.newSetFromMap(new WeakHashMap());
|
||||
private ConnectionResult zaj = null;
|
||||
private ConnectionResult zak = null;
|
||||
private boolean zal = false;
|
||||
private int zan = 0;
|
||||
|
||||
private zaaa(Context context, zabe zabeVar, Lock lock, Looper looper, GoogleApiAvailabilityLight googleApiAvailabilityLight, Map map, Map map2, ClientSettings clientSettings, Api.AbstractClientBuilder abstractClientBuilder, Api.Client client, ArrayList arrayList, ArrayList arrayList2, Map map3, Map map4) {
|
||||
this.zaa = context;
|
||||
this.zab = zabeVar;
|
||||
this.zam = lock;
|
||||
this.zac = looper;
|
||||
this.zah = client;
|
||||
this.zad = new zabi(context, zabeVar, lock, looper, googleApiAvailabilityLight, map2, null, map4, null, arrayList2, new zax(this, null));
|
||||
this.zae = new zabi(context, zabeVar, lock, looper, googleApiAvailabilityLight, map, clientSettings, map3, abstractClientBuilder, arrayList, new zaz(this, null));
|
||||
ArrayMap arrayMap = new ArrayMap();
|
||||
Iterator it = map2.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayMap.put((Api.AnyClientKey) it.next(), this.zad);
|
||||
}
|
||||
Iterator it2 = map.keySet().iterator();
|
||||
while (it2.hasNext()) {
|
||||
arrayMap.put((Api.AnyClientKey) it2.next(), this.zae);
|
||||
}
|
||||
this.zaf = Collections.unmodifiableMap(arrayMap);
|
||||
}
|
||||
|
||||
private final void zaB() {
|
||||
Iterator it = this.zag.iterator();
|
||||
while (it.hasNext()) {
|
||||
((SignInConnectionListener) it.next()).onComplete();
|
||||
}
|
||||
this.zag.clear();
|
||||
}
|
||||
|
||||
private final boolean zaC() {
|
||||
ConnectionResult connectionResult = this.zak;
|
||||
return connectionResult != null && connectionResult.getErrorCode() == 4;
|
||||
}
|
||||
|
||||
private final boolean zaD(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
zabi zabiVar = (zabi) this.zaf.get(apiMethodImpl.getClientKey());
|
||||
Preconditions.checkNotNull(zabiVar, "GoogleApiClient is not configured to use the API required for this call.");
|
||||
return zabiVar.equals(this.zae);
|
||||
}
|
||||
|
||||
private static boolean zaE(ConnectionResult connectionResult) {
|
||||
return connectionResult != null && connectionResult.isSuccess();
|
||||
}
|
||||
|
||||
public static zaaa zag(Context context, zabe zabeVar, Lock lock, Looper looper, GoogleApiAvailabilityLight googleApiAvailabilityLight, Map map, ClientSettings clientSettings, Map map2, Api.AbstractClientBuilder abstractClientBuilder, ArrayList arrayList) {
|
||||
ArrayMap arrayMap = new ArrayMap();
|
||||
ArrayMap arrayMap2 = new ArrayMap();
|
||||
Api.Client client = null;
|
||||
for (Map.Entry entry : map.entrySet()) {
|
||||
Api.Client client2 = (Api.Client) entry.getValue();
|
||||
if (true == client2.providesSignIn()) {
|
||||
client = client2;
|
||||
}
|
||||
if (client2.requiresSignIn()) {
|
||||
arrayMap.put((Api.AnyClientKey) entry.getKey(), client2);
|
||||
} else {
|
||||
arrayMap2.put((Api.AnyClientKey) entry.getKey(), client2);
|
||||
}
|
||||
}
|
||||
Preconditions.checkState(!arrayMap.isEmpty(), "CompositeGoogleApiClient should not be used without any APIs that require sign-in.");
|
||||
ArrayMap arrayMap3 = new ArrayMap();
|
||||
ArrayMap arrayMap4 = new ArrayMap();
|
||||
for (Api api : map2.keySet()) {
|
||||
Api.AnyClientKey anyClientKeyZab = api.zab();
|
||||
if (arrayMap.containsKey(anyClientKeyZab)) {
|
||||
arrayMap3.put(api, (Boolean) map2.get(api));
|
||||
} else {
|
||||
if (!arrayMap2.containsKey(anyClientKeyZab)) {
|
||||
throw new IllegalStateException("Each API in the isOptionalMap must have a corresponding client in the clients map.");
|
||||
}
|
||||
arrayMap4.put(api, (Boolean) map2.get(api));
|
||||
}
|
||||
}
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
ArrayList arrayList3 = new ArrayList();
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
zat zatVar = (zat) arrayList.get(i);
|
||||
if (arrayMap3.containsKey(zatVar.zaa)) {
|
||||
arrayList2.add(zatVar);
|
||||
} else {
|
||||
if (!arrayMap4.containsKey(zatVar.zaa)) {
|
||||
throw new IllegalStateException("Each ClientCallbacks must have a corresponding API in the isOptionalMap");
|
||||
}
|
||||
arrayList3.add(zatVar);
|
||||
}
|
||||
}
|
||||
return new zaaa(context, zabeVar, lock, looper, googleApiAvailabilityLight, arrayMap, arrayMap2, clientSettings, abstractClientBuilder, client, arrayList2, arrayList3, arrayMap3, arrayMap4);
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zan(zaaa zaaaVar, int i, boolean z) {
|
||||
zaaaVar.zab.zac(i, z);
|
||||
zaaaVar.zak = null;
|
||||
zaaaVar.zaj = null;
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zao(zaaa zaaaVar, Bundle bundle) {
|
||||
Bundle bundle2 = zaaaVar.zai;
|
||||
if (bundle2 == null) {
|
||||
zaaaVar.zai = bundle;
|
||||
} else if (bundle != null) {
|
||||
bundle2.putAll(bundle);
|
||||
}
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zap(zaaa zaaaVar) {
|
||||
ConnectionResult connectionResult;
|
||||
if (!zaE(zaaaVar.zaj)) {
|
||||
if (zaaaVar.zaj != null && zaE(zaaaVar.zak)) {
|
||||
zaaaVar.zae.zar();
|
||||
zaaaVar.zaA((ConnectionResult) Preconditions.checkNotNull(zaaaVar.zaj));
|
||||
return;
|
||||
}
|
||||
ConnectionResult connectionResult2 = zaaaVar.zaj;
|
||||
if (connectionResult2 == null || (connectionResult = zaaaVar.zak) == null) {
|
||||
return;
|
||||
}
|
||||
if (zaaaVar.zae.zaf < zaaaVar.zad.zaf) {
|
||||
connectionResult2 = connectionResult;
|
||||
}
|
||||
zaaaVar.zaA(connectionResult2);
|
||||
return;
|
||||
}
|
||||
if (zaE(zaaaVar.zak) || zaaaVar.zaC()) {
|
||||
int i = zaaaVar.zan;
|
||||
if (i == 1) {
|
||||
zaaaVar.zaB();
|
||||
} else if (i != 2) {
|
||||
Log.wtf("CompositeGAC", "Attempted to call success callbacks in CONNECTION_MODE_NONE. Callbacks should be disabled via GmsClientSupervisor", new AssertionError());
|
||||
} else {
|
||||
((zabe) Preconditions.checkNotNull(zaaaVar.zab)).zab(zaaaVar.zai);
|
||||
zaaaVar.zaB();
|
||||
}
|
||||
zaaaVar.zan = 0;
|
||||
return;
|
||||
}
|
||||
ConnectionResult connectionResult3 = zaaaVar.zak;
|
||||
if (connectionResult3 != null) {
|
||||
if (zaaaVar.zan == 1) {
|
||||
zaaaVar.zaB();
|
||||
} else {
|
||||
zaaaVar.zaA(connectionResult3);
|
||||
zaaaVar.zad.zar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final PendingIntent zaz() {
|
||||
Api.Client client = this.zah;
|
||||
if (client == null) {
|
||||
return null;
|
||||
}
|
||||
return PendingIntent.getActivity(this.zaa, System.identityHashCode(this.zab), client.getSignInIntent(), com.google.android.gms.internal.base.zap.zaa | 134217728);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zab() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zac(long j, TimeUnit timeUnit) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zad(Api api) {
|
||||
return Objects.equal(this.zaf.get(api.zab()), this.zae) ? zaC() ? new ConnectionResult(4, zaz()) : this.zae.zad(api) : this.zad.zad(api);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zae(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
if (!zaD(apiMethodImpl)) {
|
||||
this.zad.zae(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
if (zaC()) {
|
||||
apiMethodImpl.setFailedResult(new Status(4, (String) null, zaz()));
|
||||
return apiMethodImpl;
|
||||
}
|
||||
this.zae.zae(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zaf(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
if (!zaD(apiMethodImpl)) {
|
||||
return this.zad.zaf(apiMethodImpl);
|
||||
}
|
||||
if (!zaC()) {
|
||||
return this.zae.zaf(apiMethodImpl);
|
||||
}
|
||||
apiMethodImpl.setFailedResult(new Status(4, (String) null, zaz()));
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zaq() {
|
||||
this.zan = 2;
|
||||
this.zal = false;
|
||||
this.zak = null;
|
||||
this.zaj = null;
|
||||
this.zad.zaq();
|
||||
this.zae.zaq();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zar() {
|
||||
this.zak = null;
|
||||
this.zaj = null;
|
||||
this.zan = 0;
|
||||
this.zad.zar();
|
||||
this.zae.zar();
|
||||
zaB();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zas(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
printWriter.append((CharSequence) str).append("authClient").println(":");
|
||||
this.zae.zas(String.valueOf(str).concat(" "), fileDescriptor, printWriter, strArr);
|
||||
printWriter.append((CharSequence) str).append("anonClient").println(":");
|
||||
this.zad.zas(String.valueOf(str).concat(" "), fileDescriptor, printWriter, strArr);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zat() {
|
||||
this.zad.zat();
|
||||
this.zae.zat();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zau() {
|
||||
this.zam.lock();
|
||||
try {
|
||||
boolean zZax = zax();
|
||||
this.zae.zar();
|
||||
this.zak = new ConnectionResult(4);
|
||||
if (zZax) {
|
||||
new com.google.android.gms.internal.base.zau(this.zac).post(new zav(this));
|
||||
} else {
|
||||
zaB();
|
||||
}
|
||||
} finally {
|
||||
this.zam.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:11:0x0021 */
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
||||
*/
|
||||
public final boolean zaw() {
|
||||
/*
|
||||
r3 = this;
|
||||
java.util.concurrent.locks.Lock r0 = r3.zam
|
||||
r0.lock()
|
||||
com.google.android.gms.common.api.internal.zabi r0 = r3.zad // Catch: java.lang.Throwable -> L28
|
||||
boolean r0 = r0.zaw() // Catch: java.lang.Throwable -> L28
|
||||
r1 = 0
|
||||
if (r0 == 0) goto L22
|
||||
com.google.android.gms.common.api.internal.zabi r0 = r3.zae // Catch: java.lang.Throwable -> L28
|
||||
boolean r0 = r0.zaw() // Catch: java.lang.Throwable -> L28
|
||||
r2 = 1
|
||||
if (r0 != 0) goto L21
|
||||
boolean r0 = r3.zaC() // Catch: java.lang.Throwable -> L28
|
||||
if (r0 != 0) goto L21
|
||||
int r0 = r3.zan // Catch: java.lang.Throwable -> L28
|
||||
if (r0 != r2) goto L22
|
||||
L21:
|
||||
r1 = r2
|
||||
L22:
|
||||
java.util.concurrent.locks.Lock r0 = r3.zam
|
||||
r0.unlock()
|
||||
return r1
|
||||
L28:
|
||||
r0 = move-exception
|
||||
java.util.concurrent.locks.Lock r1 = r3.zam
|
||||
r1.unlock()
|
||||
throw r0
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.api.internal.zaaa.zaw():boolean");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zax() {
|
||||
this.zam.lock();
|
||||
try {
|
||||
return this.zan == 2;
|
||||
} finally {
|
||||
this.zam.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zay(SignInConnectionListener signInConnectionListener) {
|
||||
this.zam.lock();
|
||||
try {
|
||||
boolean z = false;
|
||||
if ((zax() || zaw()) && !this.zae.zaw()) {
|
||||
this.zag.add(signInConnectionListener);
|
||||
z = true;
|
||||
if (this.zan == 0) {
|
||||
this.zan = 1;
|
||||
}
|
||||
this.zak = null;
|
||||
this.zae.zaq();
|
||||
}
|
||||
return z;
|
||||
} finally {
|
||||
this.zam.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaA(ConnectionResult connectionResult) {
|
||||
int i = this.zan;
|
||||
if (i == 1) {
|
||||
zaB();
|
||||
} else if (i != 2) {
|
||||
Log.wtf("CompositeGAC", "Attempted to call failure callbacks in CONNECTION_MODE_NONE. Callbacks should be disabled via GmsClientSupervisor", new Exception());
|
||||
} else {
|
||||
this.zab.zaa(connectionResult);
|
||||
zaB();
|
||||
}
|
||||
this.zan = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaab implements PendingResult.StatusListener {
|
||||
final /* synthetic */ BasePendingResult zaa;
|
||||
final /* synthetic */ zaad zab;
|
||||
|
||||
zaab(zaad zaadVar, BasePendingResult basePendingResult) {
|
||||
this.zab = zaadVar;
|
||||
this.zaa = basePendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.PendingResult.StatusListener
|
||||
public final void onComplete(Status status) {
|
||||
this.zab.zaa.remove(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaac implements OnCompleteListener {
|
||||
final /* synthetic */ TaskCompletionSource zaa;
|
||||
final /* synthetic */ zaad zab;
|
||||
|
||||
zaac(zaad zaadVar, TaskCompletionSource taskCompletionSource) {
|
||||
this.zab = zaadVar;
|
||||
this.zaa = taskCompletionSource;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public final void onComplete(Task task) {
|
||||
this.zab.zab.remove(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
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;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaad {
|
||||
private final Map zaa = Collections.synchronizedMap(new WeakHashMap());
|
||||
private final Map zab = Collections.synchronizedMap(new WeakHashMap());
|
||||
|
||||
private final void zah(boolean z, Status status) {
|
||||
HashMap map;
|
||||
HashMap map2;
|
||||
synchronized (this.zaa) {
|
||||
map = new HashMap(this.zaa);
|
||||
}
|
||||
synchronized (this.zab) {
|
||||
map2 = new HashMap(this.zab);
|
||||
}
|
||||
for (Map.Entry entry : map.entrySet()) {
|
||||
if (z || ((Boolean) entry.getValue()).booleanValue()) {
|
||||
((BasePendingResult) entry.getKey()).forceFailureUnlessReady(status);
|
||||
}
|
||||
}
|
||||
for (Map.Entry entry2 : map2.entrySet()) {
|
||||
if (z || ((Boolean) entry2.getValue()).booleanValue()) {
|
||||
((TaskCompletionSource) entry2.getKey()).trySetException(new ApiException(status));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final void zac(BasePendingResult basePendingResult, boolean z) {
|
||||
this.zaa.put(basePendingResult, Boolean.valueOf(z));
|
||||
basePendingResult.addStatusListener(new zaab(this, basePendingResult));
|
||||
}
|
||||
|
||||
final void zad(TaskCompletionSource taskCompletionSource, boolean z) {
|
||||
this.zab.put(taskCompletionSource, Boolean.valueOf(z));
|
||||
taskCompletionSource.getTask().addOnCompleteListener(new zaac(this, taskCompletionSource));
|
||||
}
|
||||
|
||||
final void zae(int i, String str) {
|
||||
StringBuilder sb = new StringBuilder("The connection to Google Play services was lost");
|
||||
if (i == 1) {
|
||||
sb.append(" due to service disconnection.");
|
||||
} else if (i == 3) {
|
||||
sb.append(" due to dead object exception.");
|
||||
}
|
||||
if (str != null) {
|
||||
sb.append(" Last reason for disconnect: ");
|
||||
sb.append(str);
|
||||
}
|
||||
zah(true, new Status(20, sb.toString()));
|
||||
}
|
||||
|
||||
public final void zaf() {
|
||||
zah(false, GoogleApiManager.zaa);
|
||||
}
|
||||
|
||||
final boolean zag() {
|
||||
return (this.zaa.isEmpty() && this.zab.isEmpty()) ? false : true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import androidx.collection.ArraySet;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaae extends zap {
|
||||
private final ArraySet zad;
|
||||
private final GoogleApiManager zae;
|
||||
|
||||
zaae(LifecycleFragment lifecycleFragment, GoogleApiManager googleApiManager, GoogleApiAvailability googleApiAvailability) {
|
||||
super(lifecycleFragment, googleApiAvailability);
|
||||
this.zad = new ArraySet();
|
||||
this.zae = googleApiManager;
|
||||
this.mLifecycleFragment.addCallback("ConnectionlessLifecycleHelper", this);
|
||||
}
|
||||
|
||||
public static void zad(Activity activity, GoogleApiManager googleApiManager, ApiKey apiKey) {
|
||||
LifecycleFragment fragment = getFragment(activity);
|
||||
zaae zaaeVar = (zaae) fragment.getCallbackOrNull("ConnectionlessLifecycleHelper", zaae.class);
|
||||
if (zaaeVar == null) {
|
||||
zaaeVar = new zaae(fragment, googleApiManager, GoogleApiAvailability.getInstance());
|
||||
}
|
||||
Preconditions.checkNotNull(apiKey, "ApiKey cannot be null");
|
||||
zaaeVar.zad.add(apiKey);
|
||||
googleApiManager.zaA(zaaeVar);
|
||||
}
|
||||
|
||||
private final void zae() {
|
||||
if (this.zad.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
this.zae.zaA(this);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onResume() {
|
||||
super.onResume();
|
||||
zae();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStart() {
|
||||
super.onStart();
|
||||
zae();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap, com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onStop() {
|
||||
super.onStop();
|
||||
this.zae.zaB(this);
|
||||
}
|
||||
|
||||
final ArraySet zaa() {
|
||||
return this.zad;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
protected final void zab(ConnectionResult connectionResult, int i) {
|
||||
this.zae.zax(connectionResult, i);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
protected final void zac() {
|
||||
this.zae.zay();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaaf {
|
||||
private final ApiKey zaa;
|
||||
private final TaskCompletionSource zab = new TaskCompletionSource();
|
||||
|
||||
public zaaf(ApiKey apiKey) {
|
||||
this.zaa = apiKey;
|
||||
}
|
||||
|
||||
public final ApiKey zaa() {
|
||||
return this.zaa;
|
||||
}
|
||||
|
||||
public final TaskCompletionSource zab() {
|
||||
return this.zab;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public class zaag extends GoogleApiClient {
|
||||
private final String zaa = "Method is not supported by connectionless client. APIs supporting connectionless client must not call this method.";
|
||||
|
||||
public zaag(String str) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult blockingConnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final PendingResult<Status> clearDefaultAccountAndReconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void connect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void disconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult getConnectionResult(Api<?> api) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean hasConnectedApi(Api<?> api) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnected() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnecting() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionCallbacksRegistered(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionFailedListenerRegistered(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void reconnect() {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void stopAutoManage(FragmentActivity fragmentActivity) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult blockingConnect(long j, TimeUnit timeUnit) {
|
||||
throw new UnsupportedOperationException(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaah extends zabg {
|
||||
final /* synthetic */ zaaj zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zaah(zaaj zaajVar, zabf zabfVar) {
|
||||
super(zabfVar);
|
||||
this.zaa = zaajVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabg
|
||||
public final void zaa() {
|
||||
this.zaa.zai(1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaai extends zabg {
|
||||
final /* synthetic */ zaaj zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zaai(zaaj zaajVar, zabf zabfVar) {
|
||||
super(zabfVar);
|
||||
this.zaa = zaajVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabg
|
||||
public final void zaa() {
|
||||
this.zaa.zaa.zah.zab(null);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaaj implements zabf {
|
||||
private final zabi zaa;
|
||||
private boolean zab = false;
|
||||
|
||||
public zaaj(zabi zabiVar) {
|
||||
this.zaa = zabiVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zaa(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
zab(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zab(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
try {
|
||||
this.zaa.zag.zai.zaa(apiMethodImpl);
|
||||
zabe zabeVar = this.zaa.zag;
|
||||
Api.Client client = (Api.Client) zabeVar.zac.get(apiMethodImpl.getClientKey());
|
||||
Preconditions.checkNotNull(client, "Appropriate Api was not requested.");
|
||||
if (client.isConnected() || !this.zaa.zab.containsKey(apiMethodImpl.getClientKey())) {
|
||||
apiMethodImpl.run(client);
|
||||
} else {
|
||||
apiMethodImpl.setFailedResult(new Status(17));
|
||||
}
|
||||
} catch (DeadObjectException unused) {
|
||||
this.zaa.zal(new zaah(this, this));
|
||||
}
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zad() {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zae() {
|
||||
if (this.zab) {
|
||||
this.zab = false;
|
||||
this.zaa.zal(new zaai(this, this));
|
||||
}
|
||||
}
|
||||
|
||||
final void zaf() {
|
||||
if (this.zab) {
|
||||
this.zab = false;
|
||||
this.zaa.zag.zai.zab();
|
||||
zaj();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zag(Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zah(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zai(int i) {
|
||||
this.zaa.zak(null);
|
||||
this.zaa.zah.zac(i, this.zab);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final boolean zaj() {
|
||||
if (this.zab) {
|
||||
return false;
|
||||
}
|
||||
Set set = this.zaa.zag.zah;
|
||||
if (set == null || set.isEmpty()) {
|
||||
this.zaa.zak(null);
|
||||
return true;
|
||||
}
|
||||
this.zab = true;
|
||||
Iterator it = set.iterator();
|
||||
while (it.hasNext()) {
|
||||
((zada) it.next()).zah();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaak implements Runnable {
|
||||
final /* synthetic */ zaaw zaa;
|
||||
|
||||
zaak(zaaw zaawVar) {
|
||||
this.zaa = zaawVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zaaw zaawVar = this.zaa;
|
||||
zaawVar.zad.cancelAvailabilityErrorNotifications(zaawVar.zac);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaal implements BaseGmsClient.ConnectionProgressReportCallbacks {
|
||||
private final WeakReference zaa;
|
||||
private final Api zab;
|
||||
private final boolean zac;
|
||||
|
||||
public zaal(zaaw zaawVar, Api api, boolean z) {
|
||||
this.zaa = new WeakReference(zaawVar);
|
||||
this.zab = api;
|
||||
this.zac = z;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.ConnectionProgressReportCallbacks
|
||||
public final void onReportServiceBinding(ConnectionResult connectionResult) {
|
||||
zaaw zaawVar = (zaaw) this.zaa.get();
|
||||
if (zaawVar == null) {
|
||||
return;
|
||||
}
|
||||
Preconditions.checkState(Looper.myLooper() == zaawVar.zaa.zag.getLooper(), "onReportServiceBinding must be called on the GoogleApiClient handler thread");
|
||||
zaawVar.zab.lock();
|
||||
try {
|
||||
if (zaawVar.zaG(0)) {
|
||||
if (!connectionResult.isSuccess()) {
|
||||
zaawVar.zaE(connectionResult, this.zab, this.zac);
|
||||
}
|
||||
if (zaawVar.zaH()) {
|
||||
zaawVar.zaF();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
zaawVar.zab.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaam extends zabg {
|
||||
final /* synthetic */ ConnectionResult zaa;
|
||||
final /* synthetic */ zaao zab;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zaam(zaao zaaoVar, zabf zabfVar, ConnectionResult connectionResult) {
|
||||
super(zabfVar);
|
||||
this.zab = zaaoVar;
|
||||
this.zaa = connectionResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabg
|
||||
public final void zaa() {
|
||||
this.zab.zaa.zaD(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaan extends zabg {
|
||||
final /* synthetic */ BaseGmsClient.ConnectionProgressReportCallbacks zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zaan(zaao zaaoVar, zabf zabfVar, BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks) {
|
||||
super(zabfVar);
|
||||
this.zaa = connectionProgressReportCallbacks;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabg
|
||||
public final void zaa() {
|
||||
this.zaa.onReportServiceBinding(new ConnectionResult(16, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
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.internal.BaseGmsClient;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaao extends zaav {
|
||||
final /* synthetic */ zaaw zaa;
|
||||
private final Map zac;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public zaao(zaaw zaawVar, Map map) {
|
||||
super(zaawVar, null);
|
||||
this.zaa = zaawVar;
|
||||
this.zac = map;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaav
|
||||
public final void zaa() {
|
||||
com.google.android.gms.common.internal.zal zalVar = new com.google.android.gms.common.internal.zal(this.zaa.zad);
|
||||
ArrayList arrayList = new ArrayList();
|
||||
ArrayList arrayList2 = new ArrayList();
|
||||
for (Api.Client client : this.zac.keySet()) {
|
||||
if (!client.requiresGooglePlayServices() || ((zaal) this.zac.get(client)).zac) {
|
||||
arrayList2.add(client);
|
||||
} else {
|
||||
arrayList.add(client);
|
||||
}
|
||||
}
|
||||
int i = 0;
|
||||
int iZab = -1;
|
||||
if (!arrayList.isEmpty()) {
|
||||
int size = arrayList.size();
|
||||
while (i < size) {
|
||||
iZab = zalVar.zab(this.zaa.zac, (Api.Client) arrayList.get(i));
|
||||
i++;
|
||||
if (iZab != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int size2 = arrayList2.size();
|
||||
while (i < size2) {
|
||||
iZab = zalVar.zab(this.zaa.zac, (Api.Client) arrayList2.get(i));
|
||||
i++;
|
||||
if (iZab == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (iZab != 0) {
|
||||
ConnectionResult connectionResult = new ConnectionResult(iZab, null);
|
||||
zaaw zaawVar = this.zaa;
|
||||
zaawVar.zaa.zal(new zaam(this, zaawVar, connectionResult));
|
||||
return;
|
||||
}
|
||||
zaaw zaawVar2 = this.zaa;
|
||||
if (zaawVar2.zam && zaawVar2.zak != null) {
|
||||
zaawVar2.zak.zab();
|
||||
}
|
||||
for (Api.Client client2 : this.zac.keySet()) {
|
||||
BaseGmsClient.ConnectionProgressReportCallbacks connectionProgressReportCallbacks = (BaseGmsClient.ConnectionProgressReportCallbacks) this.zac.get(client2);
|
||||
if (!client2.requiresGooglePlayServices() || zalVar.zab(this.zaa.zac, client2) == 0) {
|
||||
client2.connect(connectionProgressReportCallbacks);
|
||||
} else {
|
||||
zaaw zaawVar3 = this.zaa;
|
||||
zaawVar3.zaa.zal(new zaan(this, zaawVar3, connectionProgressReportCallbacks));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaap extends zaav {
|
||||
final /* synthetic */ zaaw zaa;
|
||||
private final ArrayList zac;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
public zaap(zaaw zaawVar, ArrayList arrayList) {
|
||||
super(zaawVar, null);
|
||||
this.zaa = zaawVar;
|
||||
this.zac = arrayList;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaav
|
||||
public final void zaa() {
|
||||
zaaw zaawVar = this.zaa;
|
||||
zaawVar.zaa.zag.zad = zaaw.zao(zaawVar);
|
||||
ArrayList arrayList = this.zac;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
Api.Client client = (Api.Client) arrayList.get(i);
|
||||
zaaw zaawVar2 = this.zaa;
|
||||
client.getRemoteService(zaawVar2.zao, zaawVar2.zaa.zag.zad);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaaq extends zabg {
|
||||
final /* synthetic */ zaaw zaa;
|
||||
final /* synthetic */ com.google.android.gms.signin.internal.zak zab;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zaaq(zaar zaarVar, zabf zabfVar, zaaw zaawVar, com.google.android.gms.signin.internal.zak zakVar) {
|
||||
super(zabfVar);
|
||||
this.zaa = zaawVar;
|
||||
this.zab = zakVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabg
|
||||
public final void zaa() {
|
||||
zaaw.zar(this.zaa, this.zab);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaar extends com.google.android.gms.signin.internal.zac {
|
||||
private final WeakReference zaa;
|
||||
|
||||
zaar(zaaw zaawVar) {
|
||||
this.zaa = new WeakReference(zaawVar);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.signin.internal.zac, com.google.android.gms.signin.internal.zae
|
||||
public final void zab(com.google.android.gms.signin.internal.zak zakVar) {
|
||||
zaaw zaawVar = (zaaw) this.zaa.get();
|
||||
if (zaawVar == null) {
|
||||
return;
|
||||
}
|
||||
zaawVar.zaa.zal(new zaaq(this, zaawVar, zaawVar, zakVar));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaat implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
|
||||
final /* synthetic */ zaaw zaa;
|
||||
|
||||
/* synthetic */ zaat(zaaw zaawVar, zaas zaasVar) {
|
||||
this.zaa = zaawVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnected(Bundle bundle) {
|
||||
((com.google.android.gms.signin.zae) Preconditions.checkNotNull(this.zaa.zak)).zad(new zaar(this.zaa));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.OnConnectionFailedListener
|
||||
public final void onConnectionFailed(ConnectionResult connectionResult) {
|
||||
this.zaa.zab.lock();
|
||||
try {
|
||||
if (this.zaa.zaI(connectionResult)) {
|
||||
this.zaa.zaA();
|
||||
this.zaa.zaF();
|
||||
} else {
|
||||
this.zaa.zaD(connectionResult);
|
||||
}
|
||||
} finally {
|
||||
this.zaa.zab.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnectionSuspended(int i) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
abstract class zaav implements Runnable {
|
||||
final /* synthetic */ zaaw zab;
|
||||
|
||||
/* synthetic */ zaav(zaaw zaawVar, zaau zaauVar) {
|
||||
this.zab = zaawVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zab.zab.lock();
|
||||
try {
|
||||
try {
|
||||
if (!Thread.interrupted()) {
|
||||
zaa();
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
this.zab.zaa.zam(e);
|
||||
}
|
||||
} finally {
|
||||
this.zab.zab.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void zaa();
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
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.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaaw implements zabf {
|
||||
private final zabi zaa;
|
||||
private final Lock zab;
|
||||
private final Context zac;
|
||||
private final GoogleApiAvailabilityLight zad;
|
||||
private ConnectionResult zae;
|
||||
private int zaf;
|
||||
private int zah;
|
||||
private com.google.android.gms.signin.zae zak;
|
||||
private boolean zal;
|
||||
private boolean zam;
|
||||
private boolean zan;
|
||||
private IAccountAccessor zao;
|
||||
private boolean zap;
|
||||
private boolean zaq;
|
||||
private final ClientSettings zar;
|
||||
private final Map zas;
|
||||
private final Api.AbstractClientBuilder zat;
|
||||
private int zag = 0;
|
||||
private final Bundle zai = new Bundle();
|
||||
private final Set zaj = new HashSet();
|
||||
private final ArrayList zau = new ArrayList();
|
||||
|
||||
public zaaw(zabi zabiVar, ClientSettings clientSettings, Map map, GoogleApiAvailabilityLight googleApiAvailabilityLight, Api.AbstractClientBuilder abstractClientBuilder, Lock lock, Context context) {
|
||||
this.zaa = zabiVar;
|
||||
this.zar = clientSettings;
|
||||
this.zas = map;
|
||||
this.zad = googleApiAvailabilityLight;
|
||||
this.zat = abstractClientBuilder;
|
||||
this.zab = lock;
|
||||
this.zac = context;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaA() {
|
||||
this.zam = false;
|
||||
this.zaa.zag.zad = Collections.emptySet();
|
||||
for (Api.AnyClientKey anyClientKey : this.zaj) {
|
||||
if (!this.zaa.zab.containsKey(anyClientKey)) {
|
||||
zabi zabiVar = this.zaa;
|
||||
zabiVar.zab.put(anyClientKey, new ConnectionResult(17, null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaB(boolean z) {
|
||||
com.google.android.gms.signin.zae zaeVar = this.zak;
|
||||
if (zaeVar != null) {
|
||||
if (zaeVar.isConnected() && z) {
|
||||
zaeVar.zaa();
|
||||
}
|
||||
zaeVar.disconnect();
|
||||
this.zao = null;
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaC() {
|
||||
this.zaa.zai();
|
||||
zabj.zaa().execute(new zaak(this));
|
||||
com.google.android.gms.signin.zae zaeVar = this.zak;
|
||||
if (zaeVar != null) {
|
||||
if (this.zap) {
|
||||
zaeVar.zac((IAccountAccessor) Preconditions.checkNotNull(this.zao), this.zaq);
|
||||
}
|
||||
zaB(false);
|
||||
}
|
||||
Iterator it = this.zaa.zab.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
((Api.Client) Preconditions.checkNotNull((Api.Client) this.zaa.zaa.get((Api.AnyClientKey) it.next()))).disconnect();
|
||||
}
|
||||
this.zaa.zah.zab(this.zai.isEmpty() ? null : this.zai);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaD(ConnectionResult connectionResult) {
|
||||
zaz();
|
||||
zaB(!connectionResult.hasResolution());
|
||||
this.zaa.zak(connectionResult);
|
||||
this.zaa.zah.zaa(connectionResult);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaE(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
int priority = api.zac().getPriority();
|
||||
if ((!z || connectionResult.hasResolution() || this.zad.getErrorResolutionIntent(connectionResult.getErrorCode()) != null) && (this.zae == null || priority < this.zaf)) {
|
||||
this.zae = connectionResult;
|
||||
this.zaf = priority;
|
||||
}
|
||||
zabi zabiVar = this.zaa;
|
||||
zabiVar.zab.put(api.zab(), connectionResult);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaF() {
|
||||
if (this.zah != 0) {
|
||||
return;
|
||||
}
|
||||
if (!this.zam || this.zan) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
this.zag = 1;
|
||||
this.zah = this.zaa.zaa.size();
|
||||
for (Api.AnyClientKey anyClientKey : this.zaa.zaa.keySet()) {
|
||||
if (!this.zaa.zab.containsKey(anyClientKey)) {
|
||||
arrayList.add((Api.Client) this.zaa.zaa.get(anyClientKey));
|
||||
} else if (zaH()) {
|
||||
zaC();
|
||||
}
|
||||
}
|
||||
if (arrayList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
this.zau.add(zabj.zaa().submit(new zaap(this, arrayList)));
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean zaG(int i) {
|
||||
if (this.zag == i) {
|
||||
return true;
|
||||
}
|
||||
Log.w("GACConnecting", this.zaa.zag.zaf());
|
||||
Log.w("GACConnecting", "Unexpected callback in ".concat(toString()));
|
||||
Log.w("GACConnecting", "mRemainingConnections=" + this.zah);
|
||||
Log.e("GACConnecting", "GoogleApiClient connecting is in step " + zaJ(this.zag) + " but received callback for step " + zaJ(i), new Exception());
|
||||
zaD(new ConnectionResult(8, null));
|
||||
return false;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean zaH() {
|
||||
int i = this.zah - 1;
|
||||
this.zah = i;
|
||||
if (i > 0) {
|
||||
return false;
|
||||
}
|
||||
if (i < 0) {
|
||||
Log.w("GACConnecting", this.zaa.zag.zaf());
|
||||
Log.wtf("GACConnecting", "GoogleApiClient received too many callbacks for the given step. Clients may be in an unexpected state; GoogleApiClient will now disconnect.", new Exception());
|
||||
zaD(new ConnectionResult(8, null));
|
||||
return false;
|
||||
}
|
||||
ConnectionResult connectionResult = this.zae;
|
||||
if (connectionResult == null) {
|
||||
return true;
|
||||
}
|
||||
this.zaa.zaf = this.zaf;
|
||||
zaD(connectionResult);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean zaI(ConnectionResult connectionResult) {
|
||||
return this.zal && !connectionResult.hasResolution();
|
||||
}
|
||||
|
||||
private static final String zaJ(int i) {
|
||||
return i != 0 ? "STEP_GETTING_REMOTE_SERVICE" : "STEP_SERVICE_BINDINGS_AND_SIGN_IN";
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ Set zao(zaaw zaawVar) {
|
||||
ClientSettings clientSettings = zaawVar.zar;
|
||||
if (clientSettings == null) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
HashSet hashSet = new HashSet(clientSettings.getRequiredScopes());
|
||||
Map mapZad = zaawVar.zar.zad();
|
||||
for (Api api : mapZad.keySet()) {
|
||||
zabi zabiVar = zaawVar.zaa;
|
||||
if (!zabiVar.zab.containsKey(api.zab())) {
|
||||
hashSet.addAll(((com.google.android.gms.common.internal.zab) mapZad.get(api)).zaa);
|
||||
}
|
||||
}
|
||||
return hashSet;
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zar(zaaw zaawVar, com.google.android.gms.signin.internal.zak zakVar) {
|
||||
if (zaawVar.zaG(0)) {
|
||||
ConnectionResult connectionResultZaa = zakVar.zaa();
|
||||
if (!connectionResultZaa.isSuccess()) {
|
||||
if (!zaawVar.zaI(connectionResultZaa)) {
|
||||
zaawVar.zaD(connectionResultZaa);
|
||||
return;
|
||||
} else {
|
||||
zaawVar.zaA();
|
||||
zaawVar.zaF();
|
||||
return;
|
||||
}
|
||||
}
|
||||
com.google.android.gms.common.internal.zav zavVar = (com.google.android.gms.common.internal.zav) Preconditions.checkNotNull(zakVar.zab());
|
||||
ConnectionResult connectionResultZaa2 = zavVar.zaa();
|
||||
if (!connectionResultZaa2.isSuccess()) {
|
||||
String strValueOf = String.valueOf(String.valueOf(connectionResultZaa2));
|
||||
Log.wtf("GACConnecting", "Sign-in succeeded with resolve account failure: ".concat(strValueOf), new Exception());
|
||||
zaawVar.zaD(connectionResultZaa2);
|
||||
return;
|
||||
}
|
||||
zaawVar.zan = true;
|
||||
zaawVar.zao = (IAccountAccessor) Preconditions.checkNotNull(zavVar.zab());
|
||||
zaawVar.zap = zavVar.zac();
|
||||
zaawVar.zaq = zavVar.zad();
|
||||
zaawVar.zaF();
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaz() {
|
||||
ArrayList arrayList = this.zau;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
((Future) arrayList.get(i)).cancel(true);
|
||||
}
|
||||
this.zau.clear();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zaa(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
this.zaa.zag.zaa.add(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zab(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
throw new IllegalStateException("GoogleApiClient is not connected yet.");
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r0v13, types: [com.google.android.gms.common.api.Api$Client, com.google.android.gms.signin.zae] */
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zad() {
|
||||
this.zaa.zab.clear();
|
||||
this.zam = false;
|
||||
zaas zaasVar = null;
|
||||
this.zae = null;
|
||||
this.zag = 0;
|
||||
this.zal = true;
|
||||
this.zan = false;
|
||||
this.zap = false;
|
||||
HashMap map = new HashMap();
|
||||
boolean z = false;
|
||||
for (Api api : this.zas.keySet()) {
|
||||
Api.Client client = (Api.Client) Preconditions.checkNotNull((Api.Client) this.zaa.zaa.get(api.zab()));
|
||||
z |= api.zac().getPriority() == 1;
|
||||
boolean zBooleanValue = ((Boolean) this.zas.get(api)).booleanValue();
|
||||
if (client.requiresSignIn()) {
|
||||
this.zam = true;
|
||||
if (zBooleanValue) {
|
||||
this.zaj.add(api.zab());
|
||||
} else {
|
||||
this.zal = false;
|
||||
}
|
||||
}
|
||||
map.put(client, new zaal(this, api, zBooleanValue));
|
||||
}
|
||||
if (z) {
|
||||
this.zam = false;
|
||||
}
|
||||
if (this.zam) {
|
||||
Preconditions.checkNotNull(this.zar);
|
||||
Preconditions.checkNotNull(this.zat);
|
||||
this.zar.zae(Integer.valueOf(System.identityHashCode(this.zaa.zag)));
|
||||
zaat zaatVar = new zaat(this, zaasVar);
|
||||
Api.AbstractClientBuilder abstractClientBuilder = this.zat;
|
||||
Context context = this.zac;
|
||||
zabi zabiVar = this.zaa;
|
||||
ClientSettings clientSettings = this.zar;
|
||||
this.zak = abstractClientBuilder.buildClient(context, zabiVar.zag.getLooper(), clientSettings, clientSettings.zaa(), (GoogleApiClient.ConnectionCallbacks) zaatVar, (GoogleApiClient.OnConnectionFailedListener) zaatVar);
|
||||
}
|
||||
this.zah = this.zaa.zaa.size();
|
||||
this.zau.add(zabj.zaa().submit(new zaao(this, map)));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zae() {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zag(Bundle bundle) {
|
||||
if (zaG(1)) {
|
||||
if (bundle != null) {
|
||||
this.zai.putAll(bundle);
|
||||
}
|
||||
if (zaH()) {
|
||||
zaC();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zah(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
if (zaG(1)) {
|
||||
zaE(connectionResult, api, z);
|
||||
if (zaH()) {
|
||||
zaC();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zai(int i) {
|
||||
zaD(new ConnectionResult(8, null));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final boolean zaj() {
|
||||
zaz();
|
||||
zaB(true);
|
||||
this.zaa.zak(null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaax implements zabf {
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final zabi zaa;
|
||||
|
||||
public zaax(zabi zabiVar) {
|
||||
this.zaa = zabiVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zaa(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
this.zaa.zag.zaa.add(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final BaseImplementation.ApiMethodImpl zab(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
throw new IllegalStateException("GoogleApiClient is not connected yet.");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zad() {
|
||||
Iterator it = this.zaa.zaa.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
((Api.Client) it.next()).disconnect();
|
||||
}
|
||||
this.zaa.zag.zad = Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zae() {
|
||||
this.zaa.zaj();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zag(Bundle bundle) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zah(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final void zai(int i) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabf
|
||||
public final boolean zaj() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaay implements com.google.android.gms.common.internal.zaj {
|
||||
final /* synthetic */ zabe zaa;
|
||||
|
||||
zaay(zabe zabeVar) {
|
||||
this.zaa = zabeVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.zaj
|
||||
public final boolean isConnected() {
|
||||
return this.zaa.isConnected();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaaz implements GoogleApiClient.ConnectionCallbacks {
|
||||
final /* synthetic */ AtomicReference zaa;
|
||||
final /* synthetic */ StatusPendingResult zab;
|
||||
final /* synthetic */ zabe zac;
|
||||
|
||||
zaaz(zabe zabeVar, AtomicReference atomicReference, StatusPendingResult statusPendingResult) {
|
||||
this.zac = zabeVar;
|
||||
this.zaa = atomicReference;
|
||||
this.zab = statusPendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnected(Bundle bundle) {
|
||||
this.zac.zam((GoogleApiClient) Preconditions.checkNotNull((GoogleApiClient) this.zaa.get()), this.zab, true);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnectionSuspended(int i) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zab extends ActivityLifecycleObserver {
|
||||
private final WeakReference zaa;
|
||||
|
||||
zab(zaa zaaVar) {
|
||||
this.zaa = new WeakReference(zaaVar);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ActivityLifecycleObserver
|
||||
public final ActivityLifecycleObserver onStopCallOnce(Runnable runnable) {
|
||||
zaa zaaVar = (zaa) this.zaa.get();
|
||||
if (zaaVar == null) {
|
||||
throw new IllegalStateException("The target activity has already been GC'd");
|
||||
}
|
||||
zaaVar.zac(runnable);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zaba implements GoogleApiClient.OnConnectionFailedListener {
|
||||
final /* synthetic */ StatusPendingResult zaa;
|
||||
|
||||
zaba(zabe zabeVar, StatusPendingResult statusPendingResult) {
|
||||
this.zaa = statusPendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.OnConnectionFailedListener
|
||||
public final void onConnectionFailed(ConnectionResult connectionResult) {
|
||||
this.zaa.setResult(new Status(8));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.auth.api.signin.internal.Storage;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.ResultCallback;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabb implements ResultCallback {
|
||||
final /* synthetic */ StatusPendingResult zaa;
|
||||
final /* synthetic */ boolean zab;
|
||||
final /* synthetic */ GoogleApiClient zac;
|
||||
final /* synthetic */ zabe zad;
|
||||
|
||||
zabb(zabe zabeVar, StatusPendingResult statusPendingResult, boolean z, GoogleApiClient googleApiClient) {
|
||||
this.zad = zabeVar;
|
||||
this.zaa = statusPendingResult;
|
||||
this.zab = z;
|
||||
this.zac = googleApiClient;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.ResultCallback
|
||||
public final /* bridge */ /* synthetic */ void onResult(Result result) {
|
||||
Status status = (Status) result;
|
||||
Storage.getInstance(this.zad.zan).zac();
|
||||
if (status.isSuccess() && this.zad.isConnected()) {
|
||||
zabe zabeVar = this.zad;
|
||||
zabeVar.disconnect();
|
||||
zabeVar.connect();
|
||||
}
|
||||
this.zaa.setResult(status);
|
||||
if (this.zab) {
|
||||
this.zac.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabc extends com.google.android.gms.internal.base.zau {
|
||||
final /* synthetic */ zabe zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zabc(zabe zabeVar, Looper looper) {
|
||||
super(looper);
|
||||
this.zaa = zabeVar;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i == 1) {
|
||||
zabe.zaj(this.zaa);
|
||||
return;
|
||||
}
|
||||
if (i == 2) {
|
||||
zabe.zai(this.zaa);
|
||||
return;
|
||||
}
|
||||
Log.w("GoogleApiClientImpl", "Unknown message id: " + message.what);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabd extends zabw {
|
||||
private final WeakReference zaa;
|
||||
|
||||
zabd(zabe zabeVar) {
|
||||
this.zaa = new WeakReference(zabeVar);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabw
|
||||
public final void zaa() {
|
||||
zabe zabeVar = (zabe) this.zaa.get();
|
||||
if (zabeVar == null) {
|
||||
return;
|
||||
}
|
||||
zabe.zai(zabeVar);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,655 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.PendingResult;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.service.Common;
|
||||
import com.google.android.gms.common.util.ClientLibraryUtils;
|
||||
import com.google.android.gms.location.DeviceOrientationRequest;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
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.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabe extends GoogleApiClient implements zabz {
|
||||
zabx zab;
|
||||
final Map zac;
|
||||
Set zad;
|
||||
final ClientSettings zae;
|
||||
final Map zaf;
|
||||
final Api.AbstractClientBuilder zag;
|
||||
Set zah;
|
||||
final zadc zai;
|
||||
private final Lock zaj;
|
||||
private final com.google.android.gms.common.internal.zak zak;
|
||||
private final int zam;
|
||||
private final Context zan;
|
||||
private final Looper zao;
|
||||
private volatile boolean zap;
|
||||
private long zaq;
|
||||
private long zar;
|
||||
private final zabc zas;
|
||||
private final GoogleApiAvailability zat;
|
||||
private final ListenerHolders zau;
|
||||
private final ArrayList zav;
|
||||
private Integer zaw;
|
||||
private final com.google.android.gms.common.internal.zaj zax;
|
||||
private zaca zal = null;
|
||||
final Queue zaa = new LinkedList();
|
||||
|
||||
public zabe(Context context, Lock lock, Looper looper, ClientSettings clientSettings, GoogleApiAvailability googleApiAvailability, Api.AbstractClientBuilder abstractClientBuilder, Map map, List list, List list2, Map map2, int i, int i2, ArrayList arrayList) {
|
||||
this.zaq = true != ClientLibraryUtils.isPackageSide() ? 120000L : DeviceOrientationRequest.OUTPUT_PERIOD_MEDIUM;
|
||||
this.zar = 5000L;
|
||||
this.zad = new HashSet();
|
||||
this.zau = new ListenerHolders();
|
||||
this.zaw = null;
|
||||
this.zah = null;
|
||||
zaay zaayVar = new zaay(this);
|
||||
this.zax = zaayVar;
|
||||
this.zan = context;
|
||||
this.zaj = lock;
|
||||
this.zak = new com.google.android.gms.common.internal.zak(looper, zaayVar);
|
||||
this.zao = looper;
|
||||
this.zas = new zabc(this, looper);
|
||||
this.zat = googleApiAvailability;
|
||||
this.zam = i;
|
||||
if (i >= 0) {
|
||||
this.zaw = Integer.valueOf(i2);
|
||||
}
|
||||
this.zaf = map;
|
||||
this.zac = map2;
|
||||
this.zav = arrayList;
|
||||
this.zai = new zadc();
|
||||
Iterator it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
this.zak.zaf((GoogleApiClient.ConnectionCallbacks) it.next());
|
||||
}
|
||||
Iterator it2 = list2.iterator();
|
||||
while (it2.hasNext()) {
|
||||
this.zak.zag((GoogleApiClient.OnConnectionFailedListener) it2.next());
|
||||
}
|
||||
this.zae = clientSettings;
|
||||
this.zag = abstractClientBuilder;
|
||||
}
|
||||
|
||||
public static int zad(Iterable iterable, boolean z) {
|
||||
Iterator it = iterable.iterator();
|
||||
boolean zRequiresSignIn = false;
|
||||
boolean zProvidesSignIn = false;
|
||||
while (it.hasNext()) {
|
||||
Api.Client client = (Api.Client) it.next();
|
||||
zRequiresSignIn |= client.requiresSignIn();
|
||||
zProvidesSignIn |= client.providesSignIn();
|
||||
}
|
||||
if (zRequiresSignIn) {
|
||||
return (zProvidesSignIn && z) ? 2 : 1;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
static String zag(int i) {
|
||||
return i != 1 ? i != 2 ? i != 3 ? "UNKNOWN" : "SIGN_IN_MODE_NONE" : "SIGN_IN_MODE_OPTIONAL" : "SIGN_IN_MODE_REQUIRED";
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zai(zabe zabeVar) {
|
||||
zabeVar.zaj.lock();
|
||||
try {
|
||||
if (zabeVar.zap) {
|
||||
zabeVar.zan();
|
||||
}
|
||||
} finally {
|
||||
zabeVar.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zaj(zabe zabeVar) {
|
||||
zabeVar.zaj.lock();
|
||||
try {
|
||||
if (zabeVar.zak()) {
|
||||
zabeVar.zan();
|
||||
}
|
||||
} finally {
|
||||
zabeVar.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
private final void zal(int i) {
|
||||
Integer num = this.zaw;
|
||||
if (num == null) {
|
||||
this.zaw = Integer.valueOf(i);
|
||||
} else if (num.intValue() != i) {
|
||||
throw new IllegalStateException("Cannot use sign-in mode: " + zag(i) + ". Mode was already set to " + zag(this.zaw.intValue()));
|
||||
}
|
||||
if (this.zal != null) {
|
||||
return;
|
||||
}
|
||||
boolean zRequiresSignIn = false;
|
||||
boolean zProvidesSignIn = false;
|
||||
for (Api.Client client : this.zac.values()) {
|
||||
zRequiresSignIn |= client.requiresSignIn();
|
||||
zProvidesSignIn |= client.providesSignIn();
|
||||
}
|
||||
int iIntValue = this.zaw.intValue();
|
||||
if (iIntValue == 1) {
|
||||
if (!zRequiresSignIn) {
|
||||
throw new IllegalStateException("SIGN_IN_MODE_REQUIRED cannot be used on a GoogleApiClient that does not contain any authenticated APIs. Use connect() instead.");
|
||||
}
|
||||
if (zProvidesSignIn) {
|
||||
throw new IllegalStateException("Cannot use SIGN_IN_MODE_REQUIRED with GOOGLE_SIGN_IN_API. Use connect(SIGN_IN_MODE_OPTIONAL) instead.");
|
||||
}
|
||||
} else if (iIntValue == 2 && zRequiresSignIn) {
|
||||
this.zal = zaaa.zag(this.zan, this, this.zaj, this.zao, this.zat, this.zac, this.zae, this.zaf, this.zag, this.zav);
|
||||
return;
|
||||
}
|
||||
this.zal = new zabi(this.zan, this, this.zaj, this.zao, this.zat, this.zac, this.zae, this.zaf, this.zag, this.zav, this);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zam(GoogleApiClient googleApiClient, StatusPendingResult statusPendingResult, boolean z) {
|
||||
Common.zaa.zaa(googleApiClient).setResultCallback(new zabb(this, statusPendingResult, z, googleApiClient));
|
||||
}
|
||||
|
||||
private final void zan() {
|
||||
this.zak.zab();
|
||||
((zaca) Preconditions.checkNotNull(this.zal)).zaq();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final ConnectionResult blockingConnect() {
|
||||
boolean z = true;
|
||||
Preconditions.checkState(Looper.myLooper() != Looper.getMainLooper(), "blockingConnect must not be called on the UI thread");
|
||||
this.zaj.lock();
|
||||
try {
|
||||
if (this.zam >= 0) {
|
||||
if (this.zaw == null) {
|
||||
z = false;
|
||||
}
|
||||
Preconditions.checkState(z, "Sign-in mode should have been set explicitly by auto-manage.");
|
||||
} else {
|
||||
Integer num = this.zaw;
|
||||
if (num == null) {
|
||||
this.zaw = Integer.valueOf(zad(this.zac.values(), false));
|
||||
} else if (num.intValue() == 2) {
|
||||
throw new IllegalStateException("Cannot call blockingConnect() when sign-in mode is set to SIGN_IN_MODE_OPTIONAL. Call connect(SIGN_IN_MODE_OPTIONAL) instead.");
|
||||
}
|
||||
}
|
||||
zal(((Integer) Preconditions.checkNotNull(this.zaw)).intValue());
|
||||
this.zak.zab();
|
||||
return ((zaca) Preconditions.checkNotNull(this.zal)).zab();
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final PendingResult<Status> clearDefaultAccountAndReconnect() {
|
||||
Preconditions.checkState(isConnected(), "GoogleApiClient is not connected yet.");
|
||||
Integer num = this.zaw;
|
||||
boolean z = true;
|
||||
if (num != null && num.intValue() == 2) {
|
||||
z = false;
|
||||
}
|
||||
Preconditions.checkState(z, "Cannot use clearDefaultAccountAndReconnect with GOOGLE_SIGN_IN_API");
|
||||
StatusPendingResult statusPendingResult = new StatusPendingResult(this);
|
||||
if (this.zac.containsKey(Common.CLIENT_KEY)) {
|
||||
zam(this, statusPendingResult, false);
|
||||
} else {
|
||||
AtomicReference atomicReference = new AtomicReference();
|
||||
zaaz zaazVar = new zaaz(this, atomicReference, statusPendingResult);
|
||||
zaba zabaVar = new zaba(this, statusPendingResult);
|
||||
GoogleApiClient.Builder builder = new GoogleApiClient.Builder(this.zan);
|
||||
builder.addApi(Common.API);
|
||||
builder.addConnectionCallbacks(zaazVar);
|
||||
builder.addOnConnectionFailedListener(zabaVar);
|
||||
builder.setHandler(this.zas);
|
||||
GoogleApiClient googleApiClientBuild = builder.build();
|
||||
atomicReference.set(googleApiClientBuild);
|
||||
googleApiClientBuild.connect();
|
||||
}
|
||||
return statusPendingResult;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void connect() {
|
||||
this.zaj.lock();
|
||||
try {
|
||||
int i = 2;
|
||||
boolean z = false;
|
||||
if (this.zam >= 0) {
|
||||
Preconditions.checkState(this.zaw != null, "Sign-in mode should have been set explicitly by auto-manage.");
|
||||
} else {
|
||||
Integer num = this.zaw;
|
||||
if (num == null) {
|
||||
this.zaw = Integer.valueOf(zad(this.zac.values(), false));
|
||||
} else if (num.intValue() == 2) {
|
||||
throw new IllegalStateException("Cannot call connect() when SignInMode is set to SIGN_IN_MODE_OPTIONAL. Call connect(SIGN_IN_MODE_OPTIONAL) instead.");
|
||||
}
|
||||
}
|
||||
int iIntValue = ((Integer) Preconditions.checkNotNull(this.zaw)).intValue();
|
||||
this.zaj.lock();
|
||||
if (iIntValue != 3 && iIntValue != 1) {
|
||||
if (iIntValue != 2) {
|
||||
i = iIntValue;
|
||||
}
|
||||
Preconditions.checkArgument(z, "Illegal sign-in mode: " + i);
|
||||
zal(i);
|
||||
zan();
|
||||
this.zaj.unlock();
|
||||
}
|
||||
i = iIntValue;
|
||||
z = true;
|
||||
Preconditions.checkArgument(z, "Illegal sign-in mode: " + i);
|
||||
zal(i);
|
||||
zan();
|
||||
this.zaj.unlock();
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void disconnect() {
|
||||
this.zaj.lock();
|
||||
try {
|
||||
this.zai.zab();
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar != null) {
|
||||
zacaVar.zar();
|
||||
}
|
||||
this.zau.zab();
|
||||
for (BaseImplementation.ApiMethodImpl apiMethodImpl : this.zaa) {
|
||||
apiMethodImpl.zan(null);
|
||||
apiMethodImpl.cancel();
|
||||
}
|
||||
this.zaa.clear();
|
||||
if (this.zal != null) {
|
||||
zak();
|
||||
this.zak.zaa();
|
||||
}
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
printWriter.append((CharSequence) str).append("mContext=").println(this.zan);
|
||||
printWriter.append((CharSequence) str).append("mResuming=").print(this.zap);
|
||||
printWriter.append(" mWorkQueue.size()=").print(this.zaa.size());
|
||||
printWriter.append(" mUnconsumedApiCalls.size()=").println(this.zai.zab.size());
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar != null) {
|
||||
zacaVar.zas(str, fileDescriptor, printWriter, strArr);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final <A extends Api.AnyClient, R extends Result, T extends BaseImplementation.ApiMethodImpl<R, A>> T enqueue(T t) {
|
||||
Api<?> api = t.getApi();
|
||||
Preconditions.checkArgument(this.zac.containsKey(t.getClientKey()), "GoogleApiClient is not configured to use " + (api != null ? api.zad() : "the API") + " required for this call.");
|
||||
this.zaj.lock();
|
||||
try {
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar == null) {
|
||||
this.zaa.add(t);
|
||||
} else {
|
||||
t = (T) zacaVar.zae(t);
|
||||
}
|
||||
return t;
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T execute(T t) {
|
||||
Map map = this.zac;
|
||||
Api<?> api = t.getApi();
|
||||
Preconditions.checkArgument(map.containsKey(t.getClientKey()), "GoogleApiClient is not configured to use " + (api != null ? api.zad() : "the API") + " required for this call.");
|
||||
this.zaj.lock();
|
||||
try {
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar == null) {
|
||||
throw new IllegalStateException("GoogleApiClient is not connected yet.");
|
||||
}
|
||||
if (this.zap) {
|
||||
this.zaa.add(t);
|
||||
while (!this.zaa.isEmpty()) {
|
||||
BaseImplementation.ApiMethodImpl apiMethodImpl = (BaseImplementation.ApiMethodImpl) this.zaa.remove();
|
||||
this.zai.zaa(apiMethodImpl);
|
||||
apiMethodImpl.setFailedResult(Status.RESULT_INTERNAL_ERROR);
|
||||
}
|
||||
} else {
|
||||
t = (T) zacaVar.zaf(t);
|
||||
}
|
||||
return t;
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final <C extends Api.Client> C getClient(Api.AnyClientKey<C> anyClientKey) {
|
||||
C c = (C) this.zac.get(anyClientKey);
|
||||
Preconditions.checkNotNull(c, "Appropriate Api was not requested.");
|
||||
return c;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult getConnectionResult(Api<?> api) {
|
||||
ConnectionResult connectionResult;
|
||||
this.zaj.lock();
|
||||
try {
|
||||
if (!isConnected() && !this.zap) {
|
||||
throw new IllegalStateException("Cannot invoke getConnectionResult unless GoogleApiClient is connected");
|
||||
}
|
||||
if (!this.zac.containsKey(api.zab())) {
|
||||
throw new IllegalArgumentException(api.zad() + " was never registered with GoogleApiClient");
|
||||
}
|
||||
ConnectionResult connectionResultZad = ((zaca) Preconditions.checkNotNull(this.zal)).zad(api);
|
||||
if (connectionResultZad != null) {
|
||||
return connectionResultZad;
|
||||
}
|
||||
if (this.zap) {
|
||||
connectionResult = ConnectionResult.RESULT_SUCCESS;
|
||||
} else {
|
||||
Log.w("GoogleApiClientImpl", zaf());
|
||||
Log.wtf("GoogleApiClientImpl", api.zad() + " requested in getConnectionResult is not connected but is not present in the failed connections map", new Exception());
|
||||
connectionResult = new ConnectionResult(8, null);
|
||||
}
|
||||
return connectionResult;
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final Context getContext() {
|
||||
return this.zan;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final Looper getLooper() {
|
||||
return this.zao;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean hasApi(Api<?> api) {
|
||||
return this.zac.containsKey(api.zab());
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean hasConnectedApi(Api<?> api) {
|
||||
Api.Client client;
|
||||
return isConnected() && (client = (Api.Client) this.zac.get(api.zab())) != null && client.isConnected();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnected() {
|
||||
zaca zacaVar = this.zal;
|
||||
return zacaVar != null && zacaVar.zaw();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnecting() {
|
||||
zaca zacaVar = this.zal;
|
||||
return zacaVar != null && zacaVar.zax();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionCallbacksRegistered(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
return this.zak.zaj(connectionCallbacks);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean isConnectionFailedListenerRegistered(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
return this.zak.zak(onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final boolean maybeSignIn(SignInConnectionListener signInConnectionListener) {
|
||||
zaca zacaVar = this.zal;
|
||||
return zacaVar != null && zacaVar.zay(signInConnectionListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void maybeSignOut() {
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar != null) {
|
||||
zacaVar.zau();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void reconnect() {
|
||||
disconnect();
|
||||
connect();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
this.zak.zaf(connectionCallbacks);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void registerConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this.zak.zag(onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final <L> ListenerHolder<L> registerListener(L l) {
|
||||
this.zaj.lock();
|
||||
try {
|
||||
return this.zau.zaa(l, this.zao, "NO_TYPE");
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void stopAutoManage(FragmentActivity fragmentActivity) {
|
||||
LifecycleActivity lifecycleActivity = new LifecycleActivity((Activity) fragmentActivity);
|
||||
if (this.zam < 0) {
|
||||
throw new IllegalStateException("Called stopAutoManage but automatic lifecycle management is not enabled.");
|
||||
}
|
||||
zak.zaa(lifecycleActivity).zae(this.zam);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionCallbacks(GoogleApiClient.ConnectionCallbacks connectionCallbacks) {
|
||||
this.zak.zah(connectionCallbacks);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void unregisterConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener onConnectionFailedListener) {
|
||||
this.zak.zai(onConnectionFailedListener);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabz
|
||||
public final void zaa(ConnectionResult connectionResult) {
|
||||
if (!this.zat.isPlayServicesPossiblyUpdating(this.zan, connectionResult.getErrorCode())) {
|
||||
zak();
|
||||
}
|
||||
if (this.zap) {
|
||||
return;
|
||||
}
|
||||
this.zak.zac(connectionResult);
|
||||
this.zak.zaa();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabz
|
||||
public final void zab(Bundle bundle) {
|
||||
while (!this.zaa.isEmpty()) {
|
||||
execute((BaseImplementation.ApiMethodImpl) this.zaa.remove());
|
||||
}
|
||||
this.zak.zad(bundle);
|
||||
}
|
||||
|
||||
final String zaf() {
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
dump("", null, new PrintWriter(stringWriter), null);
|
||||
return stringWriter.toString();
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
final boolean zak() {
|
||||
if (!this.zap) {
|
||||
return false;
|
||||
}
|
||||
this.zap = false;
|
||||
this.zas.removeMessages(2);
|
||||
this.zas.removeMessages(1);
|
||||
zabx zabxVar = this.zab;
|
||||
if (zabxVar != null) {
|
||||
zabxVar.zab();
|
||||
this.zab = null;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void zao(zada zadaVar) {
|
||||
this.zaj.lock();
|
||||
try {
|
||||
if (this.zah == null) {
|
||||
this.zah = new HashSet();
|
||||
}
|
||||
this.zah.add(zadaVar);
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void zap(zada zadaVar) {
|
||||
this.zaj.lock();
|
||||
try {
|
||||
Set set = this.zah;
|
||||
if (set == null) {
|
||||
Log.wtf("GoogleApiClientImpl", "Attempted to remove pending transform when no transforms are registered.", new Exception());
|
||||
} else if (set.remove(zadaVar)) {
|
||||
this.zaj.lock();
|
||||
Set set2 = this.zah;
|
||||
if (set2 == null) {
|
||||
this.zaj.unlock();
|
||||
} else {
|
||||
boolean zIsEmpty = set2.isEmpty();
|
||||
this.zaj.unlock();
|
||||
if (zIsEmpty) {
|
||||
}
|
||||
}
|
||||
zaca zacaVar = this.zal;
|
||||
if (zacaVar != null) {
|
||||
zacaVar.zat();
|
||||
}
|
||||
} else {
|
||||
Log.wtf("GoogleApiClientImpl", "Failed to remove pending transform - this may lead to memory leaks!", new Exception());
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zabz
|
||||
public final void zac(int i, boolean z) {
|
||||
if (i == 1) {
|
||||
if (!z && !this.zap) {
|
||||
this.zap = true;
|
||||
if (this.zab == null && !ClientLibraryUtils.isPackageSide()) {
|
||||
try {
|
||||
this.zab = this.zat.zac(this.zan.getApplicationContext(), new zabd(this));
|
||||
} catch (SecurityException unused) {
|
||||
}
|
||||
}
|
||||
zabc zabcVar = this.zas;
|
||||
zabcVar.sendMessageDelayed(zabcVar.obtainMessage(1), this.zaq);
|
||||
zabc zabcVar2 = this.zas;
|
||||
zabcVar2.sendMessageDelayed(zabcVar2.obtainMessage(2), this.zar);
|
||||
}
|
||||
i = 1;
|
||||
}
|
||||
for (BasePendingResult basePendingResult : (BasePendingResult[]) this.zai.zab.toArray(new BasePendingResult[0])) {
|
||||
basePendingResult.forceFailureUnlessReady(zadc.zaa);
|
||||
}
|
||||
this.zak.zae(i);
|
||||
this.zak.zaa();
|
||||
if (i == 2) {
|
||||
zan();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final ConnectionResult blockingConnect(long j, TimeUnit timeUnit) {
|
||||
Preconditions.checkState(Looper.myLooper() != Looper.getMainLooper(), "blockingConnect must not be called on the UI thread");
|
||||
Preconditions.checkNotNull(timeUnit, "TimeUnit must not be null");
|
||||
this.zaj.lock();
|
||||
try {
|
||||
Integer num = this.zaw;
|
||||
if (num != null) {
|
||||
if (num.intValue() == 2) {
|
||||
throw new IllegalStateException("Cannot call blockingConnect() when sign-in mode is set to SIGN_IN_MODE_OPTIONAL. Call connect(SIGN_IN_MODE_OPTIONAL) instead.");
|
||||
}
|
||||
} else {
|
||||
this.zaw = Integer.valueOf(zad(this.zac.values(), false));
|
||||
}
|
||||
zal(((Integer) Preconditions.checkNotNull(this.zaw)).intValue());
|
||||
this.zak.zab();
|
||||
return ((zaca) Preconditions.checkNotNull(this.zal)).zac(j, timeUnit);
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void connect(int i) {
|
||||
this.zaj.lock();
|
||||
boolean z = true;
|
||||
if (i != 3 && i != 1) {
|
||||
if (i == 2) {
|
||||
i = 2;
|
||||
} else {
|
||||
z = false;
|
||||
}
|
||||
}
|
||||
try {
|
||||
Preconditions.checkArgument(z, "Illegal sign-in mode: " + i);
|
||||
zal(i);
|
||||
zan();
|
||||
} finally {
|
||||
this.zaj.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface zabf {
|
||||
BaseImplementation.ApiMethodImpl zaa(BaseImplementation.ApiMethodImpl apiMethodImpl);
|
||||
|
||||
BaseImplementation.ApiMethodImpl zab(BaseImplementation.ApiMethodImpl apiMethodImpl);
|
||||
|
||||
void zad();
|
||||
|
||||
void zae();
|
||||
|
||||
void zag(Bundle bundle);
|
||||
|
||||
void zah(ConnectionResult connectionResult, Api api, boolean z);
|
||||
|
||||
void zai(int i);
|
||||
|
||||
boolean zaj();
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
abstract class zabg {
|
||||
private final zabf zaa;
|
||||
|
||||
protected zabg(zabf zabfVar) {
|
||||
this.zaa = zabfVar;
|
||||
}
|
||||
|
||||
protected abstract void zaa();
|
||||
|
||||
public final void zab(zabi zabiVar) {
|
||||
zabiVar.zai.lock();
|
||||
try {
|
||||
if (zabiVar.zan == this.zaa) {
|
||||
zaa();
|
||||
}
|
||||
} finally {
|
||||
zabiVar.zai.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabh extends com.google.android.gms.internal.base.zau {
|
||||
final /* synthetic */ zabi zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zabh(zabi zabiVar, Looper looper) {
|
||||
super(looper);
|
||||
this.zaa = zabiVar;
|
||||
}
|
||||
|
||||
@Override // android.os.Handler
|
||||
public final void handleMessage(Message message) {
|
||||
int i = message.what;
|
||||
if (i == 1) {
|
||||
((zabg) message.obj).zab(this.zaa);
|
||||
} else {
|
||||
if (i == 2) {
|
||||
throw ((RuntimeException) message.obj);
|
||||
}
|
||||
Log.w("GACStateManager", "Unknown message id: " + message.what);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import com.google.android.gms.common.internal.ClientSettings;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Condition;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabi implements zaca, zau {
|
||||
final Map zaa;
|
||||
final ClientSettings zac;
|
||||
final Map zad;
|
||||
final Api.AbstractClientBuilder zae;
|
||||
int zaf;
|
||||
final zabe zag;
|
||||
final zabz zah;
|
||||
private final Lock zai;
|
||||
private final Condition zaj;
|
||||
private final Context zak;
|
||||
private final GoogleApiAvailabilityLight zal;
|
||||
private final zabh zam;
|
||||
|
||||
@NotOnlyInitialized
|
||||
private volatile zabf zan;
|
||||
final Map zab = new HashMap();
|
||||
private ConnectionResult zao = null;
|
||||
|
||||
public zabi(Context context, zabe zabeVar, Lock lock, Looper looper, GoogleApiAvailabilityLight googleApiAvailabilityLight, Map map, ClientSettings clientSettings, Map map2, Api.AbstractClientBuilder abstractClientBuilder, ArrayList arrayList, zabz zabzVar) {
|
||||
this.zak = context;
|
||||
this.zai = lock;
|
||||
this.zal = googleApiAvailabilityLight;
|
||||
this.zaa = map;
|
||||
this.zac = clientSettings;
|
||||
this.zad = map2;
|
||||
this.zae = abstractClientBuilder;
|
||||
this.zag = zabeVar;
|
||||
this.zah = zabzVar;
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
((zat) arrayList.get(i)).zaa(this);
|
||||
}
|
||||
this.zam = new zabh(this, looper);
|
||||
this.zaj = lock.newCondition();
|
||||
this.zan = new zaax(this);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnected(Bundle bundle) {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zan.zag(bundle);
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnectionSuspended(int i) {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zan.zai(i);
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zau
|
||||
public final void zaa(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zan.zah(connectionResult, api, z);
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zab() {
|
||||
zaq();
|
||||
while (this.zan instanceof zaaw) {
|
||||
try {
|
||||
this.zaj.await();
|
||||
} catch (InterruptedException unused) {
|
||||
Thread.currentThread().interrupt();
|
||||
return new ConnectionResult(15, null);
|
||||
}
|
||||
}
|
||||
if (this.zan instanceof zaaj) {
|
||||
return ConnectionResult.RESULT_SUCCESS;
|
||||
}
|
||||
ConnectionResult connectionResult = this.zao;
|
||||
return connectionResult != null ? connectionResult : new ConnectionResult(13, null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zac(long j, TimeUnit timeUnit) {
|
||||
zaq();
|
||||
long nanos = timeUnit.toNanos(j);
|
||||
while (this.zan instanceof zaaw) {
|
||||
if (nanos <= 0) {
|
||||
zar();
|
||||
return new ConnectionResult(14, null);
|
||||
}
|
||||
try {
|
||||
nanos = this.zaj.awaitNanos(nanos);
|
||||
} catch (InterruptedException unused) {
|
||||
Thread.currentThread().interrupt();
|
||||
return new ConnectionResult(15, null);
|
||||
}
|
||||
Thread.currentThread().interrupt();
|
||||
return new ConnectionResult(15, null);
|
||||
}
|
||||
if (this.zan instanceof zaaj) {
|
||||
return ConnectionResult.RESULT_SUCCESS;
|
||||
}
|
||||
ConnectionResult connectionResult = this.zao;
|
||||
return connectionResult != null ? connectionResult : new ConnectionResult(13, null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final ConnectionResult zad(Api api) {
|
||||
Map map = this.zaa;
|
||||
Api.AnyClientKey anyClientKeyZab = api.zab();
|
||||
if (!map.containsKey(anyClientKeyZab)) {
|
||||
return null;
|
||||
}
|
||||
if (((Api.Client) this.zaa.get(anyClientKeyZab)).isConnected()) {
|
||||
return ConnectionResult.RESULT_SUCCESS;
|
||||
}
|
||||
if (this.zab.containsKey(anyClientKeyZab)) {
|
||||
return (ConnectionResult) this.zab.get(anyClientKeyZab);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zae(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
apiMethodImpl.zak();
|
||||
this.zan.zaa(apiMethodImpl);
|
||||
return apiMethodImpl;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final BaseImplementation.ApiMethodImpl zaf(BaseImplementation.ApiMethodImpl apiMethodImpl) {
|
||||
apiMethodImpl.zak();
|
||||
return this.zan.zab(apiMethodImpl);
|
||||
}
|
||||
|
||||
final void zai() {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zag.zak();
|
||||
this.zan = new zaaj(this);
|
||||
this.zan.zad();
|
||||
this.zaj.signalAll();
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
final void zaj() {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zan = new zaaw(this, this.zac, this.zad, this.zal, this.zae, this.zai, this.zak);
|
||||
this.zan.zad();
|
||||
this.zaj.signalAll();
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
final void zak(ConnectionResult connectionResult) {
|
||||
this.zai.lock();
|
||||
try {
|
||||
this.zao = connectionResult;
|
||||
this.zan = new zaax(this);
|
||||
this.zan.zad();
|
||||
this.zaj.signalAll();
|
||||
} finally {
|
||||
this.zai.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
final void zal(zabg zabgVar) {
|
||||
zabh zabhVar = this.zam;
|
||||
zabhVar.sendMessage(zabhVar.obtainMessage(1, zabgVar));
|
||||
}
|
||||
|
||||
final void zam(RuntimeException runtimeException) {
|
||||
zabh zabhVar = this.zam;
|
||||
zabhVar.sendMessage(zabhVar.obtainMessage(2, runtimeException));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zaq() {
|
||||
this.zan.zae();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zar() {
|
||||
if (this.zan.zaj()) {
|
||||
this.zab.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zas(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
|
||||
printWriter.append((CharSequence) str).append("mState=").println(this.zan);
|
||||
for (Api api : this.zad.keySet()) {
|
||||
String strValueOf = String.valueOf(str);
|
||||
printWriter.append((CharSequence) str).append((CharSequence) api.zad()).println(":");
|
||||
((Api.Client) Preconditions.checkNotNull((Api.Client) this.zaa.get(api.zab()))).dump(strValueOf.concat(" "), fileDescriptor, printWriter, strArr);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zat() {
|
||||
if (this.zan instanceof zaaj) {
|
||||
((zaaj) this.zan).zaf();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final void zau() {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zaw() {
|
||||
return this.zan instanceof zaaj;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zax() {
|
||||
return this.zan instanceof zaaw;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zaca
|
||||
public final boolean zay(SignInConnectionListener signInConnectionListener) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.util.concurrent.NumberedThreadFactory;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabj {
|
||||
private static final ExecutorService zaa = com.google.android.gms.internal.base.zat.zaa().zac(2, new NumberedThreadFactory("GAC_Executor"), 2);
|
||||
|
||||
public static ExecutorService zaa() {
|
||||
return zaa;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.internal.BackgroundDetector;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabl implements BackgroundDetector.BackgroundStateChangeListener {
|
||||
final /* synthetic */ GoogleApiManager zaa;
|
||||
|
||||
zabl(GoogleApiManager googleApiManager) {
|
||||
this.zaa = googleApiManager;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.BackgroundDetector.BackgroundStateChangeListener
|
||||
public final void onBackgroundStateChanged(boolean z) {
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.sendMessage(googleApiManager.zar.obtainMessage(1, Boolean.valueOf(z)));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabm implements Runnable {
|
||||
final /* synthetic */ zabq zaa;
|
||||
|
||||
zabm(zabq zabqVar) {
|
||||
this.zaa = zabqVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zaa.zaH();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabn implements Runnable {
|
||||
final /* synthetic */ int zaa;
|
||||
final /* synthetic */ zabq zab;
|
||||
|
||||
zabn(zabq zabqVar, int i) {
|
||||
this.zab = zabqVar;
|
||||
this.zaa = i;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
this.zab.zaI(this.zaa);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabo implements Runnable {
|
||||
final /* synthetic */ zabp zaa;
|
||||
|
||||
zabo(zabp zabpVar) {
|
||||
this.zaa = zabpVar;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zabq zabqVar = this.zaa.zaa;
|
||||
zabqVar.zac.disconnect(String.valueOf(zabqVar.zac.getClass().getName()).concat(" disconnecting because it was signed out."));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabp implements BaseGmsClient.SignOutCallbacks {
|
||||
final /* synthetic */ zabq zaa;
|
||||
|
||||
zabp(zabq zabqVar) {
|
||||
this.zaa = zabqVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.SignOutCallbacks
|
||||
public final void onSignOutComplete() {
|
||||
this.zaa.zaa.zar.post(new zabo(this));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,510 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import androidx.collection.ArrayMap;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.common.api.GoogleApiClient;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.api.UnsupportedApiCallException;
|
||||
import com.google.android.gms.common.api.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.util.ArrayUtils;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import com.google.errorprone.annotations.ResultIgnorabilityUnspecified;
|
||||
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 org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabq implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, zau {
|
||||
final /* synthetic */ GoogleApiManager zaa;
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final Api.Client zac;
|
||||
private final ApiKey zad;
|
||||
private final zaad zae;
|
||||
private final int zah;
|
||||
private final zact zai;
|
||||
private boolean zaj;
|
||||
private final Queue zab = new LinkedList();
|
||||
private final Set zaf = new HashSet();
|
||||
private final Map zag = new HashMap();
|
||||
private final List zak = new ArrayList();
|
||||
private ConnectionResult zal = null;
|
||||
private int zam = 0;
|
||||
|
||||
public zabq(GoogleApiManager googleApiManager, GoogleApi googleApi) {
|
||||
this.zaa = googleApiManager;
|
||||
Api.Client clientZab = googleApi.zab(googleApiManager.zar.getLooper(), this);
|
||||
this.zac = clientZab;
|
||||
this.zad = googleApi.getApiKey();
|
||||
this.zae = new zaad();
|
||||
this.zah = googleApi.zaa();
|
||||
if (clientZab.requiresSignIn()) {
|
||||
this.zai = googleApi.zac(googleApiManager.zai, googleApiManager.zar);
|
||||
} else {
|
||||
this.zai = null;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
private final Feature zaC(Feature[] featureArr) {
|
||||
if (featureArr != null && featureArr.length != 0) {
|
||||
Feature[] availableFeatures = this.zac.getAvailableFeatures();
|
||||
if (availableFeatures == null) {
|
||||
availableFeatures = new Feature[0];
|
||||
}
|
||||
ArrayMap arrayMap = new ArrayMap(availableFeatures.length);
|
||||
for (Feature feature : availableFeatures) {
|
||||
arrayMap.put(feature.getName(), Long.valueOf(feature.getVersion()));
|
||||
}
|
||||
for (Feature feature2 : featureArr) {
|
||||
Long l = (Long) arrayMap.get(feature2.getName());
|
||||
if (l == null || l.longValue() < feature2.getVersion()) {
|
||||
return feature2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private final void zaD(ConnectionResult connectionResult) {
|
||||
Iterator it = this.zaf.iterator();
|
||||
while (it.hasNext()) {
|
||||
((zal) it.next()).zac(this.zad, connectionResult, Objects.equal(connectionResult, ConnectionResult.RESULT_SUCCESS) ? this.zac.getEndpointPackageName() : null);
|
||||
}
|
||||
this.zaf.clear();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaE(Status status) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
zaF(status, null, false);
|
||||
}
|
||||
|
||||
private final void zaF(Status status, Exception exc, boolean z) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if ((status == null) == (exc == null)) {
|
||||
throw new IllegalArgumentException("Status XOR exception should be null");
|
||||
}
|
||||
Iterator it = this.zab.iterator();
|
||||
while (it.hasNext()) {
|
||||
zai zaiVar = (zai) it.next();
|
||||
if (!z || zaiVar.zac == 2) {
|
||||
if (status != null) {
|
||||
zaiVar.zad(status);
|
||||
} else {
|
||||
zaiVar.zae(exc);
|
||||
}
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaG() {
|
||||
ArrayList arrayList = new ArrayList(this.zab);
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
zai zaiVar = (zai) arrayList.get(i);
|
||||
if (!this.zac.isConnected()) {
|
||||
return;
|
||||
}
|
||||
if (zaM(zaiVar)) {
|
||||
this.zab.remove(zaiVar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaH() {
|
||||
zan();
|
||||
zaD(ConnectionResult.RESULT_SUCCESS);
|
||||
zaL();
|
||||
Iterator it = this.zag.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
zaci zaciVar = (zaci) it.next();
|
||||
if (zaC(zaciVar.zaa.getRequiredFeatures()) != null) {
|
||||
it.remove();
|
||||
} else {
|
||||
try {
|
||||
zaciVar.zaa.registerListener(this.zac, new TaskCompletionSource<>());
|
||||
} catch (DeadObjectException unused) {
|
||||
onConnectionSuspended(3);
|
||||
this.zac.disconnect("DeadObjectException thrown while calling register listener method.");
|
||||
} catch (RemoteException unused2) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
zaG();
|
||||
zaJ();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zaI(int i) {
|
||||
zan();
|
||||
this.zaj = true;
|
||||
this.zae.zae(i, this.zac.getLastDisconnectMessage());
|
||||
ApiKey apiKey = this.zad;
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.sendMessageDelayed(Message.obtain(googleApiManager.zar, 9, apiKey), 5000L);
|
||||
ApiKey apiKey2 = this.zad;
|
||||
GoogleApiManager googleApiManager2 = this.zaa;
|
||||
googleApiManager2.zar.sendMessageDelayed(Message.obtain(googleApiManager2.zar, 11, apiKey2), 120000L);
|
||||
this.zaa.zak.zac();
|
||||
Iterator it = this.zag.values().iterator();
|
||||
while (it.hasNext()) {
|
||||
((zaci) it.next()).zac.run();
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaJ() {
|
||||
this.zaa.zar.removeMessages(12, this.zad);
|
||||
ApiKey apiKey = this.zad;
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.sendMessageDelayed(googleApiManager.zar.obtainMessage(12, apiKey), this.zaa.zae);
|
||||
}
|
||||
|
||||
private final void zaK(zai zaiVar) {
|
||||
zaiVar.zag(this.zae, zaA());
|
||||
try {
|
||||
zaiVar.zaf(this);
|
||||
} catch (DeadObjectException unused) {
|
||||
onConnectionSuspended(1);
|
||||
this.zac.disconnect("DeadObjectException thrown while running ApiCallRunner.");
|
||||
}
|
||||
}
|
||||
|
||||
private final void zaL() {
|
||||
if (this.zaj) {
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.removeMessages(11, this.zad);
|
||||
GoogleApiManager googleApiManager2 = this.zaa;
|
||||
googleApiManager2.zar.removeMessages(9, this.zad);
|
||||
this.zaj = false;
|
||||
}
|
||||
}
|
||||
|
||||
private final boolean zaM(zai zaiVar) {
|
||||
if (!(zaiVar instanceof zac)) {
|
||||
zaK(zaiVar);
|
||||
return true;
|
||||
}
|
||||
zac zacVar = (zac) zaiVar;
|
||||
Feature featureZaC = zaC(zacVar.zab(this));
|
||||
if (featureZaC == null) {
|
||||
zaK(zaiVar);
|
||||
return true;
|
||||
}
|
||||
Log.w("GoogleApiManager", this.zac.getClass().getName() + " could not execute call because it requires feature (" + featureZaC.getName() + ", " + featureZaC.getVersion() + ").");
|
||||
if (!this.zaa.zas || !zacVar.zaa(this)) {
|
||||
zacVar.zae(new UnsupportedApiCallException(featureZaC));
|
||||
return true;
|
||||
}
|
||||
zabs zabsVar = new zabs(this.zad, featureZaC, null);
|
||||
int iIndexOf = this.zak.indexOf(zabsVar);
|
||||
if (iIndexOf >= 0) {
|
||||
zabs zabsVar2 = (zabs) this.zak.get(iIndexOf);
|
||||
this.zaa.zar.removeMessages(15, zabsVar2);
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.sendMessageDelayed(Message.obtain(googleApiManager.zar, 15, zabsVar2), 5000L);
|
||||
return false;
|
||||
}
|
||||
this.zak.add(zabsVar);
|
||||
GoogleApiManager googleApiManager2 = this.zaa;
|
||||
googleApiManager2.zar.sendMessageDelayed(Message.obtain(googleApiManager2.zar, 15, zabsVar), 5000L);
|
||||
GoogleApiManager googleApiManager3 = this.zaa;
|
||||
googleApiManager3.zar.sendMessageDelayed(Message.obtain(googleApiManager3.zar, 16, zabsVar), 120000L);
|
||||
ConnectionResult connectionResult = new ConnectionResult(2, null);
|
||||
if (zaN(connectionResult)) {
|
||||
return false;
|
||||
}
|
||||
this.zaa.zaE(connectionResult, this.zah);
|
||||
return false;
|
||||
}
|
||||
|
||||
private final boolean zaN(ConnectionResult connectionResult) {
|
||||
synchronized (GoogleApiManager.zac) {
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
if (googleApiManager.zao == null || !googleApiManager.zap.contains(this.zad)) {
|
||||
return false;
|
||||
}
|
||||
this.zaa.zao.zah(connectionResult, this.zah);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final boolean zaO(boolean z) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if (!this.zac.isConnected() || !this.zag.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
if (!this.zae.zag()) {
|
||||
this.zac.disconnect("Timing out service connection.");
|
||||
return true;
|
||||
}
|
||||
if (!z) {
|
||||
return false;
|
||||
}
|
||||
zaJ();
|
||||
return false;
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zal(zabq zabqVar, zabs zabsVar) {
|
||||
if (zabqVar.zak.contains(zabsVar) && !zabqVar.zaj) {
|
||||
if (zabqVar.zac.isConnected()) {
|
||||
zabqVar.zaG();
|
||||
} else {
|
||||
zabqVar.zao();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static /* bridge */ /* synthetic */ void zam(zabq zabqVar, zabs zabsVar) {
|
||||
Feature[] featureArrZab;
|
||||
if (zabqVar.zak.remove(zabsVar)) {
|
||||
zabqVar.zaa.zar.removeMessages(15, zabsVar);
|
||||
zabqVar.zaa.zar.removeMessages(16, zabsVar);
|
||||
Feature feature = zabsVar.zab;
|
||||
ArrayList arrayList = new ArrayList(zabqVar.zab.size());
|
||||
for (zai zaiVar : zabqVar.zab) {
|
||||
if ((zaiVar instanceof zac) && (featureArrZab = ((zac) zaiVar).zab(zabqVar)) != null && ArrayUtils.contains(featureArrZab, feature)) {
|
||||
arrayList.add(zaiVar);
|
||||
}
|
||||
}
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
zai zaiVar2 = (zai) arrayList.get(i);
|
||||
zabqVar.zab.remove(zaiVar2);
|
||||
zaiVar2.zae(new UnsupportedApiCallException(feature));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnected(Bundle bundle) {
|
||||
if (Looper.myLooper() == this.zaa.zar.getLooper()) {
|
||||
zaH();
|
||||
} else {
|
||||
this.zaa.zar.post(new zabm(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.OnConnectionFailedListener
|
||||
public final void onConnectionFailed(ConnectionResult connectionResult) {
|
||||
zar(connectionResult, null);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.ConnectionCallbacks
|
||||
public final void onConnectionSuspended(int i) {
|
||||
if (Looper.myLooper() == this.zaa.zar.getLooper()) {
|
||||
zaI(i);
|
||||
} else {
|
||||
this.zaa.zar.post(new zabn(this, i));
|
||||
}
|
||||
}
|
||||
|
||||
public final boolean zaA() {
|
||||
return this.zac.requiresSignIn();
|
||||
}
|
||||
|
||||
@ResultIgnorabilityUnspecified
|
||||
public final boolean zaB() {
|
||||
return zaO(true);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zau
|
||||
public final void zaa(ConnectionResult connectionResult, Api api, boolean z) {
|
||||
throw null;
|
||||
}
|
||||
|
||||
public final int zab() {
|
||||
return this.zah;
|
||||
}
|
||||
|
||||
final int zac() {
|
||||
return this.zam;
|
||||
}
|
||||
|
||||
public final ConnectionResult zad() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
return this.zal;
|
||||
}
|
||||
|
||||
public final Api.Client zaf() {
|
||||
return this.zac;
|
||||
}
|
||||
|
||||
public final Map zah() {
|
||||
return this.zag;
|
||||
}
|
||||
|
||||
public final void zan() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
this.zal = null;
|
||||
}
|
||||
|
||||
public final void zao() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if (this.zac.isConnected() || this.zac.isConnecting()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
int iZab = googleApiManager.zak.zab(googleApiManager.zai, this.zac);
|
||||
if (iZab != 0) {
|
||||
ConnectionResult connectionResult = new ConnectionResult(iZab, null);
|
||||
Log.w("GoogleApiManager", "The service for " + this.zac.getClass().getName() + " is not available: " + connectionResult.toString());
|
||||
zar(connectionResult, null);
|
||||
return;
|
||||
}
|
||||
GoogleApiManager googleApiManager2 = this.zaa;
|
||||
Api.Client client = this.zac;
|
||||
zabu zabuVar = new zabu(googleApiManager2, client, this.zad);
|
||||
if (client.requiresSignIn()) {
|
||||
((zact) Preconditions.checkNotNull(this.zai)).zae(zabuVar);
|
||||
}
|
||||
try {
|
||||
this.zac.connect(zabuVar);
|
||||
} catch (SecurityException e) {
|
||||
zar(new ConnectionResult(10), e);
|
||||
}
|
||||
} catch (IllegalStateException e2) {
|
||||
zar(new ConnectionResult(10), e2);
|
||||
}
|
||||
}
|
||||
|
||||
public final void zap(zai zaiVar) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if (this.zac.isConnected()) {
|
||||
if (zaM(zaiVar)) {
|
||||
zaJ();
|
||||
return;
|
||||
} else {
|
||||
this.zab.add(zaiVar);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.zab.add(zaiVar);
|
||||
ConnectionResult connectionResult = this.zal;
|
||||
if (connectionResult == null || !connectionResult.hasResolution()) {
|
||||
zao();
|
||||
} else {
|
||||
zar(this.zal, null);
|
||||
}
|
||||
}
|
||||
|
||||
final void zaq() {
|
||||
this.zam++;
|
||||
}
|
||||
|
||||
public final void zar(ConnectionResult connectionResult, Exception exc) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
zact zactVar = this.zai;
|
||||
if (zactVar != null) {
|
||||
zactVar.zaf();
|
||||
}
|
||||
zan();
|
||||
this.zaa.zak.zac();
|
||||
zaD(connectionResult);
|
||||
if ((this.zac instanceof com.google.android.gms.common.internal.service.zap) && connectionResult.getErrorCode() != 24) {
|
||||
this.zaa.zaf = true;
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
googleApiManager.zar.sendMessageDelayed(googleApiManager.zar.obtainMessage(19), 300000L);
|
||||
}
|
||||
if (connectionResult.getErrorCode() == 4) {
|
||||
zaE(GoogleApiManager.zab);
|
||||
return;
|
||||
}
|
||||
if (this.zab.isEmpty()) {
|
||||
this.zal = connectionResult;
|
||||
return;
|
||||
}
|
||||
if (exc != null) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
zaF(null, exc, false);
|
||||
return;
|
||||
}
|
||||
if (!this.zaa.zas) {
|
||||
zaE(GoogleApiManager.zaF(this.zad, connectionResult));
|
||||
return;
|
||||
}
|
||||
zaF(GoogleApiManager.zaF(this.zad, connectionResult), null, true);
|
||||
if (this.zab.isEmpty() || zaN(connectionResult) || this.zaa.zaE(connectionResult, this.zah)) {
|
||||
return;
|
||||
}
|
||||
if (connectionResult.getErrorCode() == 18) {
|
||||
this.zaj = true;
|
||||
}
|
||||
if (!this.zaj) {
|
||||
zaE(GoogleApiManager.zaF(this.zad, connectionResult));
|
||||
return;
|
||||
}
|
||||
GoogleApiManager googleApiManager2 = this.zaa;
|
||||
googleApiManager2.zar.sendMessageDelayed(Message.obtain(googleApiManager2.zar, 9, this.zad), 5000L);
|
||||
}
|
||||
|
||||
public final void zas(ConnectionResult connectionResult) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
Api.Client client = this.zac;
|
||||
client.disconnect("onSignInFailed for " + client.getClass().getName() + " with " + String.valueOf(connectionResult));
|
||||
zar(connectionResult, null);
|
||||
}
|
||||
|
||||
public final void zat(zal zalVar) {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
this.zaf.add(zalVar);
|
||||
}
|
||||
|
||||
public final void zau() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if (this.zaj) {
|
||||
zao();
|
||||
}
|
||||
}
|
||||
|
||||
public final void zav() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
zaE(GoogleApiManager.zaa);
|
||||
this.zae.zaf();
|
||||
for (ListenerHolder.ListenerKey listenerKey : (ListenerHolder.ListenerKey[]) this.zag.keySet().toArray(new ListenerHolder.ListenerKey[0])) {
|
||||
zap(new zah(listenerKey, new TaskCompletionSource()));
|
||||
}
|
||||
zaD(new ConnectionResult(4));
|
||||
if (this.zac.isConnected()) {
|
||||
this.zac.onUserSignOut(new zabp(this));
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaw() {
|
||||
Preconditions.checkHandlerThread(this.zaa.zar);
|
||||
if (this.zaj) {
|
||||
zaL();
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
zaE(googleApiManager.zaj.isGooglePlayServicesAvailable(googleApiManager.zai) == 18 ? new Status(21, "Connection timed out waiting for Google Play services update to complete.") : new Status(22, "API failed to connect while resuming due to an unknown error."));
|
||||
this.zac.disconnect("Timing out connection while resuming.");
|
||||
}
|
||||
}
|
||||
|
||||
final boolean zaz() {
|
||||
return this.zac.isConnected();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabs {
|
||||
private final ApiKey zaa;
|
||||
private final Feature zab;
|
||||
|
||||
/* synthetic */ zabs(ApiKey apiKey, Feature feature, zabr zabrVar) {
|
||||
this.zaa = apiKey;
|
||||
this.zab = feature;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj != null && (obj instanceof zabs)) {
|
||||
zabs zabsVar = (zabs) obj;
|
||||
if (Objects.equal(this.zaa, zabsVar.zaa) && Objects.equal(this.zab, zabsVar.zab)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(this.zaa, this.zab);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return Objects.toStringHelper(this).add("key", this.zaa).add("feature", this.zab).toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.util.Log;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabt implements Runnable {
|
||||
final /* synthetic */ ConnectionResult zaa;
|
||||
final /* synthetic */ zabu zab;
|
||||
|
||||
zabt(zabu zabuVar, ConnectionResult connectionResult) {
|
||||
this.zab = zabuVar;
|
||||
this.zaa = connectionResult;
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
zabu zabuVar = this.zab;
|
||||
zabq zabqVar = (zabq) zabuVar.zaa.zan.get(zabuVar.zac);
|
||||
if (zabqVar == null) {
|
||||
return;
|
||||
}
|
||||
if (!this.zaa.isSuccess()) {
|
||||
zabqVar.zar(this.zaa, null);
|
||||
return;
|
||||
}
|
||||
this.zab.zaf = true;
|
||||
if (this.zab.zab.requiresSignIn()) {
|
||||
this.zab.zah();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
zabu zabuVar2 = this.zab;
|
||||
zabuVar2.zab.getRemoteService(null, zabuVar2.zab.getScopesForConnectionlessNonSignIn());
|
||||
} catch (SecurityException e) {
|
||||
Log.e("GoogleApiManager", "Failed to get service from broker. ", e);
|
||||
this.zab.zab.disconnect("Failed to get service from broker.");
|
||||
zabqVar.zar(new ConnectionResult(10), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
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.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.IAccountAccessor;
|
||||
import java.util.Set;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zabu implements BaseGmsClient.ConnectionProgressReportCallbacks, zacs {
|
||||
final /* synthetic */ GoogleApiManager zaa;
|
||||
private final Api.Client zab;
|
||||
private final ApiKey zac;
|
||||
private IAccountAccessor zad = null;
|
||||
private Set zae = null;
|
||||
private boolean zaf = false;
|
||||
|
||||
public zabu(GoogleApiManager googleApiManager, Api.Client client, ApiKey apiKey) {
|
||||
this.zaa = googleApiManager;
|
||||
this.zab = client;
|
||||
this.zac = apiKey;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void zah() {
|
||||
IAccountAccessor iAccountAccessor;
|
||||
if (!this.zaf || (iAccountAccessor = this.zad) == null) {
|
||||
return;
|
||||
}
|
||||
this.zab.getRemoteService(iAccountAccessor, this.zae);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.internal.BaseGmsClient.ConnectionProgressReportCallbacks
|
||||
public final void onReportServiceBinding(ConnectionResult connectionResult) {
|
||||
this.zaa.zar.post(new zabt(this, connectionResult));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zacs
|
||||
public final void zae(ConnectionResult connectionResult) {
|
||||
zabq zabqVar = (zabq) this.zaa.zan.get(this.zac);
|
||||
if (zabqVar != null) {
|
||||
zabqVar.zas(connectionResult);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zacs
|
||||
public final void zag(int i) {
|
||||
zabq zabqVar = (zabq) this.zaa.zan.get(this.zac);
|
||||
if (zabqVar != null) {
|
||||
if (zabqVar.zaj) {
|
||||
zabqVar.zas(new ConnectionResult(17));
|
||||
} else {
|
||||
zabqVar.onConnectionSuspended(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zacs
|
||||
public final void zaf(IAccountAccessor iAccountAccessor, Set set) {
|
||||
if (iAccountAccessor == null || set == null) {
|
||||
Log.wtf("GoogleApiManager", "Received null response from onSignInSuccess", new Exception());
|
||||
zae(new ConnectionResult(4));
|
||||
} else {
|
||||
this.zad = iAccountAccessor;
|
||||
this.zae = set;
|
||||
zah();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Looper;
|
||||
import com.google.android.gms.common.api.Api;
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
import com.google.android.gms.common.api.Result;
|
||||
import com.google.android.gms.common.api.internal.BaseImplementation;
|
||||
import org.checkerframework.checker.initialization.qual.NotOnlyInitialized;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabv extends zaag {
|
||||
|
||||
@NotOnlyInitialized
|
||||
private final GoogleApi zaa;
|
||||
|
||||
public zabv(GoogleApi googleApi) {
|
||||
super("Method is not supported by connectionless client. APIs supporting connectionless client must not call this method.");
|
||||
this.zaa = googleApi;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final <A extends Api.AnyClient, R extends Result, T extends BaseImplementation.ApiMethodImpl<R, A>> T enqueue(T t) {
|
||||
return (T) this.zaa.doRead(t);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final <A extends Api.AnyClient, T extends BaseImplementation.ApiMethodImpl<? extends Result, A>> T execute(T t) {
|
||||
return (T) this.zaa.doWrite(t);
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final Context getContext() {
|
||||
return this.zaa.getApplicationContext();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final Looper getLooper() {
|
||||
return this.zaa.getLooper();
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void zao(zada zadaVar) {
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.GoogleApiClient
|
||||
public final void zap(zada zadaVar) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class zabw {
|
||||
public abstract void zaa();
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zabx extends BroadcastReceiver {
|
||||
Context zaa;
|
||||
private final zabw zab;
|
||||
|
||||
public zabx(zabw zabwVar) {
|
||||
this.zab = zabwVar;
|
||||
}
|
||||
|
||||
@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.zab.zaa();
|
||||
zab();
|
||||
}
|
||||
}
|
||||
|
||||
public final void zaa(Context context) {
|
||||
this.zaa = context;
|
||||
}
|
||||
|
||||
public final synchronized void zab() {
|
||||
Context context = this.zaa;
|
||||
if (context != null) {
|
||||
context.unregisterReceiver(this);
|
||||
}
|
||||
this.zaa = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaby extends com.google.android.gms.internal.base.zaa implements IStatusCallback {
|
||||
zaby(IBinder iBinder) {
|
||||
super(iBinder, "com.google.android.gms.common.api.internal.IStatusCallback");
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.IStatusCallback
|
||||
public final void onResult(Status status) throws RemoteException {
|
||||
throw null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.Bundle;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface zabz {
|
||||
void zaa(ConnectionResult connectionResult);
|
||||
|
||||
void zab(Bundle bundle);
|
||||
|
||||
void zac(int i, boolean z);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.Feature;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public abstract class zac extends zai {
|
||||
public zac(int i) {
|
||||
super(i);
|
||||
}
|
||||
|
||||
public abstract boolean zaa(zabq zabqVar);
|
||||
|
||||
public abstract Feature[] zab(zabq zabqVar);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
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.BaseImplementation;
|
||||
import java.io.FileDescriptor;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public interface zaca {
|
||||
ConnectionResult zab();
|
||||
|
||||
ConnectionResult zac(long j, TimeUnit timeUnit);
|
||||
|
||||
ConnectionResult zad(Api api);
|
||||
|
||||
BaseImplementation.ApiMethodImpl zae(BaseImplementation.ApiMethodImpl apiMethodImpl);
|
||||
|
||||
BaseImplementation.ApiMethodImpl zaf(BaseImplementation.ApiMethodImpl apiMethodImpl);
|
||||
|
||||
void zaq();
|
||||
|
||||
void zar();
|
||||
|
||||
void zas(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr);
|
||||
|
||||
void zat();
|
||||
|
||||
void zau();
|
||||
|
||||
boolean zaw();
|
||||
|
||||
boolean zax();
|
||||
|
||||
boolean zay(SignInConnectionListener signInConnectionListener);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.app.Activity;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.GoogleApiAvailability;
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
import java.util.concurrent.CancellationException;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zacc extends zap {
|
||||
private TaskCompletionSource zad;
|
||||
|
||||
private zacc(LifecycleFragment lifecycleFragment) {
|
||||
super(lifecycleFragment, GoogleApiAvailability.getInstance());
|
||||
this.zad = new TaskCompletionSource();
|
||||
this.mLifecycleFragment.addCallback("GmsAvailabilityHelper", this);
|
||||
}
|
||||
|
||||
public static zacc zaa(Activity activity) {
|
||||
LifecycleFragment fragment = getFragment(activity);
|
||||
zacc zaccVar = (zacc) fragment.getCallbackOrNull("GmsAvailabilityHelper", zacc.class);
|
||||
if (zaccVar == null) {
|
||||
return new zacc(fragment);
|
||||
}
|
||||
if (zaccVar.zad.getTask().isComplete()) {
|
||||
zaccVar.zad = new TaskCompletionSource();
|
||||
}
|
||||
return zaccVar;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
|
||||
public final void onDestroy() {
|
||||
super.onDestroy();
|
||||
this.zad.trySetException(new CancellationException("Host activity was destroyed before Google Play services could be made available."));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
protected final void zab(ConnectionResult connectionResult, int i) {
|
||||
String errorMessage = connectionResult.getErrorMessage();
|
||||
if (errorMessage == null) {
|
||||
errorMessage = "Error connecting to Google Play services";
|
||||
}
|
||||
this.zad.setException(new ApiException(new Status(connectionResult, errorMessage, connectionResult.getErrorCode())));
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.zap
|
||||
protected final void zac() {
|
||||
Activity lifecycleActivity = this.mLifecycleFragment.getLifecycleActivity();
|
||||
if (lifecycleActivity == null) {
|
||||
this.zad.trySetException(new ApiException(new Status(8)));
|
||||
return;
|
||||
}
|
||||
int iIsGooglePlayServicesAvailable = this.zac.isGooglePlayServicesAvailable(lifecycleActivity);
|
||||
if (iIsGooglePlayServicesAvailable == 0) {
|
||||
this.zad.trySetResult(null);
|
||||
} else {
|
||||
if (this.zad.getTask().isComplete()) {
|
||||
return;
|
||||
}
|
||||
zah(new ConnectionResult(iIsGooglePlayServicesAvailable, null), 0);
|
||||
}
|
||||
}
|
||||
|
||||
public final Task zad() {
|
||||
return this.zad.getTask();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import android.os.SystemClock;
|
||||
import com.google.android.gms.common.ConnectionResult;
|
||||
import com.google.android.gms.common.api.ApiException;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.BaseGmsClient;
|
||||
import com.google.android.gms.common.internal.ConnectionTelemetryConfiguration;
|
||||
import com.google.android.gms.common.internal.MethodInvocation;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfigManager;
|
||||
import com.google.android.gms.common.internal.RootTelemetryConfiguration;
|
||||
import com.google.android.gms.common.util.ArrayUtils;
|
||||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zacd implements OnCompleteListener {
|
||||
private final GoogleApiManager zaa;
|
||||
private final int zab;
|
||||
private final ApiKey zac;
|
||||
private final long zad;
|
||||
private final long zae;
|
||||
|
||||
zacd(GoogleApiManager googleApiManager, int i, ApiKey apiKey, long j, long j2, String str, String str2) {
|
||||
this.zaa = googleApiManager;
|
||||
this.zab = i;
|
||||
this.zac = apiKey;
|
||||
this.zad = j;
|
||||
this.zae = j2;
|
||||
}
|
||||
|
||||
static zacd zaa(GoogleApiManager googleApiManager, int i, ApiKey apiKey) {
|
||||
boolean methodTimingTelemetryEnabled;
|
||||
if (!googleApiManager.zaD()) {
|
||||
return null;
|
||||
}
|
||||
RootTelemetryConfiguration config = RootTelemetryConfigManager.getInstance().getConfig();
|
||||
if (config == null) {
|
||||
methodTimingTelemetryEnabled = true;
|
||||
} else {
|
||||
if (!config.getMethodInvocationTelemetryEnabled()) {
|
||||
return null;
|
||||
}
|
||||
methodTimingTelemetryEnabled = config.getMethodTimingTelemetryEnabled();
|
||||
zabq zabqVarZai = googleApiManager.zai(apiKey);
|
||||
if (zabqVarZai != null) {
|
||||
if (!(zabqVarZai.zaf() instanceof BaseGmsClient)) {
|
||||
return null;
|
||||
}
|
||||
BaseGmsClient baseGmsClient = (BaseGmsClient) zabqVarZai.zaf();
|
||||
if (baseGmsClient.hasConnectionInfo() && !baseGmsClient.isConnecting()) {
|
||||
ConnectionTelemetryConfiguration connectionTelemetryConfigurationZab = zab(zabqVarZai, baseGmsClient, i);
|
||||
if (connectionTelemetryConfigurationZab == null) {
|
||||
return null;
|
||||
}
|
||||
zabqVarZai.zaq();
|
||||
methodTimingTelemetryEnabled = connectionTelemetryConfigurationZab.getMethodTimingTelemetryEnabled();
|
||||
}
|
||||
}
|
||||
}
|
||||
return new zacd(googleApiManager, i, apiKey, methodTimingTelemetryEnabled ? System.currentTimeMillis() : 0L, methodTimingTelemetryEnabled ? SystemClock.elapsedRealtime() : 0L, null, null);
|
||||
}
|
||||
|
||||
private static ConnectionTelemetryConfiguration zab(zabq zabqVar, BaseGmsClient baseGmsClient, int i) {
|
||||
int[] methodInvocationMethodKeyAllowlist;
|
||||
int[] methodInvocationMethodKeyDisallowlist;
|
||||
ConnectionTelemetryConfiguration telemetryConfiguration = baseGmsClient.getTelemetryConfiguration();
|
||||
if (telemetryConfiguration == null || !telemetryConfiguration.getMethodInvocationTelemetryEnabled() || ((methodInvocationMethodKeyAllowlist = telemetryConfiguration.getMethodInvocationMethodKeyAllowlist()) != null ? !ArrayUtils.contains(methodInvocationMethodKeyAllowlist, i) : !((methodInvocationMethodKeyDisallowlist = telemetryConfiguration.getMethodInvocationMethodKeyDisallowlist()) == null || !ArrayUtils.contains(methodInvocationMethodKeyDisallowlist, i))) || zabqVar.zac() >= telemetryConfiguration.getMaxMethodInvocationsLogged()) {
|
||||
return null;
|
||||
}
|
||||
return telemetryConfiguration;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.tasks.OnCompleteListener
|
||||
public final void onComplete(Task task) {
|
||||
zabq zabqVarZai;
|
||||
int version;
|
||||
int i;
|
||||
int i2;
|
||||
int errorCode;
|
||||
long j;
|
||||
long j2;
|
||||
int iElapsedRealtime;
|
||||
if (this.zaa.zaD()) {
|
||||
RootTelemetryConfiguration config = RootTelemetryConfigManager.getInstance().getConfig();
|
||||
if ((config == null || config.getMethodInvocationTelemetryEnabled()) && (zabqVarZai = this.zaa.zai(this.zac)) != null && (zabqVarZai.zaf() instanceof BaseGmsClient)) {
|
||||
BaseGmsClient baseGmsClient = (BaseGmsClient) zabqVarZai.zaf();
|
||||
int i3 = 0;
|
||||
boolean methodTimingTelemetryEnabled = this.zad > 0;
|
||||
int gCoreServiceId = baseGmsClient.getGCoreServiceId();
|
||||
int statusCode = 100;
|
||||
if (config != null) {
|
||||
methodTimingTelemetryEnabled &= config.getMethodTimingTelemetryEnabled();
|
||||
int batchPeriodMillis = config.getBatchPeriodMillis();
|
||||
int maxMethodInvocationsInBatch = config.getMaxMethodInvocationsInBatch();
|
||||
version = config.getVersion();
|
||||
if (baseGmsClient.hasConnectionInfo() && !baseGmsClient.isConnecting()) {
|
||||
ConnectionTelemetryConfiguration connectionTelemetryConfigurationZab = zab(zabqVarZai, baseGmsClient, this.zab);
|
||||
if (connectionTelemetryConfigurationZab == null) {
|
||||
return;
|
||||
}
|
||||
boolean z = connectionTelemetryConfigurationZab.getMethodTimingTelemetryEnabled() && this.zad > 0;
|
||||
maxMethodInvocationsInBatch = connectionTelemetryConfigurationZab.getMaxMethodInvocationsLogged();
|
||||
methodTimingTelemetryEnabled = z;
|
||||
}
|
||||
i2 = batchPeriodMillis;
|
||||
i = maxMethodInvocationsInBatch;
|
||||
} else {
|
||||
version = 0;
|
||||
i = 100;
|
||||
i2 = 5000;
|
||||
}
|
||||
GoogleApiManager googleApiManager = this.zaa;
|
||||
if (task.isSuccessful()) {
|
||||
errorCode = 0;
|
||||
} else if (task.isCanceled()) {
|
||||
i3 = statusCode;
|
||||
errorCode = -1;
|
||||
} else {
|
||||
Exception exception = task.getException();
|
||||
if (exception instanceof ApiException) {
|
||||
Status status = ((ApiException) exception).getStatus();
|
||||
statusCode = status.getStatusCode();
|
||||
ConnectionResult connectionResult = status.getConnectionResult();
|
||||
if (connectionResult != null) {
|
||||
errorCode = connectionResult.getErrorCode();
|
||||
i3 = statusCode;
|
||||
}
|
||||
i3 = statusCode;
|
||||
errorCode = -1;
|
||||
} else {
|
||||
i3 = 101;
|
||||
errorCode = -1;
|
||||
}
|
||||
}
|
||||
if (methodTimingTelemetryEnabled) {
|
||||
long j3 = this.zad;
|
||||
long j4 = this.zae;
|
||||
long jCurrentTimeMillis = System.currentTimeMillis();
|
||||
iElapsedRealtime = (int) (SystemClock.elapsedRealtime() - j4);
|
||||
j2 = jCurrentTimeMillis;
|
||||
j = j3;
|
||||
} else {
|
||||
j = 0;
|
||||
j2 = 0;
|
||||
iElapsedRealtime = -1;
|
||||
}
|
||||
googleApiManager.zaw(new MethodInvocation(this.zab, i3, errorCode, j, j2, null, null, gCoreServiceId, iElapsedRealtime), version, i2, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.internal.MethodInvocation;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zace {
|
||||
final MethodInvocation zaa;
|
||||
final int zab;
|
||||
final long zac;
|
||||
final int zad;
|
||||
|
||||
zace(MethodInvocation methodInvocation, int i, long j, int i2) {
|
||||
this.zaa = methodInvocation;
|
||||
this.zab = i;
|
||||
this.zac = j;
|
||||
this.zad = i2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
import com.google.android.gms.common.api.GoogleApi;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zach {
|
||||
public final zai zaa;
|
||||
public final int zab;
|
||||
public final GoogleApi zac;
|
||||
|
||||
public zach(zai zaiVar, int i, GoogleApi googleApi) {
|
||||
this.zaa = zaiVar;
|
||||
this.zab = i;
|
||||
this.zac = googleApi;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final class zaci {
|
||||
public final RegisterListenerMethod zaa;
|
||||
public final UnregisterListenerMethod zab;
|
||||
public final Runnable zac;
|
||||
|
||||
public zaci(RegisterListenerMethod registerListenerMethod, UnregisterListenerMethod unregisterListenerMethod, Runnable runnable) {
|
||||
this.zaa = registerListenerMethod;
|
||||
this.zab = unregisterListenerMethod;
|
||||
this.zac = runnable;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.google.android.gms.common.api.internal;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
public final /* synthetic */ class zacj implements Runnable {
|
||||
public static final /* synthetic */ zacj zaa = new zacj();
|
||||
|
||||
private /* synthetic */ zacj() {
|
||||
}
|
||||
|
||||
@Override // java.lang.Runnable
|
||||
public final void run() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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.internal.RegistrationMethods;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zack extends RegisterListenerMethod {
|
||||
final /* synthetic */ RegistrationMethods.Builder zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zack(RegistrationMethods.Builder builder, ListenerHolder listenerHolder, Feature[] featureArr, boolean z, int i) {
|
||||
super(listenerHolder, featureArr, z, i);
|
||||
this.zaa = builder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.RegisterListenerMethod
|
||||
protected final void registerListener(Api.AnyClient anyClient, TaskCompletionSource<Void> taskCompletionSource) throws RemoteException {
|
||||
this.zaa.zaa.accept(anyClient, taskCompletionSource);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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.internal.ListenerHolder;
|
||||
import com.google.android.gms.common.api.internal.RegistrationMethods;
|
||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||
|
||||
/* JADX INFO: compiled from: com.google.android.gms:play-services-base@@18.4.0 */
|
||||
/* JADX INFO: loaded from: classes2.dex */
|
||||
final class zacl extends UnregisterListenerMethod {
|
||||
final /* synthetic */ RegistrationMethods.Builder zaa;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
zacl(RegistrationMethods.Builder builder, ListenerHolder.ListenerKey listenerKey) {
|
||||
super(listenerKey);
|
||||
this.zaa = builder;
|
||||
}
|
||||
|
||||
@Override // com.google.android.gms.common.api.internal.UnregisterListenerMethod
|
||||
protected final void unregisterListener(Api.AnyClient anyClient, TaskCompletionSource<Boolean> taskCompletionSource) throws RemoteException {
|
||||
this.zaa.zab.accept(anyClient, taskCompletionSource);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user