Log purchase time

This commit is contained in:
M66B 2019-05-31 18:14:20 +02:00
parent 696f9a7a82
commit e5edb6b230
1 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ import java.security.PublicKey;
import java.security.Signature; import java.security.Signature;
import java.security.spec.X509EncodedKeySpec; import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -302,7 +303,8 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
try { try {
query.remove(purchase.getSku()); query.remove(purchase.getSku());
boolean purchased = (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED); boolean purchased = (purchase.getPurchaseState() == Purchase.PurchaseState.PURCHASED);
Log.i("IAB SKU=" + purchase.getSku() + " purchased=" + purchased); long time = purchase.getPurchaseTime();
Log.i("IAB SKU=" + purchase.getSku() + " purchased=" + purchased + " time=" + new Date(time));
//if (new Date().getTime() - purchase.getPurchaseTime() > 3 * 60 * 1000L) { //if (new Date().getTime() - purchase.getPurchaseTime() > 3 * 60 * 1000L) {
// consumePurchase(purchase); // consumePurchase(purchase);