diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java index d855e36ab3..24a30762e6 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java @@ -557,10 +557,12 @@ public class InAppPurchaseHelper { // Do we have the live updates? boolean subscribedToLiveUpdates = false; List liveUpdatesPurchases = new ArrayList<>(); - for (InAppPurchase p : getLiveUpdates().getAllSubscriptions()) { - Purchase purchase = getPurchase(p.getSku()); - if (purchase != null) { - liveUpdatesPurchases.add(purchase); + for (InAppSubscription s : getLiveUpdates().getAllSubscriptions()) { + Purchase purchase = getPurchase(s.getSku()); + if (purchase != null || s.getState().isActive()) { + if (purchase != null) { + liveUpdatesPurchases.add(purchase); + } if (!subscribedToLiveUpdates) { subscribedToLiveUpdates = true; } diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java index e9552bd9eb..b945108c9c 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchases.java @@ -697,6 +697,10 @@ public class InAppPurchases { public boolean isGone() { return this == ON_HOLD || this == PAUSED || this == EXPIRED; } + + public boolean isActive() { + return this == ACTIVE || this == CANCELLED || this == IN_GRACE_PERIOD; + } } InAppSubscription(@NonNull String skuNoVersion, int version) {