what-the-bank/sources/com/google/android/gms/tasks/DuplicateTaskCompletionExce...

25 lines
947 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.tasks;
/* loaded from: classes.dex */
public final class DuplicateTaskCompletionException extends IllegalStateException {
private DuplicateTaskCompletionException(String str, Throwable th) {
super(str, th);
}
public static IllegalStateException of(Task<?> task) {
String str;
if (!task.isComplete()) {
return new IllegalStateException("DuplicateTaskCompletionException can only be created from completed Task.");
}
Exception exception = task.getException();
if (exception != null) {
str = "failure";
} else if (task.isSuccessful()) {
str = "result ".concat(String.valueOf(String.valueOf(task.getResult())));
} else {
str = task.isCanceled() ? "cancellation" : "unknown issue";
}
return new DuplicateTaskCompletionException("Complete with: ".concat(str), exception);
}
}