Fixed crash if buying when no listener was set

This commit is contained in:
Björn Ritzl
2020-02-10 08:25:48 +01:00
parent c8d2d4e0d8
commit 8d9ea79d7d
3 changed files with 15 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ public class IapGooglePlay implements Handler.Callback {
private boolean autoFinishTransactions;
private static interface ISkuRequestListener {
public void onProducts(int resultCode, JSONObject products);
public void onProducts(int resultCode, JSONObject products);
}
private static class SkuRequest {

View File

@@ -69,8 +69,8 @@ public class IapGooglePlayActivity extends Activity {
}
private void buy(String product, String productType) {
// Flush any pending items, in order to be able to buy the same (new) product again
processPendingConsumables();
// Flush any pending items, in order to be able to buy the same (new) product again
processPendingConsumables();
try {
Bundle buyIntentBundle = service.getBuyIntent(3, getPackageName(), product, productType, "");