- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
41 lines
1.5 KiB
Java
41 lines
1.5 KiB
Java
package com.google.android.gms.games.internal;
|
|
|
|
import com.google.android.gms.common.data.DataHolder;
|
|
import com.google.android.gms.games.AnnotatedData;
|
|
import com.google.android.gms.games.GamesStatusUtils;
|
|
import com.google.android.gms.games.stats.PlayerStatsBuffer;
|
|
import com.google.android.gms.games.stats.PlayerStatsEntity;
|
|
import com.google.android.gms.tasks.TaskCompletionSource;
|
|
|
|
/* loaded from: classes2.dex */
|
|
final class zzad extends zza {
|
|
private final TaskCompletionSource zza;
|
|
|
|
public zzad(TaskCompletionSource taskCompletionSource) {
|
|
this.zza = taskCompletionSource;
|
|
}
|
|
|
|
@Override // com.google.android.gms.games.internal.zza, com.google.android.gms.games.internal.zzal
|
|
public final void zzi(DataHolder dataHolder) {
|
|
int statusCode = dataHolder.getStatusCode();
|
|
if (statusCode != 0 && statusCode != 3) {
|
|
GamesStatusUtils.zza(this.zza, statusCode);
|
|
dataHolder.close();
|
|
return;
|
|
}
|
|
PlayerStatsBuffer playerStatsBuffer = new PlayerStatsBuffer(dataHolder);
|
|
try {
|
|
PlayerStatsEntity playerStatsEntity = playerStatsBuffer.getCount() > 0 ? new PlayerStatsEntity(playerStatsBuffer.get(0)) : null;
|
|
playerStatsBuffer.close();
|
|
this.zza.setResult(new AnnotatedData(playerStatsEntity, statusCode == 3));
|
|
} catch (Throwable th) {
|
|
try {
|
|
playerStatsBuffer.close();
|
|
} catch (Throwable th2) {
|
|
th.addSuppressed(th2);
|
|
}
|
|
throw th;
|
|
}
|
|
}
|
|
}
|