Skip to content

Commit

Permalink
Inline export account data feature flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
clark-signal authored and greyson-signal committed Apr 12, 2023
1 parent a35a167 commit ef058a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.signal.core.util.ThreadUtil
import org.signal.core.util.logging.Log
import org.signal.core.util.readToList
import org.signal.core.util.select
import org.signal.core.util.toSingleLine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import org.thoughtcrime.securesms.lock.v2.CreateKbsPinActivity
import org.thoughtcrime.securesms.lock.v2.KbsConstants
import org.thoughtcrime.securesms.lock.v2.PinKeyboardType
import org.thoughtcrime.securesms.pin.RegistrationLockV2Dialog
import org.thoughtcrime.securesms.util.FeatureFlags
import org.thoughtcrime.securesms.util.ViewUtil
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
import org.thoughtcrime.securesms.util.navigation.safeNavigate
Expand Down Expand Up @@ -122,14 +121,12 @@ class AccountSettingsFragment : DSLSettingsFragment(R.string.AccountSettingsFrag
}
)

if (FeatureFlags.exportAccountData()) {
clickPref(
title = DSLSettingsText.from(R.string.AccountSettingsFragment__request_account_data),
onClick = {
Navigation.findNavController(requireView()).safeNavigate(R.id.action_accountSettingsFragment_to_exportAccountFragment)
}
)
}
clickPref(
title = DSLSettingsText.from(R.string.AccountSettingsFragment__request_account_data),
onClick = {
Navigation.findNavController(requireView()).safeNavigate(R.id.action_accountSettingsFragment_to_exportAccountFragment)
}
)

clickPref(
title = DSLSettingsText.from(R.string.preferences__delete_account, ContextCompat.getColor(requireContext(), R.color.signal_alert_primary)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public final class FeatureFlags {
private static final String ANY_ADDRESS_PORTS_KILL_SWITCH = "android.calling.fieldTrial.anyAddressPortsKillSwitch";
private static final String CALLS_TAB = "android.calls.tab";
private static final String TEXT_FORMATTING_SPOILER_SEND = "android.textFormatting.spoilerSend";
private static final String EXPORT_ACCOUNT_DATA = "android.exportAccountData";
private static final String AD_HOC_CALLING = "android.calling.ad.hoc";

/**
Expand Down Expand Up @@ -168,8 +167,7 @@ public final class FeatureFlags {
TEXT_FORMATTING,
ANY_ADDRESS_PORTS_KILL_SWITCH,
CALLS_TAB,
TEXT_FORMATTING_SPOILER_SEND,
EXPORT_ACCOUNT_DATA
TEXT_FORMATTING_SPOILER_SEND
);

@VisibleForTesting
Expand Down Expand Up @@ -607,13 +605,6 @@ public static boolean callsTab() {
return getBoolean(CALLS_TAB, false);
}

/**
* Whether or not the ability to export account data is enabled
*/
public static boolean exportAccountData() {
return getBoolean(EXPORT_ACCOUNT_DATA, false);
}

/**
* Whether or not ad-hoc calling is enabled
*/
Expand Down

0 comments on commit ef058a1

Please sign in to comment.