Mms: Catch UnsupportContentTypeException

The original code has not catched "Unsupported Content-Type" exception
resulting in force close if an mms containing an unsupported content
type is opened.

Change-Id: I9b578e2fd61ba5df9dbfbe9e6e28fb276ef89666
Author: Haixiong Zheng <haixiong.zheng@borqs.com>
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Bin Yang <bin.y.yang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 5339
Add extra checking for expired mms downloading

Change-Id: If5d995c32aad71695c15a9a2a781d20312416a79
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Mms: Fix javacrash in com.android.mms due to memory leak

when the UriImage resize the picture. It will not close the
InputStream and OutputStream.

Change-Id: I80fa1eb3726308fe75d74357e0b9782759de3393
Author: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Frederic Predon <frederic.predon@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 28037
Mms: Process has stopped after dragging progress

testcase 1> create a slideshow mms and play it. Tap progress bar
                continuously until play finished.
         2> create a slideshow mms and play it. Tap progress bar
                continuously when rotate the screen

We have to set the seek bar change listener to null,otherwise if
the activity stop during tap progress bar continuously, window
will leak.

Change-Id: I206d35b91e04de06c2073c3fb0d9176da6adc81c
Author: Frederic Predon <frederic.predon@intel.com>
Signed-off-by: b533 <b533@borqs.com>
Signed-off-by: Frederic Predon <frederic.predon@intel.com>
Signed-off-by: Bin Yang <bin.y.yang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 28634
Mms: Notify user of Send SMS failure due to FDN

Upon Send SMS failure due to destination number or
service center number not present in the FDN list,
failure is not notified to the MessageNotification.
Due to this Sms remains in Sending state even
after the SMS send has failed.

This patch fixes the issue by notifying the message
failure and also moving the message to respective folder.

Change-Id: I1f8dfe2d9b276c8c6f4d921c2c147a8ef90643e6
Author: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 48558
Add option for waking up the screen when a new SMS/MMS is received

Default is off, option stored in the app settings.

Change-Id: Id3da2656da44e5051d4b36bf064db83faf919b5d
Signed-off-by: Dan Trifan <jimsth@gmail.com>
Signed-off-by: scott <scott@ubuntu.com>

Conflicts:
	res/values/strings.xml
	res/xml/preferences.xml

Conflicts:
	res/values/strings.xml
	res/xml/preferences.xml
Fix one NPE in Mms app

For tablet we usually declare not support mobile_* networkAttributes but ethernet,
wifi,bt in config.xml. this will trigger this NPE.

Change-Id: I761c8514f5569bef1242f9fddc321c0aed564d9e
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
Mms: Device crashes when sending message with attachment.

Need to handle IllegalStateException in addition of the
MMSException when creating draft MMS.

Change-Id: Ieb1618872d7faa472a6fea08c1b3ef1ae0cde183
Author: Jianli Zhang <jianli.zhang@borqs.com>
Signed-off-by: Frederic Predon <frederic.predon@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 7844
Mms: Add a check on the Media model

In case there is no image and no video in the slideshow, the
media model might be null.
Add a check to avoid a null pointer access.

Change-Id: I55d63b226835acfa53199eee0d706b8c5ae553c2
Author: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Frederic Predon <frederic.predon@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 28037
Mms: fix CRASH when the address contains only spaces

Rootcause: If the address contains spaces only,when Mms
format this address,it will get an address string the length
of which is -1. So crash happen when call span(object,0,-1,flag)
function.

Solution: When user press back key to restore the message.
This patch will check the address is valite or not, if it is
invalite,it show a dialog to tell user he can't restore the message.
So it avoid crashing when enter the message again.

Change-Id: Ia847ee6a7c9666376ea6fcc56d18105e6e5474a7
Author: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 56634
Mms: prevent reply text being wiped from QMPopup when new msg arrives

If user starts typing a reply in the QuickMessage Popup, and another msg
arrives, the entered text was wiped. This commit saves the current reply
text, before adding/updating the new message, so that is doesn't get lost

Change-Id: I7aa4a488b233ed7554ec589fae0d615b18e3502c
Mms: Need to hide keyboard when the Popup loses focus

Previous commit, prevented QuickMessage text from disappearing, but was leaving
the keyboard open, so user could continue to type. Unfortunately, the EditText
loses focus (not sure if that can be changed?), so the typed text goes nowhere
and causes confusion.

This commit will hide the keyboard, so user will need to reselect the EditText
field first to redisplay the keyboard and continue typing.

Change-Id: I4869392b16be015ab9a8cd99bf3f95f0e86b74ad
Don't show quick message popup over secure lockscreen.

Doing so allows bypassing the lockscreen.

Change-Id: I8a49395954ba1e50415285531ebe75e2c4343c1c
Mms: fix outgoing call handling on SMS notification

The old code generates ACTION_CALL intents with content uris instead of tel
ones, and this causes the SipCallOptionHandler not to be triggered, forcing
the call to be routed via the mobile network instead of following the user
configuration and potentially asking if SIP should be used.

Old intent:
    D/CallController( 1204): placeCall()...  intent = Intent { act=android.intent.action.CALL dat=content://com.android.contacts/data/phones/12345 (has extras) }

New intent:
    D/CallController( 1204): placeCall()...  intent = Intent { act=android.intent.action.CALL dat=tel:xxxxxxxxxxx-xxxx (has extras) }

Change-Id: Iba0134af51edb092913636ba9f51a6a344acb436
Mms: Clean up delivery report dialog.

Instead of launching another activity just to show the delivery report,
mimic how showMessageDetails works instead, using AlertDialog.Builder.
This ports the dialog over to Holo as well.

Change-Id: Ia7ee549fe7ed9770a70482a042ebbc4bc12bab21
Signed-off-by: angelsl <hidingfromhidden@gmail.com>
Merge branch 'qcril' into cm-10.2

Signed-off-by: scott <scott@ubuntu.com>

Conflicts:
	src/com/android/mms/data/Conversation.java
	src/com/android/mms/transaction/MessagingNotification.java
	src/com/android/mms/transaction/MmsSystemEventReceiver.java
	src/com/android/mms/ui/MessageListItem.java

Change-Id: I40ab95f8405084ca3ded5fa35751cf965643fc6d