From 32e100331a34abe4a5b70693b1a21c6412332270 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sat, 23 Nov 2024 16:46:28 +0100 Subject: [PATCH] [android] config: extract isFdroid() into method Signed-off-by: Atemu --- .../app/src/main/java/app/organicmaps/util/Config.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/app/organicmaps/util/Config.java b/android/app/src/main/java/app/organicmaps/util/Config.java index 155eed9c96..0915c6bc95 100644 --- a/android/app/src/main/java/app/organicmaps/util/Config.java +++ b/android/app/src/main/java/app/organicmaps/util/Config.java @@ -59,6 +59,12 @@ public final class Config private Config() {} + @SuppressWarnings("ConstantConditions") // BuildConfig + private static boolean isFdroid() + { + return BuildConfig.FLAVOR.equals("fdroid"); + } + private static int getInt(String key, int def) { return nativeGetInt(key, def); @@ -216,10 +222,9 @@ public final class Config setBool(KEY_MISC_KAYAK_ACCEPTED); } - @SuppressWarnings("ConstantConditions") // BuildConfig public static boolean isKayakReferralAllowed() { - return !BuildConfig.FLAVOR.equals("fdroid"); + return !isFdroid(); } public static boolean isLocationRequested()