Permalink
Browse files

Fix force-close when attaching a video too large for MMS

Attaching images and small video is OK but the force-close
popup is showing up instead of "message size limit reached"
popup when attaching a large video.

Change-Id: I1b4885760aec5fb9f44c69524fe8cab18af2b9e8
Signed-off-by: Soojung Shin <sj46.shin@samsung.com>
  • Loading branch information...
1 parent 1149674 commit 038817fffb2fb8045393443cab7392e6114dfc3d Soojung Shin committed with tinyalsa May 25, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/com/android/mms/data/WorkingMessage.java
View
2 src/com/android/mms/data/WorkingMessage.java
@@ -389,7 +389,7 @@ public int setAttachment(int type, Uri dataUri, boolean append) {
}
if (!MmsConfig.getMultipartSmsEnabled()) {
- if (!append && mAttachmentType == TEXT && hasText()) {
+ if (!append && mAttachmentType == TEXT && type == TEXT) {
int[] params = SmsMessage.calculateLength(getText(), false);
/* SmsMessage.calculateLength returns an int[4] with:
* int[0] being the number of SMS's required,

0 comments on commit 038817f

Please sign in to comment.