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

59 lines
2.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common.api.internal;
import android.os.DeadObjectException;
import android.util.Log;
import com.google.android.gms.common.api.Api;
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.api.internal.BaseImplementation.ApiMethodImpl;
import com.google.android.gms.common.internal.Preconditions;
/* loaded from: classes.dex */
public final class zae<A extends BaseImplementation.ApiMethodImpl<? extends Result, Api.AnyClient>> extends zai {
protected final A zaa;
public zae(int i, A a) {
super(i);
this.zaa = (A) Preconditions.checkNotNull(a, "Null methods are not runnable.");
}
@Override // com.google.android.gms.common.api.internal.zai
public final void zad(Status status) {
try {
this.zaa.setFailedResult(status);
} catch (IllegalStateException e) {
Log.w("ApiCallRunner", "Exception reporting failure", e);
}
}
@Override // com.google.android.gms.common.api.internal.zai
public final void zaf(zabq<?> zabqVar) throws DeadObjectException {
try {
this.zaa.run(zabqVar.zaf());
} catch (RuntimeException e) {
zae(e);
}
}
@Override // com.google.android.gms.common.api.internal.zai
public final void zag(zaad zaadVar, boolean z) {
zaadVar.zac(this.zaa, z);
}
@Override // com.google.android.gms.common.api.internal.zai
public final void zae(Exception exc) {
String simpleName = exc.getClass().getSimpleName();
String localizedMessage = exc.getLocalizedMessage();
StringBuilder sb = new StringBuilder(String.valueOf(simpleName).length() + 2 + String.valueOf(localizedMessage).length());
sb.append(simpleName);
sb.append(": ");
sb.append(localizedMessage);
try {
this.zaa.setFailedResult(new Status(10, sb.toString()));
} catch (IllegalStateException e) {
Log.w("ApiCallRunner", "Exception reporting failure", e);
}
}
}