what-the-bank/sources/com/google/android/gms/common/api/ResolvingResultCallbacks.java

38 lines
1.2 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common.api;
import android.app.Activity;
import android.content.IntentSender;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.internal.Preconditions;
/* loaded from: classes.dex */
public abstract class ResolvingResultCallbacks<R extends Result> extends ResultCallbacks<R> {
private final Activity zza;
private final int zzb;
protected ResolvingResultCallbacks(Activity activity, int i) {
Preconditions.checkNotNull(activity, "Activity must not be null");
this.zza = activity;
this.zzb = i;
}
@Override // com.google.android.gms.common.api.ResultCallbacks
public final void onFailure(Status status) {
if (status.hasResolution()) {
try {
status.startResolutionForResult(this.zza, this.zzb);
return;
} catch (IntentSender.SendIntentException unused) {
onUnresolvableFailure(new Status(8));
return;
}
}
onUnresolvableFailure(status);
}
@Override // com.google.android.gms.common.api.ResultCallbacks
public abstract void onSuccess(R r);
public abstract void onUnresolvableFailure(Status status);
}