Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
package com.unity3d.services.store.gpbl;
import androidx.annotation.NonNull;
/* loaded from: classes4.dex */
public enum BillingResultResponseCode {
UNKNOWN(-100),
SERVICE_TIMEOUT(-3),
FEATURE_NOT_SUPPORTED(-2),
SERVICE_DISCONNECTED(-1),
OK(0),
USER_CANCELED(1),
SERVICE_UNAVAILABLE(2),
BILLING_UNAVAILABLE(3),
ITEM_UNAVAILABLE(4),
DEVELOPER_ERROR(5),
ERROR(6),
ITEM_ALREADY_OWNED(7),
ITEM_NOT_OWNED(8),
NETWORK_ERROR(12);
private final int _responseCode;
public int getResponseCode() {
return this._responseCode;
}
BillingResultResponseCode(int i) {
this._responseCode = i;
}
@NonNull
public static BillingResultResponseCode fromResponseCode(int i) {
for (BillingResultResponseCode billingResultResponseCode : values()) {
if (billingResultResponseCode.getResponseCode() == i) {
return billingResultResponseCode;
}
}
return UNKNOWN;
}
}

View File

@@ -0,0 +1,8 @@
package com.unity3d.services.store.gpbl;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public interface IBillingResponse {
JSONObject getOriginalJson();
}

View File

@@ -0,0 +1,80 @@
package com.unity3d.services.store.gpbl;
import android.content.Context;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge;
import com.unity3d.services.store.gpbl.bridges.billingclient.BillingClientBuilderFactory;
import com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient;
import com.unity3d.services.store.gpbl.listeners.BillingClientStateListener;
import com.unity3d.services.store.gpbl.listeners.PurchaseHistoryResponseListener;
import com.unity3d.services.store.gpbl.listeners.PurchaseUpdatedResponseListener;
import com.unity3d.services.store.gpbl.listeners.PurchasesResponseListener;
import com.unity3d.services.store.gpbl.listeners.SkuDetailsResponseListener;
import com.unity3d.services.store.gpbl.proxies.BillingClientStateListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchaseHistoryResponseListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchaseUpdatedListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchasesResponseListenerProxy;
import com.unity3d.services.store.gpbl.proxies.SkuDetailsResponseListenerProxy;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
/* loaded from: classes4.dex */
public class StoreBilling {
private final IBillingClient _billingClientBridge;
public StoreBilling(Context context, PurchaseUpdatedResponseListener purchaseUpdatedResponseListener) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
this._billingClientBridge = BillingClientBuilderFactory.getBillingClientBuilder(context).setListener(new PurchaseUpdatedListenerProxy(purchaseUpdatedResponseListener)).enablePendingPurchases().build();
}
public void initialize(BillingClientStateListener billingClientStateListener) throws ClassNotFoundException {
this._billingClientBridge.startConnection(new BillingClientStateListenerProxy(billingClientStateListener));
}
/* JADX WARN: Removed duplicated region for block: B:5:0x0027 A[ORIG_RETURN, RETURN] */
/* JADX WARN: Removed duplicated region for block: B:7:0x0025 A[RETURN, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public int isFeatureSupported(java.lang.String r2) {
/*
r1 = this;
java.lang.String r0 = "inapp"
boolean r0 = r2.equals(r0)
if (r0 == 0) goto L11
com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient r2 = r1._billingClientBridge
boolean r2 = r2.isReady()
if (r2 == 0) goto L27
goto L25
L11:
java.lang.String r0 = "subs"
boolean r0 = r2.equals(r0)
if (r0 == 0) goto L1b
java.lang.String r2 = "subscriptions"
L1b:
com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient r0 = r1._billingClientBridge
com.unity3d.services.store.gpbl.BillingResultResponseCode r2 = r0.isFeatureSupported(r2)
com.unity3d.services.store.gpbl.BillingResultResponseCode r0 = com.unity3d.services.store.gpbl.BillingResultResponseCode.OK
if (r2 != r0) goto L27
L25:
r2 = 0
goto L28
L27:
r2 = -1
L28:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.unity3d.services.store.gpbl.StoreBilling.isFeatureSupported(java.lang.String):int");
}
public void getPurchases(String str, PurchasesResponseListener purchasesResponseListener) throws ClassNotFoundException {
this._billingClientBridge.queryPurchasesAsync(str, new PurchasesResponseListenerProxy(purchasesResponseListener));
}
public void getSkuDetails(String str, List<String> list, SkuDetailsResponseListener skuDetailsResponseListener) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
this._billingClientBridge.querySkuDetailsAsync(SkuDetailsParamsBridge.newBuilder().setSkuList(list).setType(str).build(), new SkuDetailsResponseListenerProxy(skuDetailsResponseListener));
}
public void getPurchaseHistory(String str, int i, PurchaseHistoryResponseListener purchaseHistoryResponseListener) throws ClassNotFoundException {
this._billingClientBridge.queryPurchaseHistoryAsync(str, new PurchaseHistoryResponseListenerProxy(purchaseHistoryResponseListener, i));
}
}

View File

@@ -0,0 +1,31 @@
package com.unity3d.services.store.gpbl.bridges;
import androidx.annotation.NonNull;
import com.unity3d.services.core.reflection.GenericBridge;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import java.util.HashMap;
/* loaded from: classes4.dex */
public class BillingResultBridge extends GenericBridge {
private static final String getResponseCodeMethodName = "getResponseCode";
private final Object _billingResult;
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.BillingResult";
}
public BillingResultBridge(Object obj) {
super(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.BillingResultBridge.1
{
put(BillingResultBridge.getResponseCodeMethodName, new Class[0]);
}
});
this._billingResult = obj;
}
@NonNull
public BillingResultResponseCode getResponseCode() {
return BillingResultResponseCode.fromResponseCode(((Integer) callNonVoidMethod(getResponseCodeMethodName, this._billingResult, new Object[0])).intValue());
}
}

View File

@@ -0,0 +1,49 @@
package com.unity3d.services.store.gpbl.bridges;
import com.unity3d.services.core.log.DeviceLog;
import com.unity3d.services.core.reflection.GenericBridge;
import com.unity3d.services.store.JsonSerializable;
import com.unity3d.services.store.gpbl.IBillingResponse;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public abstract class CommonJsonResponseBridge extends GenericBridge implements IBillingResponse, JsonSerializable {
private static final String getOriginalJsonMethodName = "getOriginalJson";
private final Object _internalBridgeRef;
public CommonJsonResponseBridge(Object obj) {
this(obj, new HashMap());
}
public CommonJsonResponseBridge(Object obj, Map<String, Class<?>[]> map) {
super(appendCommonResponseMethods(map));
this._internalBridgeRef = obj;
}
private static Map<String, Class<?>[]> appendCommonResponseMethods(Map<String, Class<?>[]> map) {
map.putAll(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.CommonJsonResponseBridge.1
{
put(CommonJsonResponseBridge.getOriginalJsonMethodName, new Class[0]);
}
});
return map;
}
@Override // com.unity3d.services.store.gpbl.IBillingResponse
public JSONObject getOriginalJson() {
try {
return new JSONObject((String) callNonVoidMethod(getOriginalJsonMethodName, this._internalBridgeRef, new Object[0]));
} catch (JSONException e) {
DeviceLog.error("Couldn't parse BillingResponse JSON : %s", e.getMessage());
return null;
}
}
@Override // com.unity3d.services.store.JsonSerializable
public JSONObject toJson() {
return getOriginalJson();
}
}

View File

@@ -0,0 +1,43 @@
package com.unity3d.services.store.gpbl.bridges;
import com.unity3d.ads.metadata.InAppPurchaseMetaData;
import com.unity3d.services.core.log.DeviceLog;
import java.util.HashMap;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class PurchaseBridge extends CommonJsonResponseBridge {
private static final String getSignatureMethodName = "getSignature";
private final Object _purchase;
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.Purchase";
}
public PurchaseBridge(Object obj) {
super(obj, new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.PurchaseBridge.1
{
put(PurchaseBridge.getSignatureMethodName, new Class[0]);
}
});
this._purchase = obj;
}
public String getSignature() {
return (String) callNonVoidMethod(getSignatureMethodName, this._purchase, new Object[0]);
}
@Override // com.unity3d.services.store.gpbl.bridges.CommonJsonResponseBridge, com.unity3d.services.store.JsonSerializable
public JSONObject toJson() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("purchaseData", getOriginalJson());
jSONObject.put(InAppPurchaseMetaData.KEY_SIGNATURE, getSignature());
} catch (JSONException e) {
DeviceLog.warning("Could not build Purchase result Json: ", e.getMessage());
}
return jSONObject;
}
}

View File

@@ -0,0 +1,13 @@
package com.unity3d.services.store.gpbl.bridges;
/* loaded from: classes4.dex */
public class PurchaseHistoryRecordBridge extends CommonJsonResponseBridge {
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.PurchaseHistoryRecord";
}
public PurchaseHistoryRecordBridge(Object obj) {
super(obj);
}
}

View File

@@ -0,0 +1,45 @@
package com.unity3d.services.store.gpbl.bridges;
import com.unity3d.services.core.reflection.GenericBridge;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes4.dex */
public class PurchasesResultBridge extends GenericBridge {
private static final String getBillingResultMethodName = "getBillingResult";
private static final String getPurchasesListMethodName = "getPurchasesList";
private final Object _purchasesResult;
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.Purchase$PurchasesResult";
}
public PurchasesResultBridge(Object obj) {
super(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.PurchasesResultBridge.1
{
put(PurchasesResultBridge.getBillingResultMethodName, new Class[0]);
put(PurchasesResultBridge.getPurchasesListMethodName, new Class[0]);
}
});
this._purchasesResult = obj;
}
public BillingResultBridge getBillingResult() {
return new BillingResultBridge(callNonVoidMethod(getBillingResultMethodName, this._purchasesResult, new Object[0]));
}
public List<PurchaseBridge> getPurchasesList() {
List list = (List) callNonVoidMethod(getPurchasesListMethodName, this._purchasesResult, new Object[0]);
ArrayList arrayList = new ArrayList();
if (list != null) {
Iterator it = list.iterator();
while (it.hasNext()) {
arrayList.add(new PurchaseBridge(it.next()));
}
}
return arrayList;
}
}

View File

@@ -0,0 +1,13 @@
package com.unity3d.services.store.gpbl.bridges;
/* loaded from: classes4.dex */
public class SkuDetailsBridge extends CommonJsonResponseBridge {
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.SkuDetails";
}
public SkuDetailsBridge(Object obj) {
super(obj);
}
}

View File

@@ -0,0 +1,86 @@
package com.unity3d.services.store.gpbl.bridges;
import com.android.billingclient.api.SkuDetailsParams;
import com.unity3d.services.core.reflection.GenericBridge;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/* loaded from: classes4.dex */
public class SkuDetailsParamsBridge extends GenericBridge {
private static final String newBuilderMethodName = "newBuilder";
private static final Map<String, Class<?>[]> staticMethods = new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge.1
{
put(SkuDetailsParamsBridge.newBuilderMethodName, new Class[0]);
}
};
private final Object _skuDetailsParamsInternalInstance;
public static Class<?> getClassForBridge() throws ClassNotFoundException {
return SkuDetailsParams.class;
}
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.SkuDetailsParams";
}
public Object getInternalInstance() {
return this._skuDetailsParamsInternalInstance;
}
public SkuDetailsParamsBridge(Object obj) {
super(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge.2
{
put(SkuDetailsParamsBridge.newBuilderMethodName, new Class[0]);
}
});
this._skuDetailsParamsInternalInstance = obj;
}
public static BuilderBridge newBuilder() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException {
return new BuilderBridge(callNonVoidStaticMethod(newBuilderMethodName, new Object[0]));
}
public static Object callNonVoidStaticMethod(String str, Object... objArr) throws ClassNotFoundException, InvocationTargetException, IllegalAccessException, NoSuchMethodException {
return getClassForBridge().getMethod(str, staticMethods.get(str)).invoke(null, objArr);
}
public static class BuilderBridge extends GenericBridge {
private static final String buildMethodName = "build";
private static final String setSkusListMethodName = "setSkusList";
private static final String setTypeMethodName = "setType";
private Object _skuDetailsParamsBuilderInternalInstance;
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.SkuDetailsParams$Builder";
}
public BuilderBridge(Object obj) {
super(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge.BuilderBridge.1
{
put(BuilderBridge.buildMethodName, new Class[0]);
put(BuilderBridge.setSkusListMethodName, new Class[]{List.class});
put(BuilderBridge.setTypeMethodName, new Class[]{String.class});
}
});
this._skuDetailsParamsBuilderInternalInstance = obj;
}
public BuilderBridge setSkuList(List<String> list) {
this._skuDetailsParamsBuilderInternalInstance = callNonVoidMethod(setSkusListMethodName, this._skuDetailsParamsBuilderInternalInstance, list);
return this;
}
public BuilderBridge setType(String str) {
this._skuDetailsParamsBuilderInternalInstance = callNonVoidMethod(setTypeMethodName, this._skuDetailsParamsBuilderInternalInstance, str);
return this;
}
public SkuDetailsParamsBridge build() throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException {
return new SkuDetailsParamsBridge(callNonVoidMethod(buildMethodName, this._skuDetailsParamsBuilderInternalInstance, new Object[0]));
}
}
}

View File

@@ -0,0 +1,12 @@
package com.unity3d.services.store.gpbl.bridges.billingclient;
import android.content.Context;
import com.unity3d.services.store.gpbl.bridges.billingclient.v4.BillingClientBridge;
import java.lang.reflect.InvocationTargetException;
/* loaded from: classes4.dex */
public class BillingClientBuilderFactory {
public static IBillingClientBuilderBridge getBillingClientBuilder(Context context) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
return BillingClientBridge.newBuilder(context);
}
}

View File

@@ -0,0 +1,23 @@
package com.unity3d.services.store.gpbl.bridges.billingclient;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge;
import com.unity3d.services.store.gpbl.proxies.BillingClientStateListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchaseHistoryResponseListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchasesResponseListenerProxy;
import com.unity3d.services.store.gpbl.proxies.SkuDetailsResponseListenerProxy;
/* loaded from: classes4.dex */
public interface IBillingClient {
BillingResultResponseCode isFeatureSupported(String str);
boolean isReady();
void queryPurchaseHistoryAsync(String str, PurchaseHistoryResponseListenerProxy purchaseHistoryResponseListenerProxy) throws ClassNotFoundException;
void queryPurchasesAsync(String str, PurchasesResponseListenerProxy purchasesResponseListenerProxy) throws ClassNotFoundException;
void querySkuDetailsAsync(SkuDetailsParamsBridge skuDetailsParamsBridge, SkuDetailsResponseListenerProxy skuDetailsResponseListenerProxy) throws ClassNotFoundException;
void startConnection(BillingClientStateListenerProxy billingClientStateListenerProxy) throws ClassNotFoundException;
}

View File

@@ -0,0 +1,13 @@
package com.unity3d.services.store.gpbl.bridges.billingclient;
import com.unity3d.services.store.gpbl.proxies.PurchaseUpdatedListenerProxy;
import java.lang.reflect.InvocationTargetException;
/* loaded from: classes4.dex */
public interface IBillingClientBuilderBridge {
IBillingClient build() throws ClassNotFoundException;
IBillingClientBuilderBridge enablePendingPurchases();
IBillingClientBuilderBridge setListener(PurchaseUpdatedListenerProxy purchaseUpdatedListenerProxy) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException;
}

View File

@@ -0,0 +1,94 @@
package com.unity3d.services.store.gpbl.bridges.billingclient.common;
import android.content.Context;
import com.android.billingclient.api.BillingClient;
import com.unity3d.services.core.reflection.GenericBridge;
import com.unity3d.services.store.gpbl.BillingResultResponseCode;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsParamsBridge;
import com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient;
import com.unity3d.services.store.gpbl.proxies.BillingClientStateListenerProxy;
import com.unity3d.services.store.gpbl.proxies.PurchaseHistoryResponseListenerProxy;
import com.unity3d.services.store.gpbl.proxies.SkuDetailsResponseListenerProxy;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes4.dex */
public abstract class BillingClientBridgeCommon extends GenericBridge implements IBillingClient {
protected static final String endConnectionMethodName = "endConnection";
protected static final String isFeatureSupportedMethodName = "isFeatureSupported";
protected static final String isReadyMethodName = "isReady";
protected static final String newBuilderMethodName = "newBuilder";
protected static final String queryPurchaseHistoryAsyncMethodName = "queryPurchaseHistoryAsync";
protected static final String querySkuDetailsAsyncMethodName = "querySkuDetailsAsync";
protected static final String startConnectionMethodName = "startConnection";
private static final Map<String, Class<?>[]> staticMethods = new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.billingclient.common.BillingClientBridgeCommon.1
{
put(BillingClientBridgeCommon.newBuilderMethodName, new Class[]{Context.class});
}
};
protected final Object _billingClientInternalInstance;
public static Class<?> getClassForBridge() throws ClassNotFoundException {
return BillingClient.class;
}
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.BillingClient";
}
public BillingClientBridgeCommon(Object obj, Map<String, Class<?>[]> map) throws ClassNotFoundException {
super(appendFunctionAnParameters(map));
this._billingClientInternalInstance = obj;
}
private static Map<String, Class<?>[]> appendFunctionAnParameters(Map<String, Class<?>[]> map) throws ClassNotFoundException {
map.putAll(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.billingclient.common.BillingClientBridgeCommon.2
{
put(BillingClientBridgeCommon.newBuilderMethodName, new Class[]{Context.class});
put(BillingClientBridgeCommon.startConnectionMethodName, new Class[]{BillingClientStateListenerProxy.getProxyListenerClass()});
put(BillingClientBridgeCommon.endConnectionMethodName, new Class[0]);
put(BillingClientBridgeCommon.querySkuDetailsAsyncMethodName, new Class[]{SkuDetailsParamsBridge.getClassForBridge(), SkuDetailsResponseListenerProxy.getProxyListenerClass()});
put(BillingClientBridgeCommon.queryPurchaseHistoryAsyncMethodName, new Class[]{String.class, PurchaseHistoryResponseListenerProxy.getProxyListenerClass()});
put(BillingClientBridgeCommon.isFeatureSupportedMethodName, new Class[]{String.class});
put(BillingClientBridgeCommon.isReadyMethodName, new Class[0]);
}
});
return map;
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public void startConnection(BillingClientStateListenerProxy billingClientStateListenerProxy) throws ClassNotFoundException {
callVoidMethod(startConnectionMethodName, this._billingClientInternalInstance, billingClientStateListenerProxy.getProxyInstance());
}
public void endConnection() {
callVoidMethod(endConnectionMethodName, this._billingClientInternalInstance, new Object[0]);
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public BillingResultResponseCode isFeatureSupported(String str) {
return new BillingResultBridge(callNonVoidMethod(isFeatureSupportedMethodName, this._billingClientInternalInstance, str)).getResponseCode();
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public boolean isReady() {
return ((Boolean) callNonVoidMethod(isReadyMethodName, this._billingClientInternalInstance, new Object[0])).booleanValue();
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public void querySkuDetailsAsync(SkuDetailsParamsBridge skuDetailsParamsBridge, SkuDetailsResponseListenerProxy skuDetailsResponseListenerProxy) throws ClassNotFoundException {
callVoidMethod(querySkuDetailsAsyncMethodName, this._billingClientInternalInstance, skuDetailsParamsBridge.getInternalInstance(), skuDetailsResponseListenerProxy.getProxyInstance());
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public void queryPurchaseHistoryAsync(String str, PurchaseHistoryResponseListenerProxy purchaseHistoryResponseListenerProxy) throws ClassNotFoundException {
callVoidMethod(queryPurchaseHistoryAsyncMethodName, this._billingClientInternalInstance, str, purchaseHistoryResponseListenerProxy.getProxyInstance());
}
public static Object callNonVoidStaticMethod(String str, Object... objArr) throws ClassNotFoundException, InvocationTargetException, IllegalAccessException, NoSuchMethodException {
return getClassForBridge().getMethod(str, staticMethods.get(str)).invoke(null, objArr);
}
}

View File

@@ -0,0 +1,43 @@
package com.unity3d.services.store.gpbl.bridges.billingclient.common;
import com.unity3d.services.core.reflection.GenericBridge;
import com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClientBuilderBridge;
import com.unity3d.services.store.gpbl.proxies.PurchaseUpdatedListenerProxy;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
/* loaded from: classes4.dex */
public abstract class BillingClientBuilderBridgeCommon extends GenericBridge implements IBillingClientBuilderBridge {
protected static final String buildMethodName = "build";
private static final String enablePendingPurchasesMethodName = "enablePendingPurchases";
private static final String setListenerMethodName = "setListener";
protected Object _billingClientBuilderInternalInstance;
@Override // com.unity3d.services.core.reflection.GenericBridge
public String getClassName() {
return "com.android.billingclient.api.BillingClient$Builder";
}
public BillingClientBuilderBridgeCommon(Object obj) throws ClassNotFoundException {
super(new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.billingclient.common.BillingClientBuilderBridgeCommon.1
{
put(BillingClientBuilderBridgeCommon.setListenerMethodName, new Class[]{PurchaseUpdatedListenerProxy.getProxyListenerClass()});
put(BillingClientBuilderBridgeCommon.enablePendingPurchasesMethodName, new Class[0]);
put(BillingClientBuilderBridgeCommon.buildMethodName, new Class[0]);
}
});
this._billingClientBuilderInternalInstance = obj;
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClientBuilderBridge
public IBillingClientBuilderBridge setListener(PurchaseUpdatedListenerProxy purchaseUpdatedListenerProxy) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {
this._billingClientBuilderInternalInstance = callNonVoidMethod(setListenerMethodName, this._billingClientBuilderInternalInstance, purchaseUpdatedListenerProxy.getProxyInstance());
return this;
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClientBuilderBridge
public IBillingClientBuilderBridge enablePendingPurchases() {
this._billingClientBuilderInternalInstance = callNonVoidMethod(enablePendingPurchasesMethodName, this._billingClientBuilderInternalInstance, new Object[0]);
return this;
}
}

View File

@@ -0,0 +1,50 @@
package com.unity3d.services.store.gpbl.bridges.billingclient.v4;
import android.content.Context;
import com.unity3d.services.store.gpbl.bridges.billingclient.common.BillingClientBridgeCommon;
import com.unity3d.services.store.gpbl.bridges.billingclient.common.BillingClientBuilderBridgeCommon;
import com.unity3d.services.store.gpbl.proxies.PurchasesResponseListenerProxy;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
/* loaded from: classes4.dex */
public class BillingClientBridge extends BillingClientBridgeCommon {
private static final String queryPurchasesAsyncMethodName = "queryPurchasesAsync";
public BillingClientBridge(Object obj) throws ClassNotFoundException {
super(obj, new HashMap<String, Class<?>[]>() { // from class: com.unity3d.services.store.gpbl.bridges.billingclient.v4.BillingClientBridge.1
{
put(BillingClientBridge.queryPurchasesAsyncMethodName, new Class[]{String.class, PurchasesResponseListenerProxy.getProxyListenerClass()});
}
});
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClient
public void queryPurchasesAsync(String str, PurchasesResponseListenerProxy purchasesResponseListenerProxy) throws ClassNotFoundException {
callVoidMethod(queryPurchasesAsyncMethodName, this._billingClientInternalInstance, str, purchasesResponseListenerProxy.getProxyInstance());
}
public static boolean isAvailable() {
try {
BillingClientBridgeCommon.getClassForBridge().getMethod(queryPurchasesAsyncMethodName, String.class, PurchasesResponseListenerProxy.getProxyListenerClass());
return true;
} catch (ClassNotFoundException | NoSuchMethodException unused) {
return false;
}
}
public static BuilderBridge newBuilder(Context context) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ClassNotFoundException {
return new BuilderBridge(BillingClientBridgeCommon.callNonVoidStaticMethod("newBuilder", context));
}
public static class BuilderBridge extends BillingClientBuilderBridgeCommon {
public BuilderBridge(Object obj) throws ClassNotFoundException {
super(obj);
}
@Override // com.unity3d.services.store.gpbl.bridges.billingclient.IBillingClientBuilderBridge
public BillingClientBridgeCommon build() throws ClassNotFoundException {
return new BillingClientBridge(callNonVoidMethod("build", this._billingClientBuilderInternalInstance, new Object[0]));
}
}
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.services.store.gpbl.listeners;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
/* loaded from: classes4.dex */
public interface BillingClientStateListener {
void onBillingServiceDisconnected();
void onBillingSetupFinished(BillingResultBridge billingResultBridge);
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.services.store.gpbl.listeners;
/* loaded from: classes4.dex */
public interface BillingInitializationListener extends BillingClientStateListener, PurchaseUpdatedResponseListener {
void onIsAlreadyInitialized();
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.services.store.gpbl.listeners;
/* loaded from: classes4.dex */
public interface FeatureSupportedListener {
void onFeatureSupported(int i);
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.services.store.gpbl.listeners;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseHistoryRecordBridge;
import java.util.List;
/* loaded from: classes4.dex */
public interface PurchaseHistoryResponseListener {
void onPurchaseHistoryUpdated(BillingResultBridge billingResultBridge, List<? extends PurchaseHistoryRecordBridge> list);
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.services.store.gpbl.listeners;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import java.util.List;
/* loaded from: classes4.dex */
public interface PurchaseUpdatedResponseListener {
void onPurchaseUpdated(BillingResultBridge billingResultBridge, List<? extends PurchaseBridge> list);
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.services.store.gpbl.listeners;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import java.util.List;
/* loaded from: classes4.dex */
public interface PurchasesResponseListener {
void onPurchaseResponse(BillingResultBridge billingResultBridge, List<? extends PurchaseBridge> list);
}

View File

@@ -0,0 +1,10 @@
package com.unity3d.services.store.gpbl.listeners;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsBridge;
import java.util.List;
/* loaded from: classes4.dex */
public interface SkuDetailsResponseListener {
void onSkuDetailsUpdated(BillingResultBridge billingResultBridge, List<? extends SkuDetailsBridge> list);
}

View File

@@ -0,0 +1,6 @@
package com.unity3d.services.store.gpbl.listeners;
/* loaded from: classes4.dex */
public interface StoreEventListener extends PurchaseHistoryResponseListener, SkuDetailsResponseListener, PurchasesResponseListener, PurchaseUpdatedResponseListener, FeatureSupportedListener, BillingInitializationListener {
int getOperationId();
}

View File

@@ -0,0 +1,52 @@
package com.unity3d.services.store.gpbl.proxies;
import com.unity3d.services.core.reflection.GenericListenerProxy;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.listeners.BillingClientStateListener;
import java.lang.reflect.Method;
/* loaded from: classes4.dex */
public class BillingClientStateListenerProxy extends GenericListenerProxy {
private static String onBillingServiceDisconnectedMethodName = "onBillingServiceDisconnected";
private static String onBillingSetupFinishedMethodName = "onBillingSetupFinished";
private BillingClientStateListener billingClientStateListener;
public static Class<?> getProxyListenerClass() throws ClassNotFoundException {
return com.android.billingclient.api.BillingClientStateListener.class;
}
public BillingClientStateListenerProxy(BillingClientStateListener billingClientStateListener) {
this.billingClientStateListener = billingClientStateListener;
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy
public Class<?> getProxyClass() throws ClassNotFoundException {
return getProxyListenerClass();
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy, java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
if (method.getName().equals(onBillingSetupFinishedMethodName)) {
onBillingSetupFinished(objArr[0]);
} else if (method.getName().equals(onBillingServiceDisconnectedMethodName)) {
onBillingServiceDisconnected();
} else {
return super.invoke(obj, method, objArr);
}
return null;
}
private void onBillingSetupFinished(Object obj) {
BillingClientStateListener billingClientStateListener = this.billingClientStateListener;
if (billingClientStateListener != null) {
billingClientStateListener.onBillingSetupFinished(new BillingResultBridge(obj));
}
}
private void onBillingServiceDisconnected() {
BillingClientStateListener billingClientStateListener = this.billingClientStateListener;
if (billingClientStateListener != null) {
billingClientStateListener.onBillingServiceDisconnected();
}
}
}

View File

@@ -0,0 +1,55 @@
package com.unity3d.services.store.gpbl.proxies;
import com.unity3d.services.core.reflection.GenericListenerProxy;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseHistoryRecordBridge;
import com.unity3d.services.store.gpbl.listeners.PurchaseHistoryResponseListener;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes4.dex */
public class PurchaseHistoryResponseListenerProxy extends GenericListenerProxy {
private static final String onPurchaseHistoryResponseMethodName = "onPurchaseHistoryResponse";
private int _maxPurchases;
private PurchaseHistoryResponseListener purchaseHistoryResponseListener;
public static Class<?> getProxyListenerClass() throws ClassNotFoundException {
return com.android.billingclient.api.PurchaseHistoryResponseListener.class;
}
public PurchaseHistoryResponseListenerProxy(PurchaseHistoryResponseListener purchaseHistoryResponseListener, int i) {
this.purchaseHistoryResponseListener = purchaseHistoryResponseListener;
this._maxPurchases = i;
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy
public Class<?> getProxyClass() throws ClassNotFoundException {
return getProxyListenerClass();
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy, java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
if (method.getName().equals(onPurchaseHistoryResponseMethodName)) {
onPurchaseHistoryResponse(objArr[0], (List) objArr[1]);
return null;
}
return super.invoke(obj, method, objArr);
}
public void onPurchaseHistoryResponse(Object obj, List<Object> list) {
ArrayList arrayList;
if (list != null) {
arrayList = new ArrayList();
for (int i = 0; i < this._maxPurchases && i < list.size(); i++) {
arrayList.add(new PurchaseHistoryRecordBridge(list.get(i)));
}
} else {
arrayList = null;
}
PurchaseHistoryResponseListener purchaseHistoryResponseListener = this.purchaseHistoryResponseListener;
if (purchaseHistoryResponseListener != null) {
purchaseHistoryResponseListener.onPurchaseHistoryUpdated(new BillingResultBridge(obj), arrayList);
}
}
}

View File

@@ -0,0 +1,56 @@
package com.unity3d.services.store.gpbl.proxies;
import com.android.billingclient.api.PurchasesUpdatedListener;
import com.unity3d.services.core.reflection.GenericListenerProxy;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import com.unity3d.services.store.gpbl.listeners.PurchaseUpdatedResponseListener;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes4.dex */
public class PurchaseUpdatedListenerProxy extends GenericListenerProxy {
private static final String onPurchasesUpdatedMethodName = "onPurchasesUpdated";
private PurchaseUpdatedResponseListener purchaseUpdatedResponseListener;
public static Class<?> getProxyListenerClass() throws ClassNotFoundException {
return PurchasesUpdatedListener.class;
}
public PurchaseUpdatedListenerProxy(PurchaseUpdatedResponseListener purchaseUpdatedResponseListener) {
this.purchaseUpdatedResponseListener = purchaseUpdatedResponseListener;
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy
public Class<?> getProxyClass() throws ClassNotFoundException {
return getProxyListenerClass();
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy, java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
if (method.getName().equals(onPurchasesUpdatedMethodName)) {
onPurchasesUpdated(objArr[0], (List) objArr[1]);
return null;
}
return super.invoke(obj, method, objArr);
}
public void onPurchasesUpdated(Object obj, List<Object> list) {
ArrayList arrayList;
if (list != null) {
arrayList = new ArrayList();
Iterator<Object> it = list.iterator();
while (it.hasNext()) {
arrayList.add(new PurchaseBridge(it.next()));
}
} else {
arrayList = null;
}
PurchaseUpdatedResponseListener purchaseUpdatedResponseListener = this.purchaseUpdatedResponseListener;
if (purchaseUpdatedResponseListener != null) {
purchaseUpdatedResponseListener.onPurchaseUpdated(new BillingResultBridge(obj), arrayList);
}
}
}

View File

@@ -0,0 +1,60 @@
package com.unity3d.services.store.gpbl.proxies;
import com.unity3d.services.core.reflection.GenericListenerProxy;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.PurchaseBridge;
import com.unity3d.services.store.gpbl.listeners.PurchasesResponseListener;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes4.dex */
public class PurchasesResponseListenerProxy extends GenericListenerProxy {
private static final String onQueryPurchasesResponseMethodName = "onQueryPurchasesResponse";
private PurchasesResponseListener purchasesResponseListener;
public static Class<?> getProxyListenerClass() throws ClassNotFoundException {
return com.android.billingclient.api.PurchasesResponseListener.class;
}
public PurchasesResponseListener getPurchasesResponseListener() {
return this.purchasesResponseListener;
}
public PurchasesResponseListenerProxy(PurchasesResponseListener purchasesResponseListener) {
this.purchasesResponseListener = purchasesResponseListener;
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy
public Class<?> getProxyClass() throws ClassNotFoundException {
return getProxyListenerClass();
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy, java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
if (method.getName().equals(onQueryPurchasesResponseMethodName)) {
onQueryPurchasesResponse(objArr[0], (List) objArr[1]);
return null;
}
return super.invoke(obj, method, objArr);
}
public void onQueryPurchasesResponse(Object obj, List<Object> list) {
ArrayList arrayList;
BillingResultBridge billingResultBridge = new BillingResultBridge(obj);
if (list != null) {
arrayList = new ArrayList();
Iterator<Object> it = list.iterator();
while (it.hasNext()) {
arrayList.add(new PurchaseBridge(it.next()));
}
} else {
arrayList = null;
}
PurchasesResponseListener purchasesResponseListener = this.purchasesResponseListener;
if (purchasesResponseListener != null) {
purchasesResponseListener.onPurchaseResponse(billingResultBridge, arrayList);
}
}
}

View File

@@ -0,0 +1,55 @@
package com.unity3d.services.store.gpbl.proxies;
import com.unity3d.services.core.reflection.GenericListenerProxy;
import com.unity3d.services.store.gpbl.bridges.BillingResultBridge;
import com.unity3d.services.store.gpbl.bridges.SkuDetailsBridge;
import com.unity3d.services.store.gpbl.listeners.SkuDetailsResponseListener;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes4.dex */
public class SkuDetailsResponseListenerProxy extends GenericListenerProxy {
private static final String onSkuDetailsResponseMethodName = "onSkuDetailsResponse";
private SkuDetailsResponseListener skuDetailsResponseListener;
public static Class<?> getProxyListenerClass() throws ClassNotFoundException {
return com.android.billingclient.api.SkuDetailsResponseListener.class;
}
public SkuDetailsResponseListenerProxy(SkuDetailsResponseListener skuDetailsResponseListener) {
this.skuDetailsResponseListener = skuDetailsResponseListener;
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy
public Class<?> getProxyClass() throws ClassNotFoundException {
return getProxyListenerClass();
}
@Override // com.unity3d.services.core.reflection.GenericListenerProxy, java.lang.reflect.InvocationHandler
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
if (method.getName().equals(onSkuDetailsResponseMethodName)) {
onSkuDetailsResponse(objArr[0], (List) objArr[1]);
return null;
}
return super.invoke(obj, method, objArr);
}
public void onSkuDetailsResponse(Object obj, List<Object> list) {
ArrayList arrayList;
if (list != null) {
arrayList = new ArrayList();
Iterator<Object> it = list.iterator();
while (it.hasNext()) {
arrayList.add(new SkuDetailsBridge(it.next()));
}
} else {
arrayList = null;
}
SkuDetailsResponseListener skuDetailsResponseListener = this.skuDetailsResponseListener;
if (skuDetailsResponseListener != null) {
skuDetailsResponseListener.onSkuDetailsUpdated(new BillingResultBridge(obj), arrayList);
}
}
}