More materialization

Change-Id: I71959e83dc1310674e6a24dbf43e6d8558f51e13
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.

* Added fixes for cm-12 apis

Change-Id: I03681f22a0d949679e2a9cc95c551e4c216b6300
Mms: Run all selection through SelectRecipientsList.

  Instead of having 3 different activities to handle
  local groups, remote contacts, vcard and contact information
  selection, we should setup all selection through a single
  intent.

Change-Id: I65b0ef508f05a229f07daa752ad79b2ae153f26c
Mms: Only retain selected items when choosing recipients.

Change-Id: I2e0993edda2ed823a6430204427fc1c94791e059
Mms: Fix NPE while attaching vcard

Change-Id: I25ba36eaa0b28e9ebc657c3f3f4ab85da741bd7a
Mms: Handle possible null array on sub id.

  In some scenarios (possibly even data corruption), the destPhoneId
  used to retrieve the sub id may not be valid anymore. This can
  happen when an mms fails to be received and handled correctly. Instead
  of leaving user in a broken state (ex: unable to open mms), handle
  the null array and log the error.

  Example trace:

  AndroidRuntime
  E  FATAL EXCEPTION: TransactionService
    E  Process: com.android.mms, PID: 6440
    E  java.lang.NullPointerException: Attempt to read from null array
    E      at com.android.mms.transaction.TransactionService.onNewIntent(TransactionServic
                           e.java:479)
    E      at com.android.mms.transaction.TransactionService$ServiceHandler.handleMessage(
                           TransactionService.java:934)
    E      at android.os.Handler.dispatchMessage(Handler.java:102)
    E      at android.os.Looper.loop(Looper.java:135)
    E      at android.os.HandlerThread.run(HandlerThread.java:61)

Change-Id: I20b32455f294f1fd5a31363fbefd0cc3337461ee
mms: use InternalContactsCount instead of the non-public ContactsCount interface

requires: http://review.cyanogenmod.org/#/c/80954/

Change-Id: I0217d5309678f4e91ecf48be8378175369c03b05
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Mms: No delivery check-mark if both delivery and read report enabled

If read report enabled, it always displays "detail" icon on UI, no
matter what if delivery report or read report enabled.

Change the check-mark avaiable only for delivery report.
If only "read report" enabled, just show "detail" icon instead.

Change-Id: I68306ede310fddc949cd8d2c1df865f634aeae62
CRs-Fixed: 749650
Mms: Fix Can't check delivery report from msg list

Does not have an option for displaying delivery reports.

Add an "delivery report" option at ModeCallback's "check more"
menu in compose messages activity.

CRs-Fixed: 741009

Change-Id: Iac4bf11cf0bcd419f2753ce70dd210d1ed2f3bd9
Mms: Fix will disable "delete old message" when restore default setting

The preferences.xml set the pref_key_auto_delete default value as "false".

Change the pref_key_auto_delete default value to "true".

CRs-Fixed: 745318

Change-Id: I25c4d4a8fadf36c6276fd04092205f68c383b71e
Mms: Fix can not select MMS when attach with audio/video/sildeshow.

The button and item click listener intercept item long touch event.

Make item could get long touch event.

CRs-Fixed: 740060

Change-Id: If2cd10418371e115ec9bf738b4adfacb49d7e544
Mms: Fix can't cancel downloading MMS when tap "OK"in confirm box.

Download state is changed to un-started after canceled MMS, and MMS will
show "Cancel" button both the state of un-started and downloading.

Change download state to transient failure if cancel download.

CRs-Fixed: 743500

Change-Id: I3b9789714b3e7bd4b0f17816bca7fe3f0f1468de
Mms: Fix full subject notification can't prompt if input to limitation

Don't have prompt function when subject is full.

Add prompt function and distinguish Chinese from English.

CRs-Fixed: 745996

Change-Id: I5e9d3152a5f0b5dd4c1427bddc0589cd658cb731
Mms: Fix send icon display gray after delete subject

Not call updateSendButtonState() after delete subject editor.

Call updateSendButtonState() in mSubjectKeyListener.onKey to update
send button state.

CRs-Fixed: 748195

Change-Id: I88d39b6e90439b6bba5cb4f73e6d7c98668e051a
Mms : Fix MessageWidget title doesn't update in RemoteView

Fix MessageWidget displays on homescreen don't change with system language.
The text view doesn't update in remote view is because it is setted
freezesText to true. When this attribute is setted, the text view will
include its current complete text inside of its frozen icicle in addition
to meta-data such as the current cursor position. After remove this
attribute, the title updated when language change.

CRs-Fixed: 661319

Change-Id: Idcfa377b090fd1c2689450705d9260a984dc59f1
Mms: Fix can't refresh receipent name

Contact cache isn't updated after contacts database changed and
the receipent name can not be get from Contact.getName().

Following the change or CR652842,
Add ContentObserver for change of contacts database.
Update sim messages after the cache updated.

CRs-Fixed: 745992

Change-Id: Ief93a95ca0b94123474e590c2ce1626554a97f15
Mms: Fix crash when adding an audio from external audio

It is the NullPointerException which cause application crash.
In this case, when getting uri, it only get ParcelableExtra
from data, but MusicPicker set result uri by setData method.

Check the uri after getParcelableExtra, if the uri is null,
get it by getData method directly.

CRs-Fixed: 749622

Change-Id: I166b7fa801e0f1e66f72d6f1accddf10792bb323
Mms: The SIM message interface cannot refresh when SMS arrived

Save SMS to SIM card successfully after APP do not notify to update
UI.

To fix it, need notify UI according to URI.

CRs-Fixed: 742829
Change-Id: I780b775887747016c5ee89869c0d051cf6ce5ec9
Mms: Do not show tips again when replace any attachment with Contact vCard

The method removeAttachment(false) will change the value of mMmsState,
so the toast will show again when the mMmsState change.

Remove the method removeAttachment() to make sure tips will not show
more than once when replace any attachment with Contact vCard in mms.

CRs-Fixed: 669194

Change-Id: Ib0f07a8c4501ee691c3d96b55b215f4d01d28593
Mms: Fix the vcf's name is not correct.

Mms doesn't set media name for pdu parts in SlideshowModel.java.

Set media name for pdu parts when calling SlideshowModel.makePduBody().

CRs-Fixed: 740907

Change-Id: I7c04680730f1ad143b2b4b0387613a8b1263b048