@Test public void emptyPurchases() { assertTrue(plusPurchaseWallet.hasActivePurchase(InAppPurchase.SmartReceiptsPlus)); assertNull(plusPurchaseWallet.getLocalInAppManagedProduct(InAppPurchase.SmartReceiptsPlus)); assertFalse(plusPurchaseWallet.hasActivePurchase(InAppPurchase.OcrScans50)); assertNull(plusPurchaseWallet.getLocalInAppManagedProduct(InAppPurchase.OcrScans50)); assertEquals(plusPurchaseWallet.getActiveLocalInAppPurchases(), Collections.emptySet()); }
@Override public synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase) { if (inAppPurchase == InAppPurchase.SmartReceiptsPlus) { return true; } else { return super.hasActivePurchase(inAppPurchase); } }
PlusPurchaseWallet extends DefaultPurchaseWallet { @Override public synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase) { if (inAppPurchase == InAppPurchase.SmartReceiptsPlus) { return true; } else { return super.hasActivePurchase(inAppPurchase); } } }
PlusPurchaseWallet extends DefaultPurchaseWallet { @Override public synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase) { if (inAppPurchase == InAppPurchase.SmartReceiptsPlus) { return true; } else { return super.hasActivePurchase(inAppPurchase); } } @Inject  PlusPurchaseWallet(@NonNull Lazy<SharedPreferences> preferences); }
PlusPurchaseWallet extends DefaultPurchaseWallet { @Override public synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase) { if (inAppPurchase == InAppPurchase.SmartReceiptsPlus) { return true; } else { return super.hasActivePurchase(inAppPurchase); } } @Inject  PlusPurchaseWallet(@NonNull Lazy<SharedPreferences> preferences); @Override synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase); }
PlusPurchaseWallet extends DefaultPurchaseWallet { @Override public synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase) { if (inAppPurchase == InAppPurchase.SmartReceiptsPlus) { return true; } else { return super.hasActivePurchase(inAppPurchase); } } @Inject  PlusPurchaseWallet(@NonNull Lazy<SharedPreferences> preferences); @Override synchronized boolean hasActivePurchase(@NonNull InAppPurchase inAppPurchase);  }