From a4e18c515c61674dbe04f93fecce2b71c91f840b Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Wed, 11 Mar 2015 14:23:45 -0700 Subject: [PATCH] Remove encrypted SMS transport, simplify transport options. Closes #2647 // FREEBIE --- res/layout/conversation_activity.xml | 4 +- res/layout/outgoing_sms_preference.xml | 53 ----- res/layout/registration_activity.xml | 3 +- res/menu/conversation_insecure_no_push.xml | 13 -- res/values/arrays.xml | 42 ---- res/values/attrs.xml | 3 +- res/values/strings.xml | 29 +-- res/values/themes.xml | 6 +- res/xml/preferences_sms_mms.xml | 4 - .../securesms/AutoInitiateActivity.java | 120 ---------- .../securesms/ConversationActivity.java | 137 +++--------- .../securesms/ConversationItem.java | 76 ++----- .../securesms/ConversationListFragment.java | 6 +- .../securesms/ReceiveKeyActivity.java | 75 ++----- .../securesms/RegistrationActivity.java | 4 +- .../securesms/TransportOption.java | 62 ++++-- .../securesms/TransportOptions.java | 207 +++++++++--------- .../securesms/TransportOptionsAdapter.java | 45 ++-- .../securesms/TransportOptionsPopup.java | 73 ++++++ .../securesms/components/ComposeText.java | 36 +++ .../components/OutgoingSmsPreference.java | 65 ------ .../components/PushRegistrationReminder.java | 17 +- .../securesms/components/ReminderView.java | 6 +- .../securesms/components/SendButton.java | 101 +++++---- .../securesms/contacts/ContactsDatabase.java | 6 +- .../crypto/KeyExchangeInitiator.java | 89 -------- .../securesms/crypto/MmsCipher.java | 134 ------------ .../securesms/crypto/SecurityEvent.java | 4 + .../securesms/crypto/SmsCipher.java | 128 ----------- .../securesms/database/MmsDatabase.java | 5 - .../securesms/database/SmsDatabase.java | 34 +-- .../database/TextSecureDirectory.java | 2 +- .../database/model/MessageRecord.java | 15 +- .../database/model/SmsMessageRecord.java | 5 +- .../securesms/jobs/DirectoryRefreshJob.java | 2 + .../securesms/jobs/MmsDownloadJob.java | 21 +- .../securesms/jobs/MmsSendJob.java | 29 +-- .../securesms/jobs/PushDecryptJob.java | 2 - .../securesms/jobs/PushMediaSendJob.java | 65 ++---- .../securesms/jobs/PushSendJob.java | 37 +--- .../securesms/jobs/PushTextSendJob.java | 78 ++----- .../thoughtcrime/securesms/jobs/SendJob.java | 1 + .../securesms/jobs/SmsDecryptJob.java | 134 +----------- .../securesms/jobs/SmsReceiveJob.java | 13 +- .../securesms/jobs/SmsSendJob.java | 84 +------ .../securesms/mms/MmsSendResult.java | 14 +- .../preferences/SmsMmsPreferenceFragment.java | 73 +----- .../thoughtcrime/securesms/protocol/Tag.java | 33 --- .../sms/IncomingIdentityUpdateMessage.java | 30 --- .../sms/IncomingKeyExchangeMessage.java | 85 ------- .../sms/IncomingPreKeyBundleMessage.java | 3 +- .../securesms/sms/IncomingTextMessage.java | 4 - .../sms/MultipartSmsMessageHandler.java | 100 --------- .../InsecureFallbackApprovalException.java | 3 +- .../SecureFallbackApprovalException.java | 7 - .../util/MmsCharacterCalculator.java | 11 + .../securesms/util/TextSecurePreferences.java | 55 +---- 57 files changed, 541 insertions(+), 1952 deletions(-) delete mode 100644 res/layout/outgoing_sms_preference.xml delete mode 100644 res/menu/conversation_insecure_no_push.xml delete mode 100644 src/org/thoughtcrime/securesms/AutoInitiateActivity.java create mode 100644 src/org/thoughtcrime/securesms/TransportOptionsPopup.java create mode 100644 src/org/thoughtcrime/securesms/components/ComposeText.java delete mode 100644 src/org/thoughtcrime/securesms/components/OutgoingSmsPreference.java delete mode 100644 src/org/thoughtcrime/securesms/crypto/KeyExchangeInitiator.java delete mode 100644 src/org/thoughtcrime/securesms/crypto/MmsCipher.java delete mode 100644 src/org/thoughtcrime/securesms/crypto/SmsCipher.java delete mode 100644 src/org/thoughtcrime/securesms/protocol/Tag.java delete mode 100644 src/org/thoughtcrime/securesms/sms/IncomingIdentityUpdateMessage.java delete mode 100644 src/org/thoughtcrime/securesms/sms/IncomingKeyExchangeMessage.java delete mode 100644 src/org/thoughtcrime/securesms/sms/MultipartSmsMessageHandler.java delete mode 100644 src/org/thoughtcrime/securesms/transport/SecureFallbackApprovalException.java create mode 100644 src/org/thoughtcrime/securesms/util/MmsCharacterCalculator.java diff --git a/res/layout/conversation_activity.xml b/res/layout/conversation_activity.xml index 20668001a9..1e0caef905 100644 --- a/res/layout/conversation_activity.xml +++ b/res/layout/conversation_activity.xml @@ -78,7 +78,7 @@ android:contentDescription="@string/conversation_activity__emoji_toggle_description" android:padding="10dp"/> - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout/registration_activity.xml b/res/layout/registration_activity.xml index 103e2b25f6..5c0b3007e4 100644 --- a/res/layout/registration_activity.xml +++ b/res/layout/registration_activity.xml @@ -77,7 +77,8 @@ android:orientation="horizontal">