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

35 lines
1.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common.api.internal;
import com.google.android.gms.common.api.Releasable;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
/* loaded from: classes.dex */
public abstract class DataHolderResult implements Result, Releasable {
protected final DataHolder mDataHolder;
protected final Status mStatus;
protected DataHolderResult(DataHolder dataHolder) {
this(dataHolder, new Status(dataHolder.getStatusCode()));
}
@Override // com.google.android.gms.common.api.Releasable
public void release() {
DataHolder dataHolder = this.mDataHolder;
if (dataHolder != null) {
dataHolder.close();
}
}
@Override // com.google.android.gms.common.api.Result
public Status getStatus() {
return this.mStatus;
}
protected DataHolderResult(DataHolder dataHolder, Status status) {
this.mStatus = status;
this.mDataHolder = dataHolder;
}
}