telephony: disable the use of SMS_EXPECT_MORE by default (2/2)

CodeAurora added the use of the RIL_REQUEST_SEND_SMS_EXPECT_MORE API
which is not supported by every RIL. Disabled it by default to reflect
AOSP behavior and added a flag to enable it.

Change-Id: I837c161bbca3960e7458ea049f896218d5e60a63
telephony: Remove CdmaLteUicc and CDMA fix

- CDMALTEPhone/CDMAPhone - remove the Uicc objects for updateCurrentCarrierInProvider and getSubscriberID
  Brings in line with commit https://github.com/CyanogenMod/android_frameworks_opt_telephony/commit/e287feac673ff68565b766e0e463d105fa9cef9d

Change-Id: I83be68398a502cd64b5688164a0c4f11771d896e
telephony: Clean up IccSmsInterfaceManagerProxy

Change-Id: I0c0c965b6ee89d8606ff28283b462c0e5fbf45b9
telephony: Fix initialization ordering of SMS middleware

* For an unknown reason the IccSmsInterfaceManager reference first
  passed to the proxy is null, re-register that reference after the
  reference has been initialized.

Change-Id: I4028fc311b2c54b8022d036c23938a5701e0390d
DcTrackerBase: Dont provision APN if default is disconnecting

Change-Id: I99344d89235b24689cde14335bf593099169ef0d
Merge "DcTrackerBase: Dont provision APN if default is disconnecting" into cm-11.0
SamsungQualcomm: Skip new requests on old RILs

Pre-8 RIL implementations lack support for both
RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE and
RIL_REQUEST_IMS_REGISTRATION_STATE. Ignore both of
these to prevent lingering unanswered requests.

Change-Id: I4cfbfe52a14dea636823cb54a0cc4675de80698b
Merge "SamsungQualcomm: Skip new requests on old RILs" into cm-11.0
RIL: mark mInstanceId as protected

To use in RIL subclasses

Change-Id: I4ab1ea79079e3b03670b1e985f7a574df1f16658
telephony: MSim: propagate roaming and data settings to SIM

Update SIM-specific setting when global setting is set by API
rather than the MSim configuration dialog. (e.g. QuickSettings)

Change-Id: I1ea4aad02055be6bcc9132d6d91a65826b6765b2
SamsungQualcommRIL: allow mQANElements to be device specific

The new RIL blobs for i9305 require that mQANElements = 6.
This patch simply introduces a new system property that can be used
to adjust the value of mQANElements if required.

Change-Id: I8a69bb6462552bf2374d963d82882315e8c77cef
SamsungQualcomm: Add support for Samsung's EMS dialing request

At least some samsungs require a specific emergency dial.
JF and D2 have been identified as _not_ requiring it, so it's
not for all Samsung qualcomms.

Change-Id: Id43728942f2d964a84f7486b1269d2da8305fdf6
DcTracker: Don't leave CMD_IS_PROVISIONING_APN dangling

Change I99344d89235b24689cde14335bf593099169ef0d exited the message
handler without a reply to the caller, leaving the singlethread queue
waiting for a reply and blocking other async tasks.

Change-Id: If12361c0037e9ca0662d720acfe55215924b67fd
Frameworks : Make sure a reply is sent when not provisioning default apn

Not doing so holds up the entire async executor service and breaks things like
loading icons in the share dialog. To reproduce :

Upon boot, take screenshot and click share in the notification.

Change-Id: I1b1443bfa42d62b99881e770c08f79ebe3673139
Merge "Frameworks : Make sure a reply is sent when not provisioning default apn" into cm-11.0
Telephony: fix null pointer exception

	that could force close phone app
	while inserting/modifying/deleting SIM contacts

Change-Id: I769cb184062c67af0d231c3d903e301c43ded335
Added support for DC-HSPA+ also in opt/telephony

Change-Id: Ieb6b36a418dcf5570156458aa5169b3bb831d19a
Telephony: Mock SMS (2/4)

This change brings the possibility of simulate the reception of SMS on real devices.
This change adds a MockSmsReceiver inside SMSDispatcher that have a BroadcastReceiver listening
for Intents.MOCK_SMS_RECEIVED_ACTION actions. This class accept the SMS simulation if and only if
Settings.Secure.ALLOW_MOCK_SMS is enabled and the sender application has the
"android.permission.SEND_MOCK_SMS" permission.

This receiver should be used in the next way:

Devs should declare <uses-permission android:name="android.permission.SEND_MOCK_SMS" />
and call it with:

Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION);
in.putExtra("scAddr", "+01123456789");
in.putExtra("senderAddr", "+01123456789");
in.putExtra("msg", "This is a mock SMS message.");
sendBroadcast(in);

or

String pdu = "07914151551512f2040B916105551511f100006060605130308A04D4F29C0E";
byte[][] pdus = new byte[1][];
pdus[0] = HexDump.hexStringToByteArray(pdu);
Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION);
intent.putExtra("pdus", pdus);
sendBroadcast(in);

Ported from http://review.cyanogenmod.org/#/c/23017 + Some changes:

* Move receiver to ImsSMSDispatcher class
* Send message as SMS_DELIVER_ACTION action, so it send to the registered SMS app

Change-Id: I14cab3d8ceb484df71a676dcfa44ca1634be908d
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Fix Samsung STK code for msim

Change-Id: I726f03351f42ce58b8387fad20adfac224c28199
Telephony: Allow ruim to fetch in CDMA LTE mode

... if device has LTE in NV mode.
Fixes cases where iccid could be unknown on some CDMA NV devices.

Change-Id: Ie8e676a59e20c6da70eded511a979022667aa6fa