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.Task; import com.google.android.gms.tasks.TaskCompletionSource; /* loaded from: classes.dex */ public class TaskUtil { public static void setResultOrApiException(Status status, TaskCompletionSource taskCompletionSource) { setResultOrApiException(status, null, taskCompletionSource); } @Deprecated public static Task toVoidTaskThatFailsOnFalse(Task task) { return task.continueWith(new zacx()); } public static boolean trySetResultOrApiException(Status status, ResultT resultt, TaskCompletionSource taskCompletionSource) { if (status.isSuccess()) { return taskCompletionSource.trySetResult(resultt); } return taskCompletionSource.trySetException(new ApiException(status)); } public static void setResultOrApiException(Status status, TResult tresult, TaskCompletionSource taskCompletionSource) { if (status.isSuccess()) { taskCompletionSource.setResult(tresult); } else { taskCompletionSource.setException(new ApiException(status)); } } }