Merge pull request #19799 from kosz78/android-payment-fix

Fix possible NullPointerException crash on cancel payment
This commit is contained in:
Max Hilbrunner 2018-07-03 18:52:10 +02:00 committed by GitHub
commit 28ebddd49e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,8 @@ abstract public class HandlePurchaseTask {
public void handlePurchaseRequest(int resultCode, Intent data) {
//Log.d("XXX", "Handling purchase response");
if (resultCode == Activity.RESULT_OK) {
try {
//int responseCode = data.getIntExtra("RESPONSE_CODE", 0);
PaymentsCache pc = new PaymentsCache(context);
@ -65,10 +67,6 @@ abstract public class HandlePurchaseTask {
//Log.d("XXX", "Purchase data:" + purchaseData);
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
//Log.d("XXX", "Purchase signature:" + dataSignature);
if (resultCode == Activity.RESULT_OK) {
try {
//Log.d("SARLANGA", purchaseData);
JSONObject jo = new JSONObject(purchaseData);