Correct attachment type for Mms only has subject

Mark the attachment type of Mms only has subject as TEXT
avoid to show Mms View as untimely

Change-Id: I346ae4af4983e9e8dbe9533eeddef445affc339a
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Check if mmp is null before used

Change-Id: I6ac92c1a829811fd19642a9ee77d6cd9e4d64008
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Check if mmp's encoded subject is null before used

Change-Id: I1de3c83b2b68128f725f8bbaf3d6764b2bdf836b
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Clear collection after we used

Change-Id: Idbec734a2227cb333ed1cc47d64647a9da460e76
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
avoid IllegalStateException in MessagingNotification

If columnIndex is -1, c.getLong(columnIndex) makes IllegalStatementException.
So, the columnIndex should be checked -1 or not before using.

Change-Id: Id0dfffa5159d22dc67d56003b999dce80378736e
Catch OutOfMemoryError for getBitmap.

Change-Id: I85bf682cc98de0f075b4d8d6ec621d56ae559adb
Signed-off-by: Bin Li <libin@marvell.com>
Send mms read report if it is required.

Change-Id: I35be42545f000c51ebe71444ab591c42b33160cc
Signed-off-by: Bin Li <libin@marvell.com>
Enhance Mms connectivity tracker workflow

1. Fix Bug 1691499 by a more appoperiate broadcast
and revert 82f5492b211f51e71c7089eb7779384ff03c0d89.
Broadcast CONNECTIVITY_ACTION is more low-frequencyer
and aproprater than ACTION_ANY_DATA_CONNECTION_STATE_CHANGED.
Root cause of Bug# 1691499 is receiving a high-frequencyer
broatcast and not adding a apropriate filter.

2. Reduce useless duration between hanging up and processing Mmes.
Check mms connectivity is available before retried to connect.

3. Using getNetworkInfo instead of the deprecated one
4. Remove useless codes and make ConnectivityBroadcastReceiver
more readable.

Change-Id: I994d3cccead1e43865c42a24e20021321e140686
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Process inactive msgs if Mms app is relaunched

Try to process all pending transations and queued smses
which maybe killed by user, OOM or Mms crashing and so on
after Mms app is (re)launched.

Since for Mms: Mms app only will retry failed transaction(
must be marked as failed) due to network issue or any known
reason, and for sms: Mms app only rely on SmsDispatcher to
retry to send at most 3 times.

Change-Id: Ifc46d1a86bf33342590313c29d6d4c0aff7c739f
Signed-off-by: Roger Chen <cxr514033970@gmail.com>