mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Update copy and behavior of SMS phased removal flow.
This commit is contained in:
@@ -14,7 +14,6 @@ import org.thoughtcrime.securesms.components.settings.app.chats.sms.SmsExportSta
|
||||
import org.thoughtcrime.securesms.components.settings.configure
|
||||
import org.thoughtcrime.securesms.exporter.flow.SmsExportActivity
|
||||
import org.thoughtcrime.securesms.exporter.flow.SmsExportDialogs
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
|
||||
@@ -46,7 +45,7 @@ class ChatsSettingsFragment : DSLSettingsFragment(R.string.preferences_chats__ch
|
||||
private fun getConfiguration(state: ChatsSettingsState): DSLConfiguration {
|
||||
return configure {
|
||||
|
||||
if (!state.useAsDefaultSmsApp && SignalStore.misc().smsExportPhase.isAtLeastPhase1()) {
|
||||
if (!state.useAsDefaultSmsApp) {
|
||||
when (state.smsExportState) {
|
||||
SmsExportState.FETCHING -> Unit
|
||||
SmsExportState.HAS_UNEXPORTED_MESSAGES -> {
|
||||
|
||||
@@ -18,8 +18,6 @@ import org.thoughtcrime.securesms.components.settings.models.OutlinedLearnMore
|
||||
import org.thoughtcrime.securesms.exporter.flow.SmsExportActivity
|
||||
import org.thoughtcrime.securesms.exporter.flow.SmsExportDialogs
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.keyvalue.SmsExportPhase
|
||||
import org.thoughtcrime.securesms.util.SmsUtil
|
||||
import org.thoughtcrime.securesms.util.Util
|
||||
import org.thoughtcrime.securesms.util.adapter.mapping.MappingAdapter
|
||||
|
||||
@@ -56,16 +54,14 @@ class SmsSettingsFragment : DSLSettingsFragment(R.string.preferences__sms_mms) {
|
||||
SignalStore.settings().setDefaultSms(true)
|
||||
} else {
|
||||
SignalStore.settings().setDefaultSms(false)
|
||||
if (SignalStore.misc().smsExportPhase.isAtLeastPhase1()) {
|
||||
findNavController().navigateUp()
|
||||
}
|
||||
findNavController().navigateUp()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getConfiguration(state: SmsSettingsState): DSLConfiguration {
|
||||
return configure {
|
||||
|
||||
if (state.useAsDefaultSmsApp && SignalStore.misc().smsExportPhase.isAtLeastPhase1()) {
|
||||
if (state.useAsDefaultSmsApp) {
|
||||
customPref(
|
||||
OutlinedLearnMore.Model(
|
||||
summary = DSLSettingsText.from(R.string.SmsSettingsFragment__sms_support_will_be_removed_soon_to_focus_on_encrypted_messaging),
|
||||
@@ -112,17 +108,13 @@ class SmsSettingsFragment : DSLSettingsFragment(R.string.preferences__sms_mms) {
|
||||
SmsExportState.NOT_AVAILABLE -> Unit
|
||||
}
|
||||
|
||||
if (state.useAsDefaultSmsApp || SignalStore.misc().smsExportPhase == SmsExportPhase.PHASE_0) {
|
||||
if (state.useAsDefaultSmsApp) {
|
||||
@Suppress("DEPRECATION")
|
||||
clickPref(
|
||||
title = DSLSettingsText.from(R.string.SmsSettingsFragment__use_as_default_sms_app),
|
||||
summary = DSLSettingsText.from(if (state.useAsDefaultSmsApp) R.string.arrays__enabled else R.string.arrays__disabled),
|
||||
summary = DSLSettingsText.from(R.string.arrays__enabled),
|
||||
onClick = {
|
||||
if (state.useAsDefaultSmsApp) {
|
||||
startDefaultAppSelectionIntent()
|
||||
} else {
|
||||
startActivityForResult(SmsUtil.getSmsRoleIntent(requireContext()), SMS_REQUEST_CODE.toInt())
|
||||
}
|
||||
startDefaultAppSelectionIntent()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,17 +5,12 @@ import io.reactivex.rxjava3.core.Single
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import org.thoughtcrime.securesms.database.MessageTable
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
|
||||
class SmsSettingsRepository(
|
||||
private val smsDatabase: MessageTable = SignalDatabase.messages,
|
||||
private val mmsDatabase: MessageTable = SignalDatabase.messages
|
||||
) {
|
||||
fun getSmsExportState(): Single<SmsExportState> {
|
||||
if (!FeatureFlags.smsExporter()) {
|
||||
return Single.just(SmsExportState.NOT_AVAILABLE)
|
||||
}
|
||||
|
||||
return Single.fromCallable {
|
||||
checkInsecureMessageCount() ?: checkUnexportedInsecureMessageCount()
|
||||
}.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -2747,13 +2747,7 @@ public class ConversationParentFragment extends Fragment
|
||||
MaterialButton actionButton = smsExportStub.get().findViewById(R.id.export_sms_button);
|
||||
boolean isPhase1 = SignalStore.misc().getSmsExportPhase() == SmsExportPhase.PHASE_1;
|
||||
|
||||
if (SignalStore.misc().getSmsExportPhase() == SmsExportPhase.PHASE_0) {
|
||||
message.setText(getString(R.string.NewConversationActivity__s_is_not_a_signal_user, recipient.getDisplayName(requireContext())));
|
||||
actionButton.setText(R.string.conversation_activity__enable_signal_for_sms);
|
||||
actionButton.setOnClickListener(v -> {
|
||||
handleMakeDefaultSms();
|
||||
});
|
||||
} else if (conversationSecurityInfo.getHasUnexportedInsecureMessages()) {
|
||||
if (conversationSecurityInfo.getHasUnexportedInsecureMessages()) {
|
||||
message.setText(isPhase1 ? R.string.ConversationActivity__sms_messaging_is_currently_disabled_you_can_export_your_messages_to_another_app_on_your_phone
|
||||
: R.string.ConversationActivity__sms_messaging_is_no_longer_supported_in_signal_you_can_export_your_messages_to_another_app_on_your_phone);
|
||||
actionButton.setText(R.string.ConversationActivity__export_sms_messages);
|
||||
|
||||
@@ -444,9 +444,7 @@ public class ConversationViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
public void insertSmsExportUpdateEvent(@NonNull Recipient recipient) {
|
||||
if (SignalStore.misc().getSmsExportPhase().isAtLeastPhase1()) {
|
||||
conversationRepository.insertSmsExportUpdateEvent(recipient);
|
||||
}
|
||||
conversationRepository.insertSmsExportUpdateEvent(recipient);
|
||||
}
|
||||
|
||||
enum Event {
|
||||
|
||||
@@ -220,7 +220,8 @@ final class MenuState {
|
||||
messageRecord.isChangeNumber() ||
|
||||
messageRecord.isBoostRequest() ||
|
||||
messageRecord.isPaymentsRequestToActivate() ||
|
||||
messageRecord.isPaymentsActivated();
|
||||
messageRecord.isPaymentsActivated() ||
|
||||
messageRecord.isSmsExportType();
|
||||
}
|
||||
|
||||
private final static class Builder {
|
||||
|
||||
@@ -29,7 +29,7 @@ class SmsExportActivity : FragmentWrapperActivity() {
|
||||
super.onCreate(savedInstanceState, ready)
|
||||
onBackPressedDispatcher.addCallback(this, OnBackPressed())
|
||||
|
||||
val factory = SmsExportViewModel.Factory(intent.getBooleanExtra(IS_RE_EXPORT, false))
|
||||
val factory = SmsExportViewModel.Factory(intent.getBooleanExtra(IS_FROM_MEGAPHONE, false), intent.getBooleanExtra(IS_RE_EXPORT, false))
|
||||
viewModel = ViewModelProvider(this, factory).get(SmsExportViewModel::class.java)
|
||||
}
|
||||
|
||||
@@ -46,13 +46,15 @@ class SmsExportActivity : FragmentWrapperActivity() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val IS_RE_EXPORT = "is_re_export"
|
||||
private const val IS_RE_EXPORT = "is_re_export"
|
||||
private const val IS_FROM_MEGAPHONE = "is_from_megaphone"
|
||||
|
||||
@JvmOverloads
|
||||
@JvmStatic
|
||||
fun createIntent(context: Context, isReExport: Boolean = false): Intent {
|
||||
fun createIntent(context: Context, isFromMegaphone: Boolean = false, isReExport: Boolean = false): Intent {
|
||||
return Intent(context, SmsExportActivity::class.java).apply {
|
||||
putExtra(IS_RE_EXPORT, isReExport)
|
||||
putExtra(IS_FROM_MEGAPHONE, isFromMegaphone)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ import androidx.lifecycle.ViewModelProvider
|
||||
*
|
||||
* Note: Will be expanded on eventually to support different behavior when entering via megaphone.
|
||||
*/
|
||||
class SmsExportViewModel(val isReExport: Boolean) : ViewModel() {
|
||||
class Factory(private val isReExport: Boolean) : ViewModelProvider.Factory {
|
||||
class SmsExportViewModel(val isFromMegaphone: Boolean, val isReExport: Boolean) : ViewModel() {
|
||||
class Factory(private val isFromMegaphone: Boolean, private val isReExport: Boolean) : ViewModelProvider.Factory {
|
||||
override fun <T : ViewModel> create(modelClass: Class<T>): T {
|
||||
return requireNotNull(modelClass.cast(SmsExportViewModel(isReExport)))
|
||||
return requireNotNull(modelClass.cast(SmsExportViewModel(isFromMegaphone, isReExport)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package org.thoughtcrime.securesms.exporter.flow
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import org.thoughtcrime.securesms.LoggingFragment
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.databinding.SmsRemovalInformationFragmentBinding
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.navigation.safeNavigate
|
||||
|
||||
/**
|
||||
* Fragment shown when entering the sms export flow from the basic megaphone.
|
||||
*
|
||||
* Layout shared with full screen megaphones for Phase 2/3.
|
||||
*/
|
||||
class SmsRemovalInformationFragment : LoggingFragment() {
|
||||
private val viewModel: SmsExportViewModel by activityViewModels()
|
||||
|
||||
private lateinit var binding: SmsRemovalInformationFragmentBinding
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
binding = SmsRemovalInformationFragmentBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
if (!viewModel.isFromMegaphone) {
|
||||
findNavController().safeNavigate(SmsRemovalInformationFragmentDirections.actionSmsRemovalInformationFragmentToExportYourSmsMessagesFragment())
|
||||
} else {
|
||||
val goBackClickListener = { _: View ->
|
||||
if (!findNavController().popBackStack()) {
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
|
||||
binding.toolbar.setNavigationOnClickListener(goBackClickListener)
|
||||
binding.laterButton.setOnClickListener(goBackClickListener)
|
||||
|
||||
binding.learnMoreButton.setOnClickListener {
|
||||
CommunicationActions.openBrowserLink(requireContext(), getString(R.string.sms_export_url))
|
||||
}
|
||||
|
||||
binding.exportSmsButton.setOnClickListener {
|
||||
findNavController().safeNavigate(SmsRemovalInformationFragmentDirections.actionSmsRemovalInformationFragmentToExportYourSmsMessagesFragment())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,8 +128,7 @@ public class AddGroupDetailsFragment extends LoggingFragment {
|
||||
viewModel.getIsMms().observe(getViewLifecycleOwner(), isMms -> {
|
||||
disappearingMessagesRow.setVisibility(isMms ? View.GONE : View.VISIBLE);
|
||||
mmsWarning.setVisibility(isMms ? View.VISIBLE : View.GONE);
|
||||
mmsWarningText.setText(SignalStore.misc().getSmsExportPhase().isAtLeastPhase1() ? R.string.AddGroupDetailsFragment__youve_selected_a_contact_that_doesnt_support_signal_groups_mms_removal
|
||||
: R.string.AddGroupDetailsFragment__youve_selected_a_contact_that_doesnt_support);
|
||||
mmsWarningText.setText(R.string.AddGroupDetailsFragment__youve_selected_a_contact_that_doesnt_support_signal_groups_mms_removal);
|
||||
name.setHint(isMms ? R.string.AddGroupDetailsFragment__group_name_optional : R.string.AddGroupDetailsFragment__group_name_required);
|
||||
toolbar.setTitle(isMms ? R.string.AddGroupDetailsFragment__create_group : R.string.AddGroupDetailsFragment__name_this_group);
|
||||
});
|
||||
|
||||
@@ -232,6 +232,8 @@ public final class MiscellaneousValues extends SignalStoreValues {
|
||||
}
|
||||
|
||||
public @NonNull SmsExportPhase getSmsExportPhase() {
|
||||
return SmsExportPhase.PHASE_0;
|
||||
long now = System.currentTimeMillis();
|
||||
long phase1StartMs = getLong(SMS_PHASE_1_START_MS, now);
|
||||
return SmsExportPhase.getCurrentPhase(now - phase1StartMs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,12 @@ import org.thoughtcrime.securesms.util.Util
|
||||
import kotlin.time.Duration.Companion.days
|
||||
|
||||
enum class SmsExportPhase(val duration: Long) {
|
||||
PHASE_0(-1),
|
||||
PHASE_1(0.days.inWholeMilliseconds),
|
||||
PHASE_2(45.days.inWholeMilliseconds),
|
||||
PHASE_3(105.days.inWholeMilliseconds);
|
||||
|
||||
fun allowSmsFeatures(): Boolean {
|
||||
return this == PHASE_0 || (Util.isDefaultSmsProvider(ApplicationDependencies.getApplication()) && SignalStore.misc().smsExportPhase.isSmsSupported())
|
||||
return Util.isDefaultSmsProvider(ApplicationDependencies.getApplication()) && SignalStore.misc().smsExportPhase.isSmsSupported()
|
||||
}
|
||||
|
||||
fun isSmsSupported(): Boolean {
|
||||
@@ -26,10 +25,6 @@ enum class SmsExportPhase(val duration: Long) {
|
||||
return this == PHASE_3
|
||||
}
|
||||
|
||||
fun isAtLeastPhase1(): Boolean {
|
||||
return this.ordinal >= PHASE_1.ordinal
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun getCurrentPhase(duration: Long): SmsExportPhase {
|
||||
|
||||
@@ -362,14 +362,15 @@ public final class Megaphones {
|
||||
private static @NonNull Megaphone buildSmsExportMegaphone(@NonNull Context context) {
|
||||
SmsExportPhase phase = SignalStore.misc().getSmsExportPhase();
|
||||
|
||||
if (phase == SmsExportPhase.PHASE_0) {
|
||||
throw new AssertionError("Should not be showing megaphone for Phase 0");
|
||||
} else if (phase == SmsExportPhase.PHASE_1) {
|
||||
if (phase == SmsExportPhase.PHASE_1) {
|
||||
return new Megaphone.Builder(Event.SMS_EXPORT, Megaphone.Style.BASIC)
|
||||
.setTitle(R.string.SmsExportMegaphone__sms_support_going_away)
|
||||
.setImage(R.drawable.sms_megaphone)
|
||||
.setBody(R.string.SmsExportMegaphone__sms_support_will_be_removed_soon_to_focus_on_encrypted_messaging)
|
||||
.setActionButton(R.string.SmsExportMegaphone__export_sms, (megaphone, controller) -> controller.onMegaphoneNavigationRequested(SmsExportActivity.createIntent(context), SmsExportMegaphoneActivity.REQUEST_CODE))
|
||||
.setBody(R.string.SmsExportMegaphone__dont_worry_encrypted_signal_messages_will_continue_to_work)
|
||||
.setActionButton(R.string.SmsExportMegaphone__continue, (megaphone, controller) -> {
|
||||
controller.onMegaphoneSnooze(Event.SMS_EXPORT);
|
||||
controller.onMegaphoneNavigationRequested(SmsExportActivity.createIntent(context, true), SmsExportMegaphoneActivity.REQUEST_CODE);
|
||||
})
|
||||
.setSecondaryButton(R.string.Megaphones_remind_me_later, (megaphone, controller) -> controller.onMegaphoneSnooze(Event.SMS_EXPORT))
|
||||
.setOnVisibleListener((megaphone, controller) -> SignalStore.misc().startSmsPhase1())
|
||||
.build();
|
||||
|
||||
@@ -7,13 +7,14 @@ import androidx.activity.result.ActivityResultLauncher
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import org.thoughtcrime.securesms.PassphraseRequiredActivity
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.databinding.SmsExportMegaphoneActivityBinding
|
||||
import org.thoughtcrime.securesms.databinding.SmsRemovalInformationFragmentBinding
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.exporter.flow.SmsExportActivity
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.util.CommunicationActions
|
||||
import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme
|
||||
import org.thoughtcrime.securesms.util.DynamicTheme
|
||||
import org.thoughtcrime.securesms.util.visible
|
||||
|
||||
class SmsExportMegaphoneActivity : PassphraseRequiredActivity() {
|
||||
|
||||
@@ -22,7 +23,7 @@ class SmsExportMegaphoneActivity : PassphraseRequiredActivity() {
|
||||
}
|
||||
|
||||
private val theme: DynamicTheme = DynamicNoActionBarTheme()
|
||||
private lateinit var binding: SmsExportMegaphoneActivityBinding
|
||||
private lateinit var binding: SmsRemovalInformationFragmentBinding
|
||||
private lateinit var smsExportLauncher: ActivityResultLauncher<Intent>
|
||||
|
||||
override fun onPreCreate() {
|
||||
@@ -30,7 +31,7 @@ class SmsExportMegaphoneActivity : PassphraseRequiredActivity() {
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?, ready: Boolean) {
|
||||
binding = SmsExportMegaphoneActivityBinding.inflate(layoutInflater)
|
||||
binding = SmsRemovalInformationFragmentBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
smsExportLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
|
||||
@@ -43,26 +44,22 @@ class SmsExportMegaphoneActivity : PassphraseRequiredActivity() {
|
||||
|
||||
binding.toolbar.setNavigationOnClickListener { onBackPressed() }
|
||||
|
||||
binding.learnMoreButton.setOnClickListener {
|
||||
CommunicationActions.openBrowserLink(this, getString(R.string.sms_export_url))
|
||||
}
|
||||
|
||||
if (SignalStore.misc().smsExportPhase.isBlockingUi()) {
|
||||
binding.headline.setText(R.string.SmsExportMegaphoneActivity__signal_no_longer_supports_sms)
|
||||
binding.description.setText(R.string.SmsExportMegaphoneActivity__signal_has_removed_support_for_sending_sms_messages)
|
||||
binding.description.setLearnMoreVisible(false)
|
||||
binding.laterButton.setText(R.string.SmsExportMegaphoneActivity__learn_more)
|
||||
binding.laterButton.setOnClickListener {
|
||||
CommunicationActions.openBrowserLink(this, getString(R.string.sms_export_url))
|
||||
}
|
||||
binding.laterButton.visible = false
|
||||
binding.bullet1Text.setText(R.string.SmsRemoval_info_bullet_1_phase_3)
|
||||
} else {
|
||||
binding.headline.setText(R.string.SmsExportMegaphoneActivity__signal_will_no_longer_support_sms)
|
||||
binding.description.setText(R.string.SmsExportMegaphoneActivity__signal_will_soon_remove_support_for_sending_sms_messages)
|
||||
binding.description.setLearnMoreVisible(true)
|
||||
binding.description.setLink(getString(R.string.sms_export_url))
|
||||
binding.laterButton.setText(R.string.SmsExportMegaphoneActivity__remind_me_later)
|
||||
binding.laterButton.setOnClickListener {
|
||||
onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
binding.exportButton.setOnClickListener {
|
||||
binding.exportSmsButton.setOnClickListener {
|
||||
smsExportLauncher.launch(SmsExportActivity.createIntent(this))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import androidx.annotation.WorkerThread
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
import org.thoughtcrime.securesms.keyvalue.SmsExportPhase
|
||||
import org.thoughtcrime.securesms.util.Util
|
||||
import kotlin.time.Duration.Companion.days
|
||||
|
||||
class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedule {
|
||||
@@ -18,9 +19,8 @@ class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedul
|
||||
|
||||
@WorkerThread
|
||||
override fun shouldDisplay(seenCount: Int, lastSeen: Long, firstVisible: Long, currentTime: Long): Boolean {
|
||||
return if (shouldShowMegaphone()) {
|
||||
return if (Util.isDefaultSmsProvider(context)) {
|
||||
when (SignalStore.misc().smsExportPhase) {
|
||||
SmsExportPhase.PHASE_0 -> false
|
||||
SmsExportPhase.PHASE_1 -> basicMegaphoneSchedule.shouldDisplay(seenCount, lastSeen, firstVisible, currentTime)
|
||||
SmsExportPhase.PHASE_2 -> fullScreenSchedule.shouldDisplay(seenCount, lastSeen, firstVisible, currentTime)
|
||||
SmsExportPhase.PHASE_3 -> showPhase3Megaphone
|
||||
@@ -29,9 +29,4 @@ class SmsExportReminderSchedule(private val context: Context) : MegaphoneSchedul
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
private fun shouldShowMegaphone(): Boolean {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ public final class FeatureFlags {
|
||||
private static final String CAMERAX_MODEL_BLOCKLIST = "android.cameraXModelBlockList";
|
||||
private static final String CAMERAX_MIXED_MODEL_BLOCKLIST = "android.cameraXMixedModelBlockList";
|
||||
private static final String RECIPIENT_MERGE_V2 = "android.recipientMergeV2";
|
||||
private static final String SMS_EXPORTER = "android.sms.exporter.2";
|
||||
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";
|
||||
@@ -150,7 +149,6 @@ public final class FeatureFlags {
|
||||
CAMERAX_MODEL_BLOCKLIST,
|
||||
CAMERAX_MIXED_MODEL_BLOCKLIST,
|
||||
RECIPIENT_MERGE_V2,
|
||||
SMS_EXPORTER,
|
||||
HIDE_CONTACTS,
|
||||
CREDIT_CARD_PAYMENTS,
|
||||
PAYMENTS_REQUEST_ACTIVATE_FLOW,
|
||||
@@ -495,16 +493,6 @@ public final class FeatureFlags {
|
||||
return getInteger(STORIES_AUTO_DOWNLOAD_MAXIMUM, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not we should enable the SMS exporter
|
||||
*
|
||||
* WARNING: This feature is under active development and is off for a reason. The exporter writes messages out to your
|
||||
* system SMS / MMS database, and hasn't been adequately tested for public use. Don't enable this. You've been warned.
|
||||
*/
|
||||
public static boolean smsExporter() {
|
||||
return getBoolean(SMS_EXPORTER, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not users can hide contacts.
|
||||
*
|
||||
|
||||
24
app/src/main/res/drawable-night/sms_small_encrypted.xml
Normal file
24
app/src/main/res/drawable-night/sms_small_encrypted.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="57dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="57">
|
||||
<path
|
||||
android:pathData="M17,3C11.477,3 7,7.477 7,13v20c0,5.185 3.947,9.449 9,9.95v8.222c0,1.781 2.154,2.674 3.414,1.414L29,43h8c5.523,0 10,-4.477 10,-10V13c0,-5.523 -4.477,-10 -10,-10H17Z"
|
||||
android:fillColor="#1B1C1F"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M4,13C4,5.82 9.82,0 17,0h20c7.18,0 13,5.82 13,13v20c0,7.18 -5.82,13 -13,13h-6.757l-8.707,8.707c-3.15,3.15 -8.536,0.92 -8.536,-3.535v-5.8C7.777,43.685 4,38.785 4,33L4,13ZM16,42.95c-5.053,-0.501 -9,-4.765 -9,-9.95L7,13C7,7.477 11.477,3 17,3h20c5.523,0 10,4.477 10,10v20c0,5.523 -4.477,10 -10,10h-8l-9.586,9.586c-1.26,1.26 -3.414,0.367 -3.414,-1.414L16,42.95Z"
|
||||
android:fillColor="#5C5E65"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M44,42m-12,0a12,12 0,1 1,24 0a12,12 0,1 1,-24 0"
|
||||
android:fillColor="#4CAF50"/>
|
||||
<path
|
||||
android:pathData="M49.15,36.866a0.75,0.75 0,0 1,0.234 1.035l-6,9.5a0.75,0.75 0,0 1,-1.226 0.06l-3.5,-4.5a0.75,0.75 0,1 1,1.184 -0.922l2.844,3.657 5.43,-8.596a0.75,0.75 0,0 1,1.035 -0.234Z"
|
||||
android:fillColor="#D2EBD3"/>
|
||||
<path
|
||||
android:pathData="M27,11.75A5.25,5.25 0,0 0,21.75 17v3.469a3.5,3.5 0,0 0,-1.369 1.442C20,22.66 20,23.64 20,25.6v1.8c0,1.96 0,2.94 0.381,3.689a3.5,3.5 0,0 0,1.53 1.53C22.66,33 23.64,33 25.6,33h2.8c1.96,0 2.94,0 3.689,-0.382a3.5,3.5 0,0 0,1.53 -1.529C34,30.34 34,29.36 34,27.4v-1.8c0,-1.96 0,-2.94 -0.382,-3.689a3.5,3.5 0,0 0,-1.368 -1.442L32.25,17c0,-2.9 -2.35,-5.25 -5.25,-5.25ZM29.75,20.007L29.75,17a2.75,2.75 0,1 0,-5.5 0v3.007C24.642,20 25.087,20 25.6,20h2.8c0.513,0 0.958,0 1.35,0.007ZM28,26.687a1.75,1.75 0,1 0,-2 0L26,28.5a1,1 0,1 0,2 0v-1.814Z"
|
||||
android:fillColor="#6191F3"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
23
app/src/main/res/drawable-night/sms_small_export.xml
Normal file
23
app/src/main/res/drawable-night/sms_small_export.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="56dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="56">
|
||||
<path
|
||||
android:pathData="M8,7a4,4 0,0 1,4 -4h16a4,4 0,0 1,4 4v34a4,4 0,0 1,-4 4H12a4,4 0,0 1,-4 -4V7Z"
|
||||
android:fillColor="#1B1C1F"/>
|
||||
<path
|
||||
android:pathData="M12,0h16a7,7 0,0 1,7 7v34a7,7 0,0 1,-7 7L12,48a7,7 0,0 1,-7 -7L5,7a7,7 0,0 1,7 -7ZM12,3a4,4 0,0 0,-4 4v34a4,4 0,0 0,4 4h16a4,4 0,0 0,4 -4L32,7a4,4 0,0 0,-4 -4L12,3Z"
|
||||
android:fillColor="#5C5E65"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M24,15a4,4 0,0 1,4 -4h16a4,4 0,0 1,4 4v34a4,4 0,0 1,-4 4H28a4,4 0,0 1,-4 -4V15Z"
|
||||
android:fillColor="#1B1C1F"/>
|
||||
<path
|
||||
android:pathData="M28,8h16a7,7 0,0 1,7 7v34a7,7 0,0 1,-7 7L28,56a7,7 0,0 1,-7 -7L21,15a7,7 0,0 1,7 -7ZM28,11a4,4 0,0 0,-4 4v34a4,4 0,0 0,4 4h16a4,4 0,0 0,4 -4L48,15a4,4 0,0 0,-4 -4L28,11Z"
|
||||
android:fillColor="#5C5E65"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="m31.086,31 l-3.293,-3.293a1,1 0,0 1,1.414 -1.414l5,5a1,1 0,0 1,0 1.414l-5,5a1,1 0,0 1,-1.414 -1.414L31.086,33H21.5a8,8 0,0 1,-8 -8v-3a1,1 0,1 1,2 0v3a6,6 0,0 0,6 6h9.586Z"
|
||||
android:fillColor="#6191F3"/>
|
||||
</vector>
|
||||
24
app/src/main/res/drawable-night/sms_small_insecure.xml
Normal file
24
app/src/main/res/drawable-night/sms_small_insecure.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="57dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="57">
|
||||
<path
|
||||
android:pathData="M17,3C11.477,3 7,7.477 7,13v20c0,5.185 3.947,9.449 9,9.95v8.222c0,1.781 2.154,2.674 3.414,1.414L29,43h8c5.523,0 10,-4.477 10,-10V13c0,-5.523 -4.477,-10 -10,-10H17Z"
|
||||
android:fillColor="#1B1C1F"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M4,13C4,5.82 9.82,0 17,0h20c7.18,0 13,5.82 13,13v20c0,7.18 -5.82,13 -13,13h-6.757l-8.707,8.707c-3.15,3.15 -8.536,0.92 -8.536,-3.535v-5.8C7.777,43.685 4,38.785 4,33L4,13ZM16,42.95c-5.053,-0.501 -9,-4.765 -9,-9.95L7,13C7,7.477 11.477,3 17,3h20c5.523,0 10,4.477 10,10v20c0,5.523 -4.477,10 -10,10h-8l-9.586,9.586c-1.26,1.26 -3.414,0.367 -3.414,-1.414L16,42.95Z"
|
||||
android:fillColor="#5C5E65"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M44,42m-12,0a12,12 0,1 1,24 0a12,12 0,1 1,-24 0"
|
||||
android:fillColor="#930006"/>
|
||||
<path
|
||||
android:pathData="M40.53,37.47a0.75,0.75 0,1 0,-1.06 1.06L42.94,42l-3.47,3.47a0.75,0.75 0,1 0,1.06 1.06L44,43.06l3.47,3.47a0.75,0.75 0,1 0,1.06 -1.06L45.06,42l3.47,-3.47a0.75,0.75 0,1 0,-1.06 -1.06L44,40.94l-3.47,-3.47Z"
|
||||
android:fillColor="#FFDAD4"/>
|
||||
<path
|
||||
android:pathData="M32.5,10.75A5.25,5.25 0,0 0,27.25 16v4.007C26.858,20 26.413,20 25.9,20h-2.8c-1.96,0 -2.94,0 -3.689,0.381a3.5,3.5 0,0 0,-1.53 1.53c-0.381,0.749 -0.381,1.729 -0.381,3.689v1.8c0,1.96 0,2.94 0.381,3.689a3.5,3.5 0,0 0,1.53 1.53C20.16,33 21.14,33 23.1,33h2.8c1.96,0 2.94,0 3.689,-0.382a3.5,3.5 0,0 0,1.53 -1.529c0.381,-0.749 0.381,-1.729 0.381,-3.689v-1.8c0,-1.96 0,-2.94 -0.381,-3.689a3.5,3.5 0,0 0,-1.369 -1.442L29.75,16a2.75,2.75 0,1 1,5.5 0v2.5a1.25,1.25 0,1 0,2.5 0L37.75,16c0,-2.9 -2.35,-5.25 -5.25,-5.25ZM25.5,26.686a1.75,1.75 0,1 0,-2 0L23.5,28.5a1,1 0,1 0,2 0v-1.814Z"
|
||||
android:fillColor="#808389"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
24
app/src/main/res/drawable/sms_small_encrypted.xml
Normal file
24
app/src/main/res/drawable/sms_small_encrypted.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="57dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="57">
|
||||
<path
|
||||
android:pathData="M17,3C11.477,3 7,7.477 7,13v20c0,5.185 3.947,9.449 9,9.95v8.222c0,1.781 2.154,2.674 3.414,1.414L29,43h8c5.523,0 10,-4.477 10,-10V13c0,-5.523 -4.477,-10 -10,-10H17Z"
|
||||
android:fillColor="#fff"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M4,13C4,5.82 9.82,0 17,0h20c7.18,0 13,5.82 13,13v20c0,7.18 -5.82,13 -13,13h-6.757l-8.707,8.707c-3.15,3.15 -8.536,0.92 -8.536,-3.535v-5.8C7.777,43.685 4,38.785 4,33L4,13ZM16,42.95c-5.053,-0.501 -9,-4.765 -9,-9.95L7,13C7,7.477 11.477,3 17,3h20c5.523,0 10,4.477 10,10v20c0,5.523 -4.477,10 -10,10h-8l-9.586,9.586c-1.26,1.26 -3.414,0.367 -3.414,-1.414L16,42.95Z"
|
||||
android:fillColor="#D6D9DF"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M44,42m-12,0a12,12 0,1 1,24 0a12,12 0,1 1,-24 0"
|
||||
android:fillColor="#D2EBD3"/>
|
||||
<path
|
||||
android:pathData="M49.15,36.866a0.75,0.75 0,0 1,0.234 1.035l-6,9.5a0.75,0.75 0,0 1,-1.226 0.06l-3.5,-4.5a0.75,0.75 0,1 1,1.184 -0.922l2.844,3.657 5.43,-8.596a0.75,0.75 0,0 1,1.035 -0.234Z"
|
||||
android:fillColor="#4CAF50"/>
|
||||
<path
|
||||
android:pathData="M27,11.75A5.25,5.25 0,0 0,21.75 17v3.469a3.5,3.5 0,0 0,-1.369 1.442C20,22.66 20,23.64 20,25.6v1.8c0,1.96 0,2.94 0.381,3.689a3.5,3.5 0,0 0,1.53 1.53C22.66,33 23.64,33 25.6,33h2.8c1.96,0 2.94,0 3.689,-0.382a3.5,3.5 0,0 0,1.53 -1.529C34,30.34 34,29.36 34,27.4v-1.8c0,-1.96 0,-2.94 -0.382,-3.689a3.5,3.5 0,0 0,-1.368 -1.442L32.25,17c0,-2.9 -2.35,-5.25 -5.25,-5.25ZM29.75,20.007L29.75,17a2.75,2.75 0,1 0,-5.5 0v3.007C24.642,20 25.087,20 25.6,20h2.8c0.513,0 0.958,0 1.35,0.007ZM28,26.687a1.75,1.75 0,1 0,-2 0L26,28.5a1,1 0,1 0,2 0v-1.814Z"
|
||||
android:fillColor="#3A76F0"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
23
app/src/main/res/drawable/sms_small_export.xml
Normal file
23
app/src/main/res/drawable/sms_small_export.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="56dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="56">
|
||||
<path
|
||||
android:pathData="M8,7a4,4 0,0 1,4 -4h16a4,4 0,0 1,4 4v34a4,4 0,0 1,-4 4H12a4,4 0,0 1,-4 -4V7Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M12,0h16a7,7 0,0 1,7 7v34a7,7 0,0 1,-7 7L12,48a7,7 0,0 1,-7 -7L5,7a7,7 0,0 1,7 -7ZM12,3a4,4 0,0 0,-4 4v34a4,4 0,0 0,4 4h16a4,4 0,0 0,4 -4L32,7a4,4 0,0 0,-4 -4L12,3Z"
|
||||
android:fillColor="#D6D9DF"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M24,15a4,4 0,0 1,4 -4h16a4,4 0,0 1,4 4v34a4,4 0,0 1,-4 4H28a4,4 0,0 1,-4 -4V15Z"
|
||||
android:fillColor="#fff"/>
|
||||
<path
|
||||
android:pathData="M28,8h16a7,7 0,0 1,7 7v34a7,7 0,0 1,-7 7L28,56a7,7 0,0 1,-7 -7L21,15a7,7 0,0 1,7 -7ZM28,11a4,4 0,0 0,-4 4v34a4,4 0,0 0,4 4h16a4,4 0,0 0,4 -4L48,15a4,4 0,0 0,-4 -4L28,11Z"
|
||||
android:fillColor="#D6D9DF"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="m31.086,31 l-3.293,-3.293a1,1 0,0 1,1.414 -1.414l5,5a1,1 0,0 1,0 1.414l-5,5a1,1 0,0 1,-1.414 -1.414L31.086,33H21.5a8,8 0,0 1,-8 -8v-3a1,1 0,1 1,2 0v3a6,6 0,0 0,6 6h9.586Z"
|
||||
android:fillColor="#2C6BED"/>
|
||||
</vector>
|
||||
24
app/src/main/res/drawable/sms_small_insecure.xml
Normal file
24
app/src/main/res/drawable/sms_small_insecure.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="56dp"
|
||||
android:height="57dp"
|
||||
android:viewportWidth="56"
|
||||
android:viewportHeight="57">
|
||||
<path
|
||||
android:pathData="M17,3C11.477,3 7,7.477 7,13v20c0,5.185 3.947,9.449 9,9.95v8.222c0,1.781 2.154,2.674 3.414,1.414L29,43h8c5.523,0 10,-4.477 10,-10V13c0,-5.523 -4.477,-10 -10,-10H17Z"
|
||||
android:fillColor="#fff"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M4,13C4,5.82 9.82,0 17,0h20c7.18,0 13,5.82 13,13v20c0,7.18 -5.82,13 -13,13h-6.757l-8.707,8.707c-3.15,3.15 -8.536,0.92 -8.536,-3.535v-5.8C7.777,43.685 4,38.785 4,33L4,13ZM16,42.95c-5.053,-0.501 -9,-4.765 -9,-9.95L7,13C7,7.477 11.477,3 17,3h20c5.523,0 10,4.477 10,10v20c0,5.523 -4.477,10 -10,10h-8l-9.586,9.586c-1.26,1.26 -3.414,0.367 -3.414,-1.414L16,42.95Z"
|
||||
android:fillColor="#D6D9DF"
|
||||
android:fillType="evenOdd"/>
|
||||
<path
|
||||
android:pathData="M44,42m-12,0a12,12 0,1 1,24 0a12,12 0,1 1,-24 0"
|
||||
android:fillColor="#FFDAD4"/>
|
||||
<path
|
||||
android:pathData="M40.53,37.47a0.75,0.75 0,1 0,-1.06 1.06L42.94,42l-3.47,3.47a0.75,0.75 0,1 0,1.06 1.06L44,43.06l3.47,3.47a0.75,0.75 0,1 0,1.06 -1.06L45.06,42l3.47,-3.47a0.75,0.75 0,1 0,-1.06 -1.06L44,40.94l-3.47,-3.47Z"
|
||||
android:fillColor="#BA1B1B"/>
|
||||
<path
|
||||
android:pathData="M32.5,10.75A5.25,5.25 0,0 0,27.25 16v4.007C26.858,20 26.413,20 25.9,20h-2.8c-1.96,0 -2.94,0 -3.689,0.381a3.5,3.5 0,0 0,-1.53 1.53c-0.381,0.749 -0.381,1.729 -0.381,3.689v1.8c0,1.96 0,2.94 0.381,3.689a3.5,3.5 0,0 0,1.53 1.53C20.16,33 21.14,33 23.1,33h2.8c1.96,0 2.94,0 3.689,-0.382a3.5,3.5 0,0 0,1.53 -1.529c0.381,-0.749 0.381,-1.729 0.381,-3.689v-1.8c0,-1.96 0,-2.94 -0.381,-3.689a3.5,3.5 0,0 0,-1.369 -1.442L29.75,16a2.75,2.75 0,1 1,5.5 0v2.5a1.25,1.25 0,1 0,2.5 0L37.75,16c0,-2.9 -2.35,-5.25 -5.25,-5.25ZM25.5,26.686a1.75,1.75 0,1 0,-2 0L23.5,28.5a1,1 0,1 0,2 0v-1.814Z"
|
||||
android:fillColor="#5A5F69"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:minHeight="64dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_arrow_left_24" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:importantForAccessibility="no"
|
||||
android:scaleType="centerInside"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/sms_message" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/Signal.Text.HeadlineLarge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/image"
|
||||
tools:text="SMS Export megaphone title" />
|
||||
|
||||
<org.thoughtcrime.securesms.util.views.LearnMoreTextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center"
|
||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/headline"
|
||||
tools:text="SMS export megaphone body" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/export_button"
|
||||
style="@style/Signal.Widget.Button.Large.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:minWidth="221dp"
|
||||
android:text="@string/SmsExportMegaphoneActivity__export_sms"
|
||||
app:layout_constraintBottom_toTopOf="@+id/later_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/description"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/later_button"
|
||||
style="@style/Signal.Widget.Button.Large.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:minWidth="221dp"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintVertical_bias="1"
|
||||
tools:text="@string/SmsExportMegaphoneActivity__remind_me_later" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
176
app/src/main/res/layout/sms_removal_information_fragment.xml
Normal file
176
app/src/main/res/layout/sms_removal_information_fragment.xml
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:minHeight="64dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:navigationIcon="@drawable/ic_arrow_left_24" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="32dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/headline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/SmsRemoval_title_going_away"
|
||||
android:textAppearance="@style/Signal.Text.HeadlineLarge"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bullet_1"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/headline"
|
||||
app:srcCompat="@drawable/sms_small_insecure" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bullet_1_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="@string/SmsRemoval_info_bullet_1"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bullet_1"
|
||||
app:layout_constraintTop_toBottomOf="@id/headline" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/bullet_1_barrier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:orientation="horizontal"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="bullet_1,bullet_1_text" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bullet_2"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bullet_1_barrier"
|
||||
app:srcCompat="@drawable/sms_small_encrypted" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bullet_2_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="@string/SmsRemoval_info_bullet_2"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bullet_2"
|
||||
app:layout_constraintTop_toBottomOf="@id/bullet_1_barrier" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/bullet_2_barrier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:orientation="horizontal"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="bullet_2,bullet_2_text" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/bullet_3"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bullet_2_barrier"
|
||||
app:srcCompat="@drawable/sms_small_export" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/bullet_3_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="@string/SmsRemoval_info_bullet_3"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/Signal.Text.BodyLarge"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bullet_3"
|
||||
app:layout_constraintTop_toBottomOf="@id/bullet_2_barrier" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/bullet_3_barrier"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:orientation="horizontal"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="bullet_3,bullet_3_text" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/learn_more_button"
|
||||
style="@style/Signal.Widget.Button.Medium.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="@string/LearnMoreTextView_learn_more"
|
||||
android:textColor="@color/signal_colorPrimary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bullet_3_barrier" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/export_sms_button"
|
||||
style="@style/Signal.Widget.Button.Large.Tonal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:minWidth="220dp"
|
||||
android:text="@string/SmsRemoval_export_sms"
|
||||
app:layout_constraintBottom_toTopOf="@+id/later_button"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/learn_more_button"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/later_button"
|
||||
style="@style/Signal.Widget.Button.Large.Secondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:minWidth="221dp"
|
||||
android:text="@string/SmsExportMegaphoneActivity__remind_me_later"
|
||||
android:textColor="@color/signal_colorOnSurfaceVariant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintVertical_bias="1" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
@@ -3,7 +3,22 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/sms_export"
|
||||
app:startDestination="@id/exportYourSmsMessagesFragment">
|
||||
app:startDestination="@id/smsRemovalInformationFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/smsRemovalInformationFragment"
|
||||
android:name="org.thoughtcrime.securesms.exporter.flow.SmsRemovalInformationFragment"
|
||||
tools:layout="@layout/export_your_sms_messages_fragment">
|
||||
<action
|
||||
android:id="@+id/action_smsRemovalInformationFragment_to_exportYourSmsMessagesFragment"
|
||||
app:destination="@id/exportYourSmsMessagesFragment"
|
||||
app:enterAnim="@anim/fragment_open_enter"
|
||||
app:exitAnim="@anim/fragment_open_exit"
|
||||
app:popEnterAnim="@anim/fragment_close_enter"
|
||||
app:popExitAnim="@anim/fragment_close_exit"
|
||||
app:popUpTo="@id/sms_export"
|
||||
app:popUpToInclusive="true" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/exportYourSmsMessagesFragment"
|
||||
|
||||
@@ -5355,9 +5355,9 @@
|
||||
<!-- Phase 1 Small megaphone title indicating sms is going away -->
|
||||
<string name="SmsExportMegaphone__sms_support_going_away">SMS support going away</string>
|
||||
<!-- Phase 1 small megaphone description indicating sms is going away -->
|
||||
<string name="SmsExportMegaphone__sms_support_will_be_removed_soon_to_focus_on_encrypted_messaging">SMS support will be removed soon to focus on encrypted messaging.</string>
|
||||
<string name="SmsExportMegaphone__dont_worry_encrypted_signal_messages_will_continue_to_work">Don’t worry, encrypted Signal messages will continue to work.</string>
|
||||
<!-- Phase 1 small megaphone button that takes the user to the sms export flow -->
|
||||
<string name="SmsExportMegaphone__export_sms">Export SMS</string>
|
||||
<string name="SmsExportMegaphone__continue">Continue</string>
|
||||
<!-- Title for screen shown after sms export has completed -->
|
||||
<string name="ExportSmsCompleteFragment__export_complete">Export Complete</string>
|
||||
<!-- Button to continue to next screen -->
|
||||
@@ -5482,4 +5482,17 @@
|
||||
<!-- Displayed in the "clear filter" item in the chat feed if the user opened the filter from the overflow menu -->
|
||||
<string name="ChatFilter__tip_pull_down">Tip: Pull down on the chat list to filter</string>
|
||||
|
||||
<!-- Title for screen describing that sms support is going to be removed soon -->
|
||||
<string name="SmsRemoval_title_going_away">SMS support is going away</string>
|
||||
<!-- Bullet point message shown on describing screen as first bullet why sms is being removed -->
|
||||
<string name="SmsRemoval_info_bullet_1">SMS messaging in the Signal app will soon no longer be supported.</string>
|
||||
<!-- Bullet point message shown on describing screen as second bullet why sms is being removed -->
|
||||
<string name="SmsRemoval_info_bullet_2">SMS messages are different than Signal messages. <b>This does not affect encrypted Signal messaging which will continue to work.</b></string>
|
||||
<!-- Bullet point message shown on describing screen as third bullet why sms is being removed -->
|
||||
<string name="SmsRemoval_info_bullet_3">You can export your SMS messages and choose a new SMS app.</string>
|
||||
<!-- Bullet point message shown on describing screen as first bullet variant why sms is being removed when user is locked out of sms -->
|
||||
<string name="SmsRemoval_info_bullet_1_phase_3">Signal has removed support for sending SMS messages.</string>
|
||||
<!-- Button label on sms removal info/megaphone to start the export SMS flow -->
|
||||
<string name="SmsRemoval_export_sms">Export SMS</string>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user