Forward port Templates functionality

Change-Id: Ieb9e54249dd512e65f23f32d503d11fba88335ee
Bring back QuickMessage, Unicode stripping, TimeStamps and Add to Calendar

Change-Id: I103195f61b13a83573e7bf8f8a1bf08cb8aacc94
Bring back Split SMS

Change-Id: I8b1ee608a1ca3989462f9a12bad19201309ec16b
Port "Fix cropping on MMS inline thumbnails"

The following patch fixes the cropping that was broken in jellybean. This worked
properly in Ice Cream Sandwich and CM9. It now behaves correctly with this
patch. Here are before and after pictures of both a regular photo and a
panorama.

Photo:
before
http://img62.imageshack.us/img62/3783/beforee.png

after
http://img24.imageshack.us/img24/231/afterwd.png

Panorama:
before
http://img194.imageshack.us/img194/3882/panobefore.png

after
http://img607.imageshack.us/img607/962/panoafter.png

Change-Id: Ie37d09bf46eca4efb7dc0be02dbd971648abd4ca
Mms: Remove text/plain for ACTION_SEND

Always display registered apps for android.intent.action.SEND action, but this is not true.
Actually, it doesn't support that mime/type. Just remove it to avoid unexpected behaviour for
external apps.

See ComposeMessageActivity#addAttachment

Change-Id: I4815a59533dbfc3decfbdbc57bf456ebda3cab7a
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Fix SMS sending.

ACTION_SEND_MESSAGE must be routed through the privileged receiver now,
otherwise it'll be dropped in SmsReceiver.

Change-Id: Ifbe6e222d16053c038ca79a98e6bc837090ea3a3
Fix up receiver declaration.

The intent this receiver listens to is used by the BT MAP implementation
to send out SMS it queued. As the manifest and the
SmsReceiverService.java were in disagreement about the action name, this
didn't work.
Also secure the receiver in the process, it can be used to send out SMS
without having the SEND_SMS permission otherwise.

Change-Id: Ia8d181731baea586865ce3f18fe0864636c2b6f4
Bring back Blacklist support

Change-Id: I85fc96a6e00373e94d8648b8aaa8cf19551f39a7
Allow Mms app to run on non-Blacklist enabled devices

Change-Id: I4fdee513bd6fc5ce04f7a14678c2ce5ce984bede
Fix AAPT warnings

Change-Id: Id791b867bdd0cb07681fa626274480c6316ed061
Mms: Add the ability to select recipients from a checkbox list
When creating a new message you have to write some letters from the
contacts you want to add and select them by clicking on it.

This can be annoying if you want to send your message to several contacts.
With this change you can manually select numbers from contacts and groups
from a checkbox list.

Change-Id: I03681f22a0d949679e2a9cc95c551e4c216b6300
Mms: Bring back layout color abstraction

Change-Id: Id1845ddad8a38a6f2ece7c9531927cb8fc1ab189
Revert "Mms: Remove text/plain for ACTION_SEND"

Per comment from Jorge

Change-Id: Id75275995760136eacb106b5b001fe4ebd3f8310
Mms: fix quick message layout on 320dp

match_parent no longer works properly on 4.4 for some reason, so
we hardcode it to 300dp.

Also cleaned up how 360dp devices are handled to avoid duplicating
layout.

Before: http://imgur.com/UKo4aUL
After: http://i.imgur.com/Eu6WMnm

Change-Id: I722e97ada7a434315d0c603c6eede3e8ed16b1e4
Mms: Option to delay SMS Sending

Add feature to delay SMS sending, user being able to cancel
SMS sending by touching the SMS, until set duration is elapsed.

Follow-up of http://review.cyanogenmod.org/#/c/36178/
    (and http://review.cyanogenmod.org/#/c/35231/) on cm-10.2 branch

Change-Id: I09dd045bde30c19c7552ee57d55a4a9434e98712
Fix Null pointer expection when Phone is in low memory

ThumbnailManager tries to get the bitmap and throws null
pointer exception when cache is null.

Change-Id: Iba557e5d9aa6c0990ee47c79788c4c1c55121c63
CRs-Fixed: 539366
Fix the send button disappearance after selecting the forward recipient

During onRestart method the bottom panel is hidden for the
ComposeMessageActivity.

Change-Id: Ica243945237003a37d0832c556e45c5b43dd0497
CRs-Fixed: 568266
The draft still exists after forwarding mms to the same sender

Forward message will be saved as draft before sent, and it will reload
this draft after come back to the current thread.

Do not load the draft for the same recipient address when forwarding
mms.

Change-Id: I2cc873a9bcbdf0e6481391a0237eb1d19f40d137
CRs-Fixed: 568255
Display message type properly for MMS and SMS

When a message is showed details, android will search it in mms
& sms list according to its message id. But sometime the message
id of sms message is the same with that of mms message and the
special mms message is before the sms message in mms & sms list,
so the sms is displayed as mms.

To fix this bug, message type is to be checked at the same time.

Change-Id: I35f8586bf97a553a53424adb2458a8c7fd9ba0e9
CRs-Fixed: 568258
Resize the image in background

Decoding and resizing of the image is done in
Adapter-getView method which runs in the main
thread. As a result edit screen resumes after
few seconds, mean time if user flings on that
activity it leads to ANR.

From getView method, adopt lazy loading - spawn
the thread which will decode and resize the
image, upon receiving the requested resized-image
set the image to the view.

Change-Id: I7500afc2fcc4fd7bed8f256d19cbc22ee9baeda0
CRs-Fixed: 550421