From ddc77884bdbc6d45d396fd59d6d08933cc532e06 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Thu, 6 Jul 2023 15:31:38 -0400 Subject: [PATCH] Inline the credit card payments feature flag. --- .../settings/app/subscription/InAppDonations.kt | 2 +- .../org/thoughtcrime/securesms/util/FeatureFlags.java | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/InAppDonations.kt b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/InAppDonations.kt index a2fd02920e..9e138cff9c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/InAppDonations.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/components/settings/app/subscription/InAppDonations.kt @@ -42,7 +42,7 @@ object InAppDonations { * Whether the user is in a region that supports credit cards, based off local phone number. */ fun isCreditCardAvailable(): Boolean { - return FeatureFlags.creditCardPayments() && !LocaleFeatureFlags.isCreditCardDisabled() + return !LocaleFeatureFlags.isCreditCardDisabled() } /** diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java index 92ecf2b03e..df83f19d62 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/FeatureFlags.java @@ -94,7 +94,6 @@ public final class FeatureFlags { private static final String CAMERAX_MIXED_MODEL_BLOCKLIST = "android.cameraXMixedModelBlockList"; private static final String RECIPIENT_MERGE_V2 = "android.recipientMergeV2"; private static final String HIDE_CONTACTS = "android.hide.contacts"; - public static final String CREDIT_CARD_PAYMENTS = "android.credit.card.payments.3"; private static final String PAYMENTS_REQUEST_ACTIVATE_FLOW = "android.payments.requestActivateFlow"; public static final String GOOGLE_PAY_DISABLED_REGIONS = "global.donations.gpayDisabledRegions"; public static final String CREDIT_CARD_DISABLED_REGIONS = "global.donations.ccDisabledRegions"; @@ -155,7 +154,6 @@ public final class FeatureFlags { CAMERAX_MIXED_MODEL_BLOCKLIST, RECIPIENT_MERGE_V2, HIDE_CONTACTS, - CREDIT_CARD_PAYMENTS, PAYMENTS_REQUEST_ACTIVATE_FLOW, GOOGLE_PAY_DISABLED_REGIONS, CREDIT_CARD_DISABLED_REGIONS, @@ -229,7 +227,6 @@ public final class FeatureFlags { TELECOM_MODEL_BLOCKLIST, CAMERAX_MODEL_BLOCKLIST, RECIPIENT_MERGE_V2, - CREDIT_CARD_PAYMENTS, PAYMENTS_REQUEST_ACTIVATE_FLOW, CDS_HARD_LIMIT, EDIT_MESSAGE_SEND, @@ -516,13 +513,6 @@ public final class FeatureFlags { return getBoolean(HIDE_CONTACTS, false); } - /** - * Whether or not we should allow credit card payments for donations - */ - public static boolean creditCardPayments() { - return getBoolean(CREDIT_CARD_PAYMENTS, Environment.IS_STAGING); - } - /** Whether client supports sending a request to another to activate payments */ public static boolean paymentsRequestActivateFlow() { return getBoolean(PAYMENTS_REQUEST_ACTIVATE_FLOW, false);