65 lines
2.0 KiB
Java
65 lines
2.0 KiB
Java
package c.d.a.a;
|
|
|
|
import android.content.ComponentName;
|
|
import android.content.ServiceConnection;
|
|
import android.os.IBinder;
|
|
import android.os.IInterface;
|
|
import c.i.a.f.h.n.a;
|
|
import c.i.a.f.h.n.b;
|
|
import c.i.a.f.h.n.c;
|
|
import c.i.a.f.h.n.d;
|
|
import com.android.billingclient.api.BillingResult;
|
|
/* compiled from: com.android.billingclient:billing@@4.0.0 */
|
|
public final class n implements ServiceConnection {
|
|
public final Object i = new Object();
|
|
public boolean j = false;
|
|
public b k;
|
|
public final /* synthetic */ a l;
|
|
|
|
public /* synthetic */ n(a aVar, b bVar) {
|
|
this.l = aVar;
|
|
this.k = bVar;
|
|
}
|
|
|
|
public final void a(BillingResult billingResult) {
|
|
synchronized (this.i) {
|
|
b bVar = this.k;
|
|
if (bVar != null) {
|
|
bVar.onBillingSetupFinished(billingResult);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.content.ServiceConnection
|
|
public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
|
d dVar;
|
|
a.e("BillingClient", "Billing service connected.");
|
|
a aVar = this.l;
|
|
int i = c.a;
|
|
if (iBinder == null) {
|
|
dVar = null;
|
|
} else {
|
|
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.android.vending.billing.IInAppBillingService");
|
|
dVar = queryLocalInterface instanceof d ? (d) queryLocalInterface : new b(iBinder);
|
|
}
|
|
aVar.f = dVar;
|
|
a aVar2 = this.l;
|
|
if (aVar2.l(new m(this), 30000, new l(this), aVar2.i()) == null) {
|
|
a(this.l.k());
|
|
}
|
|
}
|
|
|
|
@Override // android.content.ServiceConnection
|
|
public final void onServiceDisconnected(ComponentName componentName) {
|
|
a.f("BillingClient", "Billing service disconnected.");
|
|
this.l.f = null;
|
|
this.l.a = 0;
|
|
synchronized (this.i) {
|
|
b bVar = this.k;
|
|
if (bVar != null) {
|
|
bVar.onBillingServiceDisconnected();
|
|
}
|
|
}
|
|
}
|
|
}
|