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

27 lines
747 B
Java

package com.google.android.gms.common.api;
import com.google.android.gms.common.api.Result;
/* loaded from: classes.dex */
public abstract class ResultCallbacks<R extends Result> implements ResultCallback<R> {
public abstract void onFailure(Status status);
@Override // com.google.android.gms.common.api.ResultCallback
public final void onResult(R r) {
Status status = r.getStatus();
if (status.isSuccess()) {
onSuccess(r);
return;
}
onFailure(status);
if (r instanceof Releasable) {
try {
((Releasable) r).release();
} catch (RuntimeException unused) {
}
}
}
public abstract void onSuccess(R r);
}