From bad9da1b285686d56df348ff680b7f3a5f0ba7ee Mon Sep 17 00:00:00 2001 From: cyber-toad Date: Sun, 2 Apr 2023 12:03:10 +0200 Subject: [PATCH] [android] Cleanup unused utm code Signed-off-by: cyber-toad --- .../bookmarks/data/BookmarkManager.java | 14 ------- android/src/app/organicmaps/util/UTM.java | 41 ------------------- 2 files changed, 55 deletions(-) delete mode 100644 android/src/app/organicmaps/util/UTM.java diff --git a/android/src/app/organicmaps/bookmarks/data/BookmarkManager.java b/android/src/app/organicmaps/bookmarks/data/BookmarkManager.java index fa155a3393..d52f7106d6 100644 --- a/android/src/app/organicmaps/bookmarks/data/BookmarkManager.java +++ b/android/src/app/organicmaps/bookmarks/data/BookmarkManager.java @@ -16,7 +16,6 @@ import app.organicmaps.base.DataChangedListener; import app.organicmaps.base.Observable; import app.organicmaps.util.KeyValue; import app.organicmaps.util.StorageUtils; -import app.organicmaps.util.UTM; import app.organicmaps.util.concurrency.UiThread; import app.organicmaps.util.log.Logger; @@ -575,12 +574,6 @@ public enum BookmarkManager return nativeAreNotificationsEnabled(); } - @NonNull - public String getCatalogFrontendUrl(@UTM.UTMType int utm) - { - return nativeGetCatalogFrontendUrl(utm); - } - public void requestRouteTags() { nativeRequestCatalogTags(); @@ -837,16 +830,9 @@ public enum BookmarkManager @NonNull private static native String nativeGetWebEditorUrl(@NonNull String serverId); - @NonNull - private static native String nativeGetCatalogFrontendUrl(@UTM.UTMType int utm); - @NonNull private static native KeyValue[] nativeGetCatalogHeaders(); - @NonNull - private static native String nativeInjectCatalogUTMContent(@NonNull String url, - @UTM.UTMContentType int content); - private static native void nativeRequestCatalogTags(); private static native void nativeRequestCatalogCustomProperties(); diff --git a/android/src/app/organicmaps/util/UTM.java b/android/src/app/organicmaps/util/UTM.java deleted file mode 100644 index 5cc24bd4c3..0000000000 --- a/android/src/app/organicmaps/util/UTM.java +++ /dev/null @@ -1,41 +0,0 @@ -package app.organicmaps.util; - -import androidx.annotation.IntDef; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -public class UTM -{ - @Retention(RetentionPolicy.SOURCE) - @IntDef({ UTM_NONE, UTM_BOOKMARKS_PAGE_CATALOG_BUTTON, UTM_TOOLBAR_BUTTON, - UTM_DOWNLOAD_MWM_BANNER, UTM_LARGE_TOPONYMS_PLACEPAGE_GALLERY, - UTM_SIGHTSEEINGS_PLACEPAGE_GALLERY, UTM_DISCOVERY_PAGE_GALLERY, - UTM_TIPS_AND_TRICKS, UTM_BOOKING_PROMO, UTM_DISCOVER_CATALOG_ONBOARDING, - UTM_FREE_SAMPLES_ONBOADING, UTM_OUTDOOR_PLACEPAGE_GALLERY}) - public @interface UTMType {} - - // The order of these constants must correspond to C++ enumeration in partners_api/utm.hpp. - public static final int UTM_NONE = 0; - public static final int UTM_BOOKMARKS_PAGE_CATALOG_BUTTON = 1; - public static final int UTM_TOOLBAR_BUTTON = 2; - public static final int UTM_DOWNLOAD_MWM_BANNER = 3; - public static final int UTM_LARGE_TOPONYMS_PLACEPAGE_GALLERY = 4; - public static final int UTM_SIGHTSEEINGS_PLACEPAGE_GALLERY = 5; - public static final int UTM_DISCOVERY_PAGE_GALLERY = 6; - public static final int UTM_TIPS_AND_TRICKS = 7; - public static final int UTM_BOOKING_PROMO = 8; - public static final int UTM_DISCOVER_CATALOG_ONBOARDING = 9; - public static final int UTM_FREE_SAMPLES_ONBOADING = 10; - public static final int UTM_OUTDOOR_PLACEPAGE_GALLERY = 11; - - @Retention(RetentionPolicy.SOURCE) - @IntDef({ UTM_CONTENT_DESCRIPTION, UTM_CONTENT_VIEW, UTM_CONTENT_DETAILS, UTM_CONTENT_MORE }) - public @interface UTMContentType {} - - // The order of these constants must correspond to C++ enumeration in partners_api/utm.hpp. - public static final int UTM_CONTENT_DESCRIPTION = 0; - public static final int UTM_CONTENT_VIEW = 1; - public static final int UTM_CONTENT_DETAILS = 2; - public static final int UTM_CONTENT_MORE = 3; -}