Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
fix mms crash when large video file is sent
Browse files Browse the repository at this point in the history
If we try to attach a video with size more than allowed by
CarrierContentRestriction in the Messaging  application
(ComposeMessageActivity), the app crashes since it tries to delete a
message from database with improper URI (null value). Prevent the
deletion of message with null URI in correctAttachmentSize()

Change-Id: Icc08419accc23f13e80376b2078b2494815ee87f

Signed-off-by: Madan Ankapura <mankapur@sta.samsung.com>
  • Loading branch information
Ritu Srivastava authored and Madan Ankapura committed Jan 26, 2011
1 parent eae4b7e commit c975a8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/com/android/mms/data/WorkingMessage.java
Expand Up @@ -234,8 +234,10 @@ private void correctAttachmentState() {
if (slideCount == 0) {
mAttachmentType = TEXT;
mSlideshow = null;
asyncDelete(mMessageUri, null, null);
mMessageUri = null;
if (mMessageUri != null) {
asyncDelete(mMessageUri, null, null);
mMessageUri = null;
}
} else if (slideCount > 1) {
mAttachmentType = SLIDESHOW;
} else {
Expand Down

0 comments on commit c975a8a

Please sign in to comment.