mirror of
https://github.com/defold/extension-iap
synced 2025-06-27 10:27:46 +02:00
Merge pull request #28 from SkaterDad/Amazon-Fix-NPE
Fix crashes when using Amazon provider
This commit is contained in:
commit
5c806a990d
@ -45,6 +45,7 @@ public class IapAmazon implements PurchasingListener {
|
|||||||
this.activity = activity;
|
this.activity = activity;
|
||||||
this.autoFinishTransactions = autoFinishTransactions;
|
this.autoFinishTransactions = autoFinishTransactions;
|
||||||
this.listProductsListeners = new HashMap<RequestId, IListProductsListener>();
|
this.listProductsListeners = new HashMap<RequestId, IListProductsListener>();
|
||||||
|
this.listProductsCommandPtrs = new HashMap<RequestId, Long>();
|
||||||
this.purchaseListeners = new HashMap<RequestId, IPurchaseListener>();
|
this.purchaseListeners = new HashMap<RequestId, IPurchaseListener>();
|
||||||
PurchasingService.registerListener(activity, this);
|
PurchasingService.registerListener(activity, this);
|
||||||
}
|
}
|
||||||
@ -97,6 +98,10 @@ public class IapAmazon implements PurchasingListener {
|
|||||||
PurchasingService.notifyFulfillment(receipt, FulfillmentResult.FULFILLED);
|
PurchasingService.notifyFulfillment(receipt, FulfillmentResult.FULFILLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void acknowledgeTransaction(final String purchaseToken, final IPurchaseListener purchaseListener) {
|
||||||
|
// Stub to prevent errors.
|
||||||
|
}
|
||||||
|
|
||||||
private void doGetPurchaseUpdates(final IPurchaseListener listener, final boolean reset) {
|
private void doGetPurchaseUpdates(final IPurchaseListener listener, final boolean reset) {
|
||||||
synchronized (purchaseListeners) {
|
synchronized (purchaseListeners) {
|
||||||
RequestId req = PurchasingService.getPurchaseUpdates(reset);
|
RequestId req = PurchasingService.getPurchaseUpdates(reset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user