74 lines
2.6 KiB
Java
74 lines
2.6 KiB
Java
package c.d.a.a;
|
|
|
|
import android.os.Bundle;
|
|
import c.i.a.f.h.n.a;
|
|
import c.i.a.f.h.n.d;
|
|
import com.android.billingclient.api.BillingResult;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.Callable;
|
|
/* compiled from: com.android.billingclient:billing@@4.0.0 */
|
|
public final /* synthetic */ class t implements Callable {
|
|
public final /* synthetic */ a i;
|
|
public final /* synthetic */ d j;
|
|
public final /* synthetic */ e k;
|
|
|
|
public /* synthetic */ t(a aVar, d dVar, e eVar) {
|
|
this.i = aVar;
|
|
this.j = dVar;
|
|
this.k = eVar;
|
|
}
|
|
|
|
@Override // java.util.concurrent.Callable
|
|
public final Object call() {
|
|
int i;
|
|
String str;
|
|
a aVar = this.i;
|
|
d dVar = this.j;
|
|
e eVar = this.k;
|
|
Objects.requireNonNull(aVar);
|
|
String str2 = dVar.a;
|
|
try {
|
|
String valueOf = String.valueOf(str2);
|
|
a.e("BillingClient", valueOf.length() != 0 ? "Consuming purchase with token: ".concat(valueOf) : new String("Consuming purchase with token: "));
|
|
if (aVar.k) {
|
|
d dVar2 = aVar.f;
|
|
String packageName = aVar.e.getPackageName();
|
|
boolean z2 = aVar.k;
|
|
String str3 = aVar.b;
|
|
Bundle bundle = new Bundle();
|
|
if (z2) {
|
|
bundle.putString("playBillingLibraryVersion", str3);
|
|
}
|
|
Bundle q = dVar2.q(9, packageName, str2, bundle);
|
|
i = q.getInt("RESPONSE_CODE");
|
|
str = a.d(q, "BillingClient");
|
|
} else {
|
|
i = aVar.f.p(3, aVar.e.getPackageName(), str2);
|
|
str = "";
|
|
}
|
|
BillingResult billingResult = new BillingResult();
|
|
billingResult.a = i;
|
|
billingResult.b = str;
|
|
if (i == 0) {
|
|
a.e("BillingClient", "Successfully consumed purchase.");
|
|
eVar.onConsumeResponse(billingResult, str2);
|
|
return null;
|
|
}
|
|
StringBuilder sb = new StringBuilder(63);
|
|
sb.append("Error consuming purchase with token. Response code: ");
|
|
sb.append(i);
|
|
a.f("BillingClient", sb.toString());
|
|
eVar.onConsumeResponse(billingResult, str2);
|
|
return null;
|
|
} catch (Exception e) {
|
|
String valueOf2 = String.valueOf(e);
|
|
StringBuilder sb2 = new StringBuilder(valueOf2.length() + 30);
|
|
sb2.append("Error consuming purchase; ex: ");
|
|
sb2.append(valueOf2);
|
|
a.f("BillingClient", sb2.toString());
|
|
eVar.onConsumeResponse(p.j, str2);
|
|
return null;
|
|
}
|
|
}
|
|
}
|