Store phone blacklist in content provider (2/4)

Change-Id: I0fe685ff0a63848d666fc76510e4a331b74b94fe
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
TelephonyProvider: Handle database upgrade for MSIM

* need to add a boolean field 'preferred' to the carrier table in telephony.db

Change-Id: I9cf2c5bcebd7e7c3aca90f7e2a246b9d85d01c76
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
TelephonyProvider: Update Icons to KitKat

* These are residuals from Jellybean.  This is KitKat!!!

Change-Id: I4bd5e013b072daab3433e7d852ac4c4027a29a7d
Handle database upgrade for MSIM

Change-Id: I7c37252900bf0a61fdd64b301ab5b852711a42e5
Missing commas before sub_id in sql queries

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

Change-Id: I326198c19bb567846d09f8bb8c293a024c830296
JIRA:CYAN-3234
Fix permission check for deleting  SMS on UICC.

When accessing SMS stored on UICC via TelephonyProvider, we need to
use the com.android.phone UID for the call to IccSmsInterfaceManager
to avoid a UID mismatch failure in the app ops check. Add code to
SmsProvider to save and restore the original caller identity.

Change-Id:I520ca6e456a20ad3bc5d5c2584be2560e16efd20
CRs-Fixed: 562711
(cherry picked from commit cc0aff6fa3de420b12c602fab9f139847bfc4b85)
(cherry picked from commit adbf372891093248f0ed5058eb0c701f655264f8)
(cherry picked from commit 43f8a3342021c4e86a85092c50275ead2cea93c9)
TelephonyProvider(MSIM): Add support for MSIM

Add subscription information to database to identify
on which SUB SMS/MMS received

Change-Id: I31329234bcade45666206aedc469f10c5b465d34
(cherry picked from commit d954c81cb01f4ccf948c333c8d6b2dfeec0c2452)
(cherry picked from commit d172561bf1794ebaa242f5dcc3d3ffb7f4411e4f)
Add initial preferred APN feature

 -Add a new column "preferred" to the carriers database for initial
  preferred APN setting.
 -In multi-sim scenarios, each sim will have its own preferred APN
  setting.
 -Bump carriers table version to 9.
 -Add preferred column when upgrading table to version 9.

Change-Id: Iad319ce371ced7e17ac6db1aaedd5c6e14da1cba
CRs-Fixed: 569452
Fix APN database upgrade

 * Skip version 9

Change-Id: I1cef608054735a6093707de9ecc9cd6e4a7cc7c2
AppOps: use OPS_READ_MMS/OPS_WRITE_MMS for mms operation

seperate mms from sms read/write operation.

Change-Id: I5346b0273f9be2ea5e3a148299e1a5a33743f0df
Mms: Support priority when send sms

Add priority column support in database.

Change-Id: I5ccbd6dce52b86af8973f9b640e435cac345f6a3
(cherry picked from commit bbbbd334908ceff468fb0b9784f5e3d7ae669a9c)
TelephonyProvider: Impressive performance improvement for Mms delete

1. Drop the trigger used to update word and threads when delete part
2. Drop the tirgger used to update threads when delete pdu
3. Use code to do the trigger's job, to avoid unnecessary operation
when delete a lot of mms.

CRs-Fixed: 620436

Change-Id: I5dd32eb66123953848989a18abd099c905b4d3d8
Upgrade database with priority column and skip version 58.

Change-Id: Ic8071b69ec74e64ed46ed5c941340f80dbe2af01
Revert "AppOps: use OPS_READ_MMS/OPS_WRITE_MMS for mms operation"

 * Not ready for this yet.

This reverts commit d48436da7a27b33e901bff717eb1812c642ba218.
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>
Automatic translation import

Change-Id: Ic7426666084e9e2a5cb1326c1d9d2611ed926a13