diff --git a/android/src/com/mapswithme/maps/intent/Factory.java b/android/src/com/mapswithme/maps/intent/Factory.java index 26fe56b759..d84a9e2c3c 100644 --- a/android/src/com/mapswithme/maps/intent/Factory.java +++ b/android/src/com/mapswithme/maps/intent/Factory.java @@ -32,6 +32,7 @@ import com.mapswithme.maps.location.LocationHelper; import com.mapswithme.maps.onboarding.IntroductionScreenFactory; import com.mapswithme.maps.purchase.BookmarksAllSubscriptionActivity; import com.mapswithme.maps.purchase.BookmarksSightsSubscriptionActivity; +import com.mapswithme.maps.purchase.PurchaseUtils; import com.mapswithme.maps.purchase.SubscriptionType; import com.mapswithme.maps.routing.RoutingController; import com.mapswithme.maps.search.SearchActivity; @@ -733,7 +734,7 @@ public class Factory public boolean run(@NonNull MwmActivity target) { Uri uri = Uri.parse(mUrl); - String serverId = uri.getQueryParameter("deliverable"); + String serverId = uri.getQueryParameter(PurchaseUtils.GROUPS); if (TextUtils.isEmpty(serverId)) return false; diff --git a/android/src/com/mapswithme/maps/purchase/BookmarkPaymentDataParser.java b/android/src/com/mapswithme/maps/purchase/BookmarkPaymentDataParser.java index 7a5db2b71e..e0893c5aca 100644 --- a/android/src/com/mapswithme/maps/purchase/BookmarkPaymentDataParser.java +++ b/android/src/com/mapswithme/maps/purchase/BookmarkPaymentDataParser.java @@ -20,7 +20,6 @@ public class BookmarkPaymentDataParser implements PaymentDataParser public final static String NAME = "name"; public final static String IMG_URL = "img"; public final static String AUTHOR_NAME = "author_name"; - public final static String GROUPS = "groups"; @NonNull @Override diff --git a/android/src/com/mapswithme/maps/purchase/PurchaseUtils.java b/android/src/com/mapswithme/maps/purchase/PurchaseUtils.java index 3626590716..5f4ea8569b 100644 --- a/android/src/com/mapswithme/maps/purchase/PurchaseUtils.java +++ b/android/src/com/mapswithme/maps/purchase/PurchaseUtils.java @@ -22,6 +22,7 @@ import java.util.List; public class PurchaseUtils { + public final static String GROUPS = "groups"; final static int REQ_CODE_PRODUCT_DETAILS_FAILURE = 1; final static int REQ_CODE_PAYMENT_FAILURE = 2; final static int REQ_CODE_VALIDATION_SERVER_ERROR = 3; @@ -183,11 +184,11 @@ public class PurchaseUtils @NonNull public static String getTargetBookmarkGroupFromUri(@NonNull Uri uri) { - List uriGroups = uri.getQueryParameters(BookmarkPaymentDataParser.GROUPS); + List uriGroups = uri.getQueryParameters(GROUPS); if (uriGroups == null || uriGroups.isEmpty()) { CrashlyticsUtils.logException( - new IllegalArgumentException("'" + BookmarkPaymentDataParser.GROUPS + new IllegalArgumentException("'" + GROUPS + "' parameter is required! URI: " + uri)); return SubscriptionType.BOOKMARKS_ALL.getServerId(); }