Mms: Support priority when send sms

Add priority column support in database.

Change-Id: I5ccbd6dce52b86af8973f9b640e435cac345f6a3
Conflicts:
src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
Change SUB_ID to PHONE_ID column for SmsProvider and MmsProvider

As per Google SMS/MMS are storing with SUB ID in data base
due to this if user changed the SIM's then user won't be able
to see the already stored SMS/MMS in phone.

Modifying data base to store SMS/MMS with PHONE ID, now user
will be able to see the stored MMS/SMS in phone even after
inserting the different SIM's

Change-Id: I066381564e1fbfc5002b453d832801eaeeec0836
Add Manual Provisioning support

* Add subStatus column to iSub table.

Conflicts:
src/com/android/providers/telephony/TelephonyProvider.java
Change-Id: I94747656943a8da23b2bfe6ae0aa6300ed9dd578
AppOps: use OPS_READ_MMS/OPS_WRITE_MMS for mms operation

seperate mms from sms read/write operation.

Change-Id: I5346b0273f9be2ea5e3a148299e1a5a33743f0df
Mms: Support get messages according to mailbox type and slot id

Add get mailbox messages uri matcher and query message's info
according to mailbox id.

Change-Id: Ibd5d403e8621a614038309d80ae0e7b989aedd29
Get proper operator numeric from TelephonyManager

Change-Id: I18f80e955f61800c85ee896cfc35e68c9693a81a
CRs-Fixed: 727780
Conflicts:
src/com/android/providers/telephony/TelephonyProvider.java
Store Network Mode selected in subId Table.

Modify code to store network selected by user in
subId table.

Change-Id: Id349f2ca0faefda0bc8c0dcc609820ed978954fd
TelephonyProvider:Add Changes to SMS provider as per new SMS design

Add Changes to SMS provider as per new SmsManager design.

Change-Id: If80d4fc75effa7a7dc63894c51e0dd90d4e01bdb
Upgrade SMS db version to 61 to add priority column.

Add new "priority" column to SMS db if it doesnot exist.

Change-Id: I52ce14f6d8e8903f6a2fb2a63f7cb3eb35371b15
CRs-Fixed: 749755
Bump the DB version from QC's changes

We still have some upgrade steps to do to upgrade from CM11, but prevent
crashlooping of acore for people running L's original provider

Change-Id: Ia28349bca23c8c7b71699a014756b4e3b061fe70
Improve delete handling code.

Change-Id: I3f09f00a2966ee246056ea11ec55d952da6aabc0
Drop blacklist number uniqueness constraint.

It's very hard to deal with that constraint in practise, so drop the
contraint from the DB and handle potential duplicate rows when querying.

Change-Id: Id28a415ba80cf100879b24de88b4b50638e900ca
Properly handle alphanumeric 'numbers'.

Change-Id: I326198c19bb567846d09f8bb8c293a024c830296
JIRA:CYAN-3234
telephonyprovider: Add blacklist provider permission

Change-Id: I000edc9622528bde797db6548ea54041362eb4fd
JIRA: CYAN-3727
Issue: https://jira.cyanogenmod.org/browse/CYAN-3727
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
blacklist: normalize phone numbers to E164 standard

Normalize to standard E164 with country support should perform better phone number matches.
xe: The brazilian user (country code +55) saves 6792928089 as blacklisted phone, but when
he receives a call from +556792928089 the blacklist provider doesn't match the number,
but both are the same number. Using E164, combined with SimCountryIso or LocaleCountryIso,
6792928089 will be stored as +556792928089, and during quering the provider the same format
will be applied for the incoming intent phone number, which will lead to a proper match.

Change-Id: I80c8330bfe3a13dca27557f795ee04781248f1a1
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Enforce convertability to a valid E164 number on insert or update.

Change-Id: I70d2bbf07be653f1524215557fc70dd92ee42894
blacklist: relax phone normalization

The current E164 is too strict for some valid phone numbers and for regexp numbers. Just
relax that validation a bit while preserve some extra checks for invalid numbers.

JIRA: CYAN-5324
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Change-Id: I4783d8c31e28dc50c3dcc69982c81ecd9a0b3d36
MmsSmsDB: Add an update path for CM11

Change-Id: I6e0ac475d677b73a68814647711a6ab6c5c42c86
TelephonyProvider: Handle database migration from cm-11.0.

Change-Id: I421679873ff6016b2999a0661c9614e3668720d2
telephony: Add support for choosing a default APN

* Sometimes, the standard method of choosing the "first" available APN
   is not what we want. Consider the case where a certain provider has
   both a "normal" APN and an LTE APN. The LTE APN is what we want, but
   it's not chosen.
* Add a new overlayable value "config_preferred_apn" to handle this. A
   device can override this. The format is "apn,mcc,mnc".

Change-Id: Ia6ca4159491bee15b3f18ad7ad524b8b0ffce2f2