Explain size limit for large attachments in toasts.

// FREEBIE

Fixes #2100
Closes #2172
This commit is contained in:
Aaron M Brown 2014-12-01 21:06:17 -08:00 committed by Moxie Marlinspike
parent bbea017d5a
commit a09e0afbd6
3 changed files with 7 additions and 5 deletions

View file

@ -89,8 +89,8 @@
<string name="ConversationActivity_select_contact_info">Select contact info</string>
<string name="ConversationActivity_compose_message">Compose message</string>
<string name="ConversationActivity_sorry_there_was_an_error_setting_your_attachment">Sorry, there was an error setting your attachment.</string>
<string name="ConversationActivity_sorry_the_selected_video_exceeds_message_size_restrictions">Sorry, the selected video exceeds message size restrictions.</string>
<string name="ConversationActivity_sorry_the_selected_audio_exceeds_message_size_restrictions">Sorry, the selected audio exceeds message size restrictions.</string>
<string name="ConversationActivity_sorry_the_selected_video_exceeds_message_size_restrictions">Sorry, the selected video exceeds message size restrictions (%1$skB).</string>
<string name="ConversationActivity_sorry_the_selected_audio_exceeds_message_size_restrictions">Sorry, the selected audio exceeds message size restrictions (%1$skB).</string>
<string name="ConversationActivity_recipient_is_not_a_valid_sms_or_email_address_exclamation">Recipient is not a valid SMS or email address!</string>
<string name="ConversationActivity_message_is_empty_exclamation">Message is empty!</string>
<string name="ConversationActivity_group_conversation_recipients">Group conversation recipients</string>

View file

@ -827,7 +827,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Log.w("ComposeMessageActivity", e);
} catch (MediaTooLargeException e) {
attachmentManager.clear();
Toast.makeText(this, R.string.ConversationActivity_sorry_the_selected_video_exceeds_message_size_restrictions,
Toast.makeText(this, getString(R.string.ConversationActivity_sorry_the_selected_video_exceeds_message_size_restrictions,
(Slide.MAX_MESSAGE_SIZE/1024)),
Toast.LENGTH_LONG).show();
Log.w("ComposeMessageActivity", e);
}
@ -843,7 +844,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
Log.w("ComposeMessageActivity", e);
} catch (MediaTooLargeException e) {
attachmentManager.clear();
Toast.makeText(this, R.string.ConversationActivity_sorry_the_selected_audio_exceeds_message_size_restrictions,
Toast.makeText(this, getString(R.string.ConversationActivity_sorry_the_selected_audio_exceeds_message_size_restrictions,
(Slide.MAX_MESSAGE_SIZE/1024)),
Toast.LENGTH_LONG).show();
Log.w("ComposeMessageActivity", e);
}

View file

@ -39,7 +39,7 @@ import ws.com.google.android.mms.pdu.PduPart;
public abstract class Slide {
protected static final int MAX_MESSAGE_SIZE = 280 * 1024;
public static final int MAX_MESSAGE_SIZE = 280 * 1024;
protected final PduPart part;
protected final Context context;