Telephony: Notify Unsol OEM_HOOK events to registrants

Process RIL_UNSOL_OEM_HOOK_RAW messages that are meant for
framework consumption and notify the registrants of the same.

Change-Id: Ib3e099c5fa100e180dc5e74969908d00dd1499a8
CRs-Fixed: 459157, 568685
(cherry picked from commit bd5574f7cac71d17f6acf0647c3807dd81748140)
telephony: fixing compiling issues for CdmaSMSDispatcher

fixing compiling issues for CdmaSMSDispatcher

Change-Id: I14b4bf836b809d04d3c5a5eade6733d4ab71de3f
(cherry picked from commit b2a4b8d5360f7626d9cf86984154913556268d99)
Add ME Depersonalization support.

Add support for all ME De-Personalizations as per specs
3GPP2 C.S0068-0 and 3GPP TS 22.022.

Change-Id: Ieeb196c72eb74311643f6af0bf8958acb9541406
CRs-fixed: 467276
When phone changes update InBoundSmsHandlers and CellBroadcastHandlers.

Without this change for devices where the phone can change, for instance
on N5 with Sprint the phone will change from a GSMPhone to a CDMALTEPhone
and messages will not be sent to the appropriate handler.

For Sprint this was most readily seen when the voice mail notification
wasn't sent to the notification manager.

Bug: 11254397
Change-Id: Ia0e764cf6fa04208a7e194a35435f251a177309f
Do not display dialog when PUK attempts remaining is 0.

When using MMI codes to set a new pin and the attempts remaining becomes
zero the lock screen, KeyguardSimPukView, will be handling resetting the
PIN using the PUK. Therefore we set the MmiCode state to CANCELLED which
causes the dialog to be dismissed. If we don't do this then after setting
the new PIN from the lock screen the dialog will still be present
indicating the user still needs to set the PIN.

Bug: 9928717
Change-Id: Ic7dc51ba684a1fd623f2cab0a89f40ef8ff491d5
Use new PhoneNumberUtils method for CDMA MO SMS formatting.

For CDMA networks, convert "+" prefix to "011" if the home network
is using the North American Numbering Plan (NANP). Previously the
roaming network numbering plan was also checked, but for MO SMS,
only the home network numbering plan is relevant.

Bug: 11360679
Change-Id: Ia54f00c0ff2012622003ed4003b7fb59451b0bea
Telephony: Add getLteOnGsmMode() method (2/2)

Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property

From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
- Moved getLteOnGsmModeStatic() to TelephonyManager.
RIL: Make RIL subclassable

Change-Id: I9144ef279ca9c8cb9e657a28342f0f4cb3e7debd

Conflicts:
	src/java/com/android/internal/telephony/RIL.java
Add AppOps check for sendTextWithPriority

 Add application operation check for sendTextWithPriority API.

Change-Id: I3ea0d74e644b02d31a1b32989c87802a18c846b2
CRs-Fixed: 571674
frameworks/opt: SetAudioMode for ims calls over wifi

Send MODE_IN_COMMUNICATION for ims calls over wifi

CRs-Fixed: 546500
Change-Id: Ic47e35c649e482a3f1950e43dcc058a23dabc5d1
Notify all ApnContexts on a conn of Disconnect

Without this you can end up with default thinking
it's connected when it's actually not.

bug:10212445
Change-Id: Iffe3bf2064ac6c9f8e68ddb0d2b5115deaac2033
Update preferred activity for SMS related SENDTO intents

Updates the preferred SENDTO activity for sms/mms schemes so that the user
will not see an intent disambiguation dialog for SENDTO sms/mms.

- Update preferred activity on set default SMS app
- Update preferred activity on "secure" get default SMS app
- Update preferred activity on package install/uninstall

Bug:11482259 When default SMS app changes we need to update the default app for the SEND intent
Change-Id: Ib2752fe84389f1c50cf2aa5841e75c3913b94e18
Telephony: Handle DATA_CALL_LIST in DCC.

- Consolidate DATA_CALL_LIST handler functionality in DCC alone
to minimize the nearly duplicate code between DCT and DCC.

Change-Id: Iffb7bf369062264dd773338c732bc69318d90b73
Use settings DB only when mcc/mnc matches SIM

Bug: 11600521
Change-Id: Iaeb1f279bf454ad0e7b933b8ac97d6384d599b59
telephony: Use reflection to create command interface (RIL class)

Change-Id: Icdc02eaa74b89dbde4ddfb989cc62481d6423312
telephony: Reintroduce the old ICS RadioStates

All the previous SIM/RUIM states are now equivalent to "RADIO_ON".
Tested with a fully ICS-compliant set of radio libraries, and appears
to work fully.

Change-Id: Id34320c59a316e2b6747bd3a48077b863ab772d6

Conflicts:
	src/java/com/android/internal/telephony/RIL.java
telephony: add SamsungExynos4RIL class

Forward ported from CM10 including contributions from:
Andrew Dodd<atd7@cornell.edu>
Daniel Bateman <jetison.24@gmail.com>
Daniel Hillenbrand <codeworkx@cyanogenmod.org>
Ethan Chen <intervigil@gmail.com>
Lee Chu <lee.lc.chu@gmail.com>
Mike Kasick <mike@kasick.org>

Change-Id: Ibc33a866a02a88b346ae30aa6f09a398edfc79c1

Conflicts:
	src/java/com/android/internal/telephony/RIL.java
RIL: squashed support for old RIL

	commit 6536e023ed1523b6184da5d5704570fb3e24f01a
	Author: Emilio López <turl@tuxfamily.org>
	Date:   Fri Oct 12 16:45:29 2012 +0000

	    telephony: let us write just the aid on getIMSIForApp

	    This implements a new RIL compatibility feature, "writeaidonly", that
	    lets us write just the aid, without the preceding 1. This is needed to
	    be able to read the IMSI correctly on some Motorola RILs

	    Change-Id: I48e9d76db6730571c01d59313fc7a5e79845f922

	commit e470d722cc6fc5705d6e407a90f34692f019129f
	Author: Hashcode <hashcode0f@gmail.com>
	Date:   Mon Sep 24 11:29:48 2012 -0700

	    ril: avoid sending null aid string in getIMSI

	    A change to how getIMSI works in JB causes null aid strings
	    to be sent.  The result for RILs older than v7 is a corrupt
	    ril response in SIMRecords::fetchSimRecords.  This corruption
	    ends up setting mImsi to null (in SIMRecords) and that causes
	    havoc w/ 3g/4g data connections.

	    This patch avoids sending null aid strings and has fixed
	    data connection issues on several Motorola devices.

	    This new patch is implemented as an opt-in old ril feature

	    Change-Id: I6682ea10c8b216e2adc5abffbcc50f3cb6c9d7b8

	commit 16cd02ad6f9679ed5895d53e9d07fef3ee9d3240
	Author: Robert Burns <burnsra@gmail.com>
	Date:   Tue Sep 25 09:33:24 2012 -0400

	    Revert "ril: avoid sending null aid string in getIMSI"

	    This reverts commit 4b785569b338d150dccdb5bb6d3a290b068e603c.

	    This change has been verified as breaking network for toro/toroplus.

	    Change-Id: I74e43acd10d4b38e149acf55e08537430f871139

	commit 814e909c879621101640128fe0a0c9f0ad2ef504
	Author: codeworkx <codeworkx@cyanogenmod.com>
	Date:   Tue Sep 25 13:06:15 2012 +0200

	    ril: dedup mRilVer

	    Change-Id: I665b5c1c502d3cc49d2b3343a2e9eafc8b8e5a77

	commit 69292881c8c120c90852d306a5c312a07dd19c10
	Author: codeworkx <codeworkx@cyanogenmod.com>
	Date:   Tue Sep 25 02:51:18 2012 +0200

	    fix build: add missing instance variable mRilVer

	    Fixes commit 4b785569b338d150dccdb5bb6d3a290b068e603c

	    Change-Id: Id239285aff6997eaa42521b695b6812029f580c1

	commit 4b785569b338d150dccdb5bb6d3a290b068e603c
	Author: Hashcode <hashcode0f@gmail.com>
	Date:   Mon Sep 24 11:29:48 2012 -0700

	    ril: avoid sending null aid string in getIMSI

	    A change to how getIMSI works in JB causes null aid strings
	    to be sent.  The result for RILs older than v7 is a corrupt
	    ril response in SIMRecords::fetchSimRecords.  This corruption
	    ends up setting mImsi to null (in SIMRecords) and that causes
	    havoc w/ 3g/4g data connections.

	    This patch avoids sending null aid strings and has fixed
	    data connection issues on several Motorola devices.

	    Change-Id: Ic1fc363e35d79793c48d19080a2e028e428b888f

	commit 154221766ac6bcb1c0af549377e65a8c8ec5d0a0
	Author: Ethan Chen <intervigil@gmail.com>
	Date:   Mon Sep 3 01:21:04 2012 -0700

	    RIL: make data call APN a selectable RIL feature

	    Disabling this for all RIL versions above 3 can cause issues with some
	    device RILs and establishing a data connection.

	    Change-Id: I7be41b120663b0839beec95c22d0615f5e79c582

	commit d76a3247a3547e7c7a95a13db7cfa1ec2a061f3d
	Author: Mike Kasick <mike@kasick.org>
	Date:   Thu Aug 30 13:42:27 2012 -0400

	    RILs: Eliminate repeated overrides of responseOperatorInfos.

	    - Add mQANElements field, default to 4 in RIL, use in responseOperatorInfos.
	      This may be set to 5 in subclassed RIL constructors.

	    - Remove repeated overrides of responseOperatorInfos by subclassed RILs, as
	      there's no logic change, just a disagreement as to whether the
	      QUERY_AVAILABLE_NETWORKS response is an array with 4 or 5 per-network
	      elements.

	    - Size OperatorInfo ArrayList appropriately in SemcRIL and SonyQualcommRIL.

	    Change-Id: I1254a670d8611f76aad13a6f197c67012c7d4c47

	commit b40a14246e50429d91e603a64d6baac7813699d1
	Author: Janne Grunau <j@jannau.net>
	Date:   Tue Aug 14 22:32:08 2012 +0200

	    RIL: fix protocol mismatch for DataConnectionState_v4

	    The apn got dropped in DataConnectionState v4.

	    Avoids UnknownHostExceptions in DataCallState.setLinkProperties().

	    Change-Id: Icd0a1ba1c77cead13b15b3749965edead5f59135

	commit 431c19a5ef39003383de3fc44c636f8d03e74a17
	Author: isimobile <isimobile@ismaakit.com>
	Date:   Wed Jan 11 21:34:47 2012 +0200

	    telephony: Added support for use of Honeycomb Radio (Modem).

	    -squashed (RIL: reference ICS and GB):
	    https://github.com/isimobile/android_frameworks_base/commit/7507127287aa8cf84b5e811977d95400b029f95b
	    https://github.com/isimobile/android_frameworks_base/commit/af2b84d1860b38952784ae116172e00a4b445a1d
	    https://github.com/isimobile/android_frameworks_base/commit/872156a81fb4185217e7642d10ec33da4893a2b3
	    https://github.com/isimobile/android_frameworks_base/commit/400bbc4e3ce8e9e0219b31bb985e6628c50d0f07
	    https://github.com/isimobile/android_frameworks_base/commit/7cb289d9e59ac69350dd2377eff63940641df603

	    -cleaned up some whitespace

	    Change-Id: I3a3474245bb336bc3f275605648f5f94f3f9b6e7

	    Conflicts:

	    	telephony/java/com/android/internal/telephony/DataConnection.java

	commit 87ee134d8a0a09ff5c824450969207fa66531f2f
	Author: Emilio López <turl@tuxfamily.org>
	Date:   Thu Dec 1 21:35:21 2011 +0000

	    RIL: skip broken RIL_UNSOL_DATA_CALL_LIST_CHANGED

	    Some old RILs might produce events with type 'IP' containing the remote IP
	    address, normally 10.64.64.64. These events mismatch with the previously
	    generated ones and cause the system to take the connection down, even if
	    it was up and working correctly.

	    Add skipbrokendatacall to ro.telephony.ril.v3 to enable the workaround.

	    Change-Id: I3bc3c84735201a797011aafba2718638a826f31d

	commit b2cfc6f82f75fe47e5ca66ac7ee5bab1740f4a45
	Author: Tom Giordano <tomgiordano83@gmail.com>
	Date:   Mon Nov 28 02:51:53 2011 +1100

	    v3 RIL: another getDataCallState fix

	    Change-Id: Ie4e69e231956f46bc1b82550fdf4863c1367efaf

	commit 16330ce5c921792115bc796a3229057491524915
	Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	Date:   Sun Nov 27 09:17:19 2011 +0700

	    v3 RIL: Fix getDataCallState and PIN setting

	    Change-Id: Icf5cee33aeec58cffb23430f0f7b06b9971a71ad

	commit 3f730cc1055739dc4cbf53b44acf9c254c43a52b
	Author: Koushik Dutta <koushd@gmail.com>
	Date:   Fri Nov 25 17:23:58 2011 -0800

	    Break the legacy ril shims into specific features. The ICC feature breaks crespo, but crepso needs the signal strength feature.

	commit 6b09342ad9131754eeaa733364c2f4474a10bde7
	Author: Emilio López <turl@tuxfamily.org>
	Date:   Sun Nov 20 22:12:28 2011 +0000

	    RIL: handle the lack of version gracefully on older RILs

	    Change-Id: I8227c55968f502112c5b6ac334eee505c29924c2

	commit 913255a820cfcb99a6d89ca036eba53c110adea2
	Author: Kolja Dummann <k.dummann@gmail.com>
	Date:   Mon Nov 21 22:27:45 2011 +0100

	    RIL: fix pin unlock for old ril

	    Change-Id: I27eb348233d41618875473ca9bdb93d339c359f9

	commit 27b873d14816282bab22db8a5920ca01466d36d0
	Author: Ricardo Cerqueira <github@cerqueira.org>
	Date:   Thu Nov 17 11:16:23 2011 +0000

	    RIL: Support signal strength format from v3 vendor RILs

	    Enable by setting property ro.telephony.ril.v3=1

Change-Id: I2eb23ab5d17d15ed71e5777dcd368d47c87e29ef

Conflicts:
	src/java/com/android/internal/telephony/CommandsInterface.java
	src/java/com/android/internal/telephony/RIL.java
	src/java/com/android/internal/telephony/sip/SipCommandInterface.java
	src/java/com/android/internal/telephony/test/SimulatedCommands.java
telephony: add SamsungExynos3RIL

forward ported from CM10 SamsungRIL

	commit 9cfdf50438f603196cd3c75b92ae5346968c2b6d
	Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	Date:   Thu Aug 2 20:24:38 2012 +0700

	    SamsungRIL: Fix data connection after pin unlock

	    If the user has PIN-locked his phone, data connectivity will not
	    work because the RIL sends APPSTATE_UNKNOWN and does not update
	    it to APPSTATE_READY. We inject the state update if there's a
	    signal change.

	    Change-Id: Id64e95ebcadd1d7ff181f8d9c2ee4f18e6ae48f1

	commit 7e06e52d2c23443a28c8ad756fe7ac9b883e6ba9
	Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	Date:   Tue Jul 24 22:43:02 2012 +0700

	    SamsungRIL: Update HSDPA checking for jellybean

	    Jellybean no longer publish network type id to prop, don't check for it

	    Change-Id: I689aa448853677a8719af963bf3370abaefdaf23

	commit caa215a26a958962b3e24b0f193698547ac7e317
	Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	Date:   Wed Jul 18 10:54:08 2012 +0700

	    SamsungRIL: cleanup

	    Removed unneeded states and forward them to RIL. In ics, this had
	    the side-effect of allowing STK to work due to the Samsung STK
	    implementation already in place

	    cherry-picked from ics

	    stk functionality for SamsungRIL

	    * Implemented SMS based SIM application functionality
	    * PatchSet 3: Added fix so unknown unsolicited response are sent to super class
	    * PatchSet 4: Removed "import android.content.resources" - not needed any more
	    * PatchSet 5: processUnsolicited cleanup, using super class standard states where possible
	    * Patchset 6: Rebased

	    Change-Id: I9bf844da1480fe442f851fb20d99b530b96cfa4c

	commit 3f876005b1c6c39a62c4eee3d5e54a3bc36e7faa
	Author: Daniel Bateman <jetison.24@gmail.com>
	Date:   Sat Jul 14 11:27:07 2012 +0200

	    samsung ril: add UNSOL_AM implementation

	    * The Samsung RIL will sometimes send up an UNSOL_AM
	    request which is to be handled by the "am" service.
	    (For example when the RIL resets)

	    Change-Id: Ifc8ead91f2dbc39456c4a502b9623c608c796224

	commit acdff5c2f175127fd2fdfc6ef4ae511b0f4bc329
	Author: sbrissen <sbrissen@Hotmail.com>
	Date:   Fri May 25 09:27:31 2012 -0400

	    Fix for Signal bars on Samsung devices

	    Sometimes the CDMA ecio value is sent as a negative integer where we would expect a positive.
	    This causes SignalStrength.java to mark ecio as -160 (Unknown_Signal_Strength) and making signal bar
	    s clear out.
	    This "fix" checks the ecio value and takes it absolute value if it is negative.

	    Confirmed working on SCH-I500 and SPH-D710

	    Change-Id: Ic515dd6c92193cd5db75adf5bef93ecd617a5c6a

	commit 6308cb5329de73292665d8c8d538b09b4fe97fb3
	Author: Daniel Bateman <jetison.24@gmail.com>
	Date:   Mon Apr 23 22:24:01 2012 -0500

	    telephony: SamsungRIL cleanup

	    == RIL ==
	    * remove unused "found" boolean in processSolicited
	    * make requestToString/repsonseToString append the request
	      ID on unknown requests.

	    == Samsung RIL ==
	    * add CM copyright header to file
	    * SAMSUNG_UNKNOWN_MAGIC_REQUEST_3 is actually UNSOL_AM
	    * add DIAL_EMERGENCY to a SamsungRIL::requestToString
	    * add DIAL_EMERGENCY response to processSolicited
	    * move emergency dialing into dialEmergencyCall()
	    * dialEmergencyCall() also ditches UUS info like on stock.
	    * cleanup and improve readibility of responseCallList()
	    * move isVideo before isVoicePrivacy, as it is in stock:
	        ref "stock" code: http://pastebin.com/WePMyXDi
	        ref "stock" order: isMpty then isMT then als then isVoice then isVideo
	                           then isVoicePrivacy
	        ref cm code: http://pastebin.com/UU105gNr
	        ref cm order: isMpty then isMT then als then isVoice then
	                      isVoicePrivacy then "videoMagic"
	    * general cleanup

	    Change-Id: Ic4ada0a3d6ac1bf580b3930a2599a91e822540ef

	    Conflicts:

	    	telephony/java/com/android/internal/telephony/RIL.java

	commit e96b94500359b13fbbc186bf8b03418d82449f09
	Author: Daniel Bateman <jetison.24@gmail.com>
	Date:   Tue Apr 17 03:01:20 2012 -0500

	    SamsungRIL: clean up and re-organization

	    Clean up some messy code in the Samsung RIL.

	    Change-Id: If8bc9c0e4264de5919be1b6a858896076c879708

	commit 7a3d8a991067e957ccd6b0159951f4b98d6d98f5
	Author: Mike Kasick <mike@kasick.org>
	Date:   Sat Mar 3 13:16:42 2012 -0500

	    SamsungRIL: Fixes for CDMA data reconnection failures due to stale pppd

	    Occasionally the CDMA data connection fails to reconnect after various
	    radio events, which is fixed neither by toggling mobile data nor airplane
	    mode, but only by a reboot.  One known cause of this problem is that the
	    pppd_cdma service is occasionally left running after the radio event, which
	    causes all subsequent "setup data call" operations to fail.  These two
	    fixes address the stale pppd_cdma service issue:

	    - Move the pppd_cdma service shutdown (set ril.cdma.data_state=0) from the
	      "deactivate data call" response to its request.  This avoids the issue
	      where the response never comes (radio crash?), and thus, the service is
	      never stopped.

	    - Force pppd_cdma service shutdown on a "setup data call" failure.  This
	      allows subsequent setup attempts to succeed in the event that the
	      "deactivate" request was never made (unexpected radio poweroff).

	commit 3f647c94c54e8861cfe1b75120903c303a423ddb
	Author: Mike Kasick <mike@kasick.org>
	Date:   Fri Feb 3 16:23:03 2012 -0500

	    Add more CDMA SamsungRIL fixes.

	    Adds a collection of CDMA device fixes to SamsungRIL.  They include:

	    - Overriding ERROR_UNSPECIFIED fail cause with NORMAL_CLEARING, to prevent
	      far-end hangups from displaying the "Call Lost" dialog.

	    - Adding, and ignoring the RIL_UNSOL_GPS_NOTI request, which is also
	      ignored in the TW RIL, to keep the radio log clean of exceptions when the
	      GPS is active.

	    - Workaround for Samsung CDMA "ring of death" bug.  See source comments for
	      details on this problem.

	    Change-Id: Ida4797718ad3463d073a6fc27246cc916526d487

	commit 65d22c288fec6a82d3350c68da0a76163bade668
	Author: Mike Kasick <mike@kasick.org>
	Date:   Sun Jan 29 17:32:13 2012 -0500

	    Fix support for CDMA devices in SamsungRIL.

	    These fixes are ported from jt1134's fascinatemtd patches and CM7.  For
	    CM9, the fixes are applied to SamsungRIL directly instead of elsewhere in
	    the telephony framework.  They include:

	    - Signal strength reporting: pass raw integer values.
	    - Voice registration: convert base station values from hex to dec.
	    - Data call setup/deactivate: start/stop pppd_cdma service and pull network
	      parameters from pppd ip-up script.
	    - CDMA subscription: add missing PRL version from system properties.

	    Changes from CM7:

	    Note use of "ril.cdma.data_state" property instead of
	    "ril.cdma.data_ready".  This property has three states:

	    - Disconnect(ed): ril.cdma.data_state=0: stop pppd_cdma service.
	    - Connecting:     ril.cdma.data_state=1: (re)start pppd_cdma.
	    - Connected:      ril.cdma.data_state=2: pppd_cdma has responded.

	    The disconnect (0) and connecting (1) states are set by SamsungRIL on the
	    deactivation and setup, respectively, of a data call.  Prior to setting the
	    connecting (1) state, SamsungRIL sets the "net.cdma.datalinkinterface" for
	    pppd_runner's use.

	    After setting to the connecting (1) state, SamsungRIL waits for pppd_cdma
	    to respond by (itself) setting the connected (2) state.  This should be
	    done at the end of a /system/etc/ppp/ip-up script, after that script sets
	    the following interface values, which SamsungRIL uses to complete the data
	    call state:

	    - net.cdma.ppp.interface: $IFNAME (typically "ppp0")
	    - net.$IFNAME.local-ip:   pppd's local IPv4 address
	    - net.$IFNAME.remote-ip:  pppd's remote IPv4 address
	    - net.$IFNAME.dns1:       pppd's primary DNS address
	    - net.$IFNAME.dns2:       pppd's secondary DNS address

	commit 0b4354118b72c23d5ce003b065b42a1d9e3c5155
	Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	Date:   Sat Jan 14 13:47:19 2012 +0700

	    telephony: Add SamsungRIL

	    Patch Set 2: Fix Emergency calling for Samsung CDMA

	    Patch Set 3: Do not extraneously send RIL poll requests due to extraneous HSDPA update

	    Patch Set 4: Remove extraneous import accidentally added in Patch Set 3

	    commit 91cb0a82f785539986ee4f6ef95ccd8c789121d5
	    Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	    Date:   Mon Dec 19 17:53:40 2011 +0700

	        SamsungRIL: ignore setCurrentPreferredNetworkType

	        Change-Id: Ifa87949da3d807803db932e31c6c2dd053040c9c

	    commit b578cdb7bf0222a05af65cb09cdfc53aa7457328
	    Author: Daniel Hillenbrand <info@codeworkx.de>
	    Date:   Mon Dec 12 18:32:35 2011 +0100

	        SamsungRIL: added unknown unsol request 11010

	    commit 259ccc34d53a0067c730c616814c0ec5fc788d95
	    Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	    Date:   Sun Nov 27 12:06:34 2011 +0700

	        SamsungRIL: Always use v3 signal strength

	        Our signal processing wouldn't make sense without it anyway.

	        Change-Id: Ie101d6b220b00383aa18a9ac2c66e2ef786b7467

	    commit 1f5730d26e7e0dece905192b4dab6340336a8a21
	    Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	    Date:   Fri Nov 18 21:15:34 2011 +0700

	        SamsungRIL: Fix datacall

	    commit 1838b577a899a1f5259327361d95fe64f706c8e8
	    Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	    Date:   Fri Nov 18 13:50:39 2011 +0700

	        SamsungRIL: Fix signal strength

	    commit 1e23a1d363e7514b32703f604bdc96411cc35330
	    Author: Pawit Pornkitprasan <p.pawit@gmail.com>
	    Date:   Thu Nov 17 17:40:56 2011 +0700

	        Brings back SamsungRIL

	    Change-Id: Ice09e25c8657aad0ddb345d240829789f28d18fb

Change-Id: I06ee05b590e603413106a9a20ab85d65d4eb33cf
Allow a device to include its own RIL subclass

For cases where a single device needs a subclass, there's no need to
pollute the common core with it: just stick it in the device's own
repository, and add something like
"BOARD_RIL_CLASS := ../../../device/manuf/model/ril/" to the BoardConfig

Change-Id: I9d01ceb6e5587382eb216341e2e373ec0c52848f

Conflicts:
	Android.mk
Initialize RIL with the correct CDMA subscription mode setting

Users choice of CDMA Subscription Source is stored in CDMA_SUBSCRIPTION_MODE
setting in database.
If telephony restarts after a crash, PhoneFactory sets the
CDMA subscription source value from PREFERRED_CDMA_SUBSCRIPTION
setting and that causes the mismatch with the value in the settings
database chosen by the user. The change is to use the
CDMA_SUBSCRIPTION_MODE setting instead when creating the RIL object.

Also, remove the Setting PREFERRED_CDMA_SUBSCRIPTION from the database.
With this change the special treatment for LTE on CDMA will not be needed.
The correct value can be set in the database for CDMA_SUBSCRIPTION_MODE
and that will be taken on power-up by this code.

Change-Id: I11fff596a5fe721c64f192c889672326517dc43d

Conflicts:
	src/java/com/android/internal/telephony/PhoneFactory.java
RIL: Underp DataCall

Something went wrong with the old-stuff merge, these lines mess
up the parcel

Change-Id: I74191746fe8baec1a86efdd2e9fee7ffa47fc3e3

Conflicts:
	src/java/com/android/internal/telephony/RIL.java
SamsungExynos4RIL: set number of elements returned from QAN response

Change-Id: Ia9b50814987f9bd4cf7f69d7fe7e8f9dfa4316c6
	RIL for Samsung v6 RIL CDMA devices, based on SamsungRIL.

Change-Id: Icaf256d55a22c94d47038e9b3ea640c24d093d72
SamsungExynos4RIL: fixup radio states, notify on PIN-unlock

Change-Id: Id512e61d383ccc0df8ca1a6c398adce80d917a5d
SamsungExynos3RIL: buffer CAT Proactive Command

The RIL sends a CAT proactive command (init) before the registrant
is registered causing the command to be missed and STK menu to
not show up. Buffer it and fire it when the registrant is registered.

Change-Id: I021ce911e55b30c1a2d95d8060f7d9ff72e3b742
telephony: Add custom QC RILs from CM10

 * Updated for MR1 API

Change-Id: Ib08eaceaacd0d5ff66eba9e545189d4700c3699f
RIL: Add SamsungCDMAQualcommRIL

Use standard ril instead of qcomsharedril
add lte support to signal strength in SamsungQualcommUiccRIL and QualcommSharedRIL

Change-Id: Ibbf1c422dddd489c9e82503087032f93180eade7
telefony: Custom RIL for Sony 8x60 baseband

Change-Id: Idf0a1e8dbf634096d99a159e221d30f7a201977b
Telephony: Add getLteOnGsmMode() method (2/2)

Same functionality as the existing getLteOnCdmaMode, but for GSM
LTE devices.
Enable with the telephony.lteOnGsmDevice system property

From CM 10.0: Ibfb47ca608e51393b99d3308e0a6c66050b3f32e
- Moved getLteOnGsmModeStatic() to TelephonyManager.

Conflicts:
	src/java/com/android/internal/telephony/BaseCommands.java
fix for Samsung CDMA incoming SMS bug

ported from CM7/9/10

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

Change-Id: I6189dd0c6aeffb0b8b530bab7994a07bb390c32c
Add Samsung STK support (telephony part)

Support for SMS-based SIM applications.
Partially rewritten the original patch by Jüri Schultz to be less intrusive.

Change-Id: I15d2de1781a2823e24941dd792db3d372578aa9f

Conflicts:
	src/java/com/android/internal/telephony/BaseCommands.java
	src/java/com/android/internal/telephony/RIL.java
Samsung STK: Add USSD support

Allow USSD-based STK applications to work

Change-Id: I483f37a44a6c3ed43eefcf979e17b84877d03f93

Conflicts:
	src/java/com/android/internal/telephony/cat/CatService.java
core and telephony: Additional HSPAP support

Change-Id: I5e921d2308d873678d6ef67a91cff50d383a176b
patch responseSignalStrength

Change-Id: I4f2861e765d6b112b0351e89711025a7ea1f25e4
Samsung STK: Fix SMS-based STK

SEND_SMS was falling through to SEND_USSD (which used to do nothing
until USSD support was added) causing an Exception because cmdParams
is not an instance of SendUSSDParams.

Fix by using type-checking instead of checking if Samsung STK is
enabled (because SendSMSParams and SendUSSDParams will only be
created if Samsung STK is enabled.)

Change-Id: I671014e295e9e529aad25a8b6fbd5a2e5788fc44
RIL: add HTC radio state and RIL class

Patchset 4: restore more HTC unsol message resoponses support from patchset 2.

Patchset 5: move HTC-specific messages into HTCQualcommRIL

Change-Id: I619198437c421348df3c3ff5d0a24f839c5ac43f
SamsungQcomCDMARIL: Add support for SIM.

Change-Id: I3194c30f36eb6436c7f77883224376386d9bd9a6
Add notification type constants.

Change-Id: I3bafac72744d0e77436324db5aafec965ca2cd45
Allow registering for supplementary service notifications.

Change-Id: Id40d320cb6935ddf4cceefa8ddb42f9229b66efa
d2ril: change readint offset of one

Change-Id: I83ba3096a7d29f87605bebc0f72fe46124c1ca06
telephony: CdmaServiceStateTracker: Get cdma sub. when ruim ready.

This code made the assumption that cdma subscription isn't needed
when on cdma + lte. QCOM devices need to get both to provision
propertly because some SIM records are missing.

This patch adds a system property ro.cdma.subscribe_on_ruim_ready
to specify that CDMA subscription should be requested using NV
once the SIM records have been read.

Change-Id: I3e989e9f75c08412bb5f19155beea52e7d9f3c43

Conflicts:
	src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
SamsungCDMAQualcommRIL: add icc handler to run when radio on

Brings bits over from QualcommSharedRIL

This allows d2 with uim to set correct subscription source
instead of being set on NV on first boot.

Change-Id: Ib0a0c7f03bddd7f3eca36b3bad2989d9af6b6dee
SMSDispatcher: Add option for sending pseudo-multipart SMSes

Serves as a workaround for devices that are otherwise unable to send
concatenated SMS messages on certain carrier networks, by providing the
option (enabled by the "telephony.sms.pseudo_multipart" property) to send
multipart messages as individual (not concatenated) messages.

For example, parts of Sprint's network hang on receipt of multipart SMSes
on devices (e.g., d2spr) that use the qcom SMSLock method in sending
multiple messages.  That is, the device waits for acknowledgment of the
first PDU before sending subsequent PDUs, while the network (incompatibly)
waits for subsequent PDUs before acknowledging the first.  While sending
the messages individually is suboptimal, it both works reliably and
matches stock ROM behavior.

Change-Id: I1da9d2320780d57b7b6881edb52fb9d7413332ec

Conflicts:
	src/java/com/android/internal/telephony/SMSDispatcher.java
Fix restoring network mode preference on reboot

When a user sets the option to use only 2G networks (for GSM networks) or its
equivalent for CDMA networks, each reboot erases that setting. That forces
the user to re-select the same option after each boot.
This (very simple) patch fixes it.

Ported from CM9:
http://review.cyanogenmod.org/#/c/16245/

Change-Id: I7ec9e155fed9f57934d7a73936f2bf425c8297fe
SamsungExynos3RIL: don't send IccStatus notification on CDMA devices

This causes the RIL to send erroneous GET_SIM_STATUS events that are
of course failing as CDMA devices lack a SIM card. This is causing a
persistent wakelock and quickly draining the battery.

Change-Id: Ic94ff85b63b21b66d66a757127585806c41a3ffa
SamsungExynos4RIL: fix signal strength

Doesn't work with Gingerbread radios!

Since ICS, the modem sends the signal strength in the first 8 bits
and the number of bars as from bit 9.
For old radios the first 8 bits are always 99.

Change-Id: I67b31baf18cbce2dfa7e6f8b096caaae74cd7cd8
SamsungExynos4RIL: Allow signal strength to be handled for GB modems

For devices that have no modems that support the ICS signal strength handling, allow handling it the old way with the ro.ril.gbmodem system property.

Change-Id: I68270c5a4026b2c8f448125607ee47dd04249176
SamsungExynos3RIL: fix unable to swtich 2G/3G while connected to wifi

When connected to wifi, the actual mobile network is not connected
but mobile data is reported as enabled, causing the code to try
and disconnect, which never happens since it's not connected in the
first place. Fix by checking if the network is connected instead of
if it's enabled.

Change-Id: I291b739a26fbf6c10917f195f80ea5044b6da03c
SamsungExynos4RIL: provide a fallback solution if signalstrength is invalid

Change-Id: Ib533b15feb4f56c00f1ce3c7baff5e0e73255e6c
LGEQualcommUiccRIL: New subclass to deal with the latest qcom RIL

Yet another generation of CAF RIL, this one is necessary to support
multi-RAT (GSM/LTE) radios...

Change-Id: I87b5126ffbc16f3ccc7caaf227354edf95543c35

LGEQualcommUiccRIL: Fix LTE support

Change-Id: Ifab51550113926d6d1b6c421e805f456d95faca8

LGEQualcommUiccRIL: Fix multi-PDP support

Multiple concurrent PDPs are now functional, allowing the back-compat
singlepdp flag to be disabled

Change-Id: I8ef55e96b9f05d4a4dd8dbbaeddf6d48ded7fc67

Update to 4.2 APIs
Update the SMS sending limit instantly (1/2)

Patch Set 2: observe the setting value instead of checking its value
every time

Patch Set 3: readd accidentally removed final modifier

Patch Set 4: remove redundant inner context variable

Change-Id: If8a0867945cf308391009eae168bf05a6dd429eb
SamsungExynos4RIL: fix emergency dialing

Change-Id: Ib910b82141a737b85b6c4e6cc7cec7c72a1d08b3
Qualcomm LTE RILs: do not make mLteRsrp negative

  * In CM10.1, SignalStrength::validateInput() was added. This function expects
    mLteRsrp to be positive coming from the RIL.
  * Inverting in the RIL was causing validateInput() to flag mLteRsrp as invalid.
  * This shows up as a 0x7fffffff in About phone->Status->Signal strength when on LTE
  * Let validateInput() invert the sign instead of doing it in the custom RILs

Change-Id: I6ae7e4a56141c49628576305d21bee77b2a93ad7
telephony: add SamsungQualcommM3RIL for samsung m3 devices

Change-Id: I09fa6ee92f39c84c6a01002c35e15dd9112f618a
QualcommSharedRIL: allow skipping pin/puk count

Change-Id: If2f046b7cfdec887fc9390a46c999c6acd763505
PhoneProxy: Add a prop to enable always creating of CDMALTEPhone

Current Motorola OMAP4 devices need this in order to function properly
Will need to enable telephony.rilV7NeedsCDMALTEPhone prop on these devices

Change-Id: I22ef7688e422986d63a0cced1fb2e872c6e01c80

Conflicts:
	src/java/com/android/internal/telephony/PhoneProxy.java
RIL: Add SEMC 7x30 RIL

By szlkiev https://github.com/szlkiev

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ifcfcacada9a4e2586572f64f169ff6c9d84a8215
RIL: Add compatibility with qcom's DSDS

Devices with radio libraries built against a DSDS-enabled qualcomm
BSP (anything in the last 4 or 5 months, apparently) have a slight
incompatibility in the RIL protocol: it expects the first 4 bytes
of the datastream to be the slot's identification (even if the
device isn't dual-SIM). Absence of those 4 bytes will make the
connection hang.

Change-Id: I9f5821add02e7e5b5286c3b0818cb4a94edcc13c
Allow disabling radio with property persist.ril.enable.

This can be useful for phone with no active service.  It saves battery
and prevents unwanted communication with cell carriers.

Change-Id: I61ad66ee49384a53667066f426aedac1ab7d5d73
SamsungQualcommUiccRIL: fix responseCallList for v7 RIL

  * copied Samsung-specific workaround from D2 RIL
  * only needed for v7 RIL; override not needed for v6 RIL

Change-Id: Ifc7d7ebe1887317e4debc6acd2754e47ce1d0d6b
telephony: Remove SamsungQualcommD2RIL

 * This is now implemented in the superclass for v7.

Change-Id: If86f10f7a64ca25db2f1f4d579c078c7545ffd98
HTCQualcommRIL: squashed set of updates

libril: HTC8960RIL: add flag to force CDMA+LTE network mode

HTC8960RIL: update unsolicited messages from m7wls stock

RIL: make HTCQualcommRIL extend QualcommSharedRIL

Change-Id: I650945f6e03ef9f0cbfa1cf605b22859bfe20def
HTCQualcommRIL: adaptable signal strength format

HTC signal strength format has 14 fields, stock libril has 12

Change-Id: I8f42a9864dcd5f3071663d16535423e5cc12afbd
HTCQualcommRIL: allow skipping of initial radio power off message

HTC 8960 radio starts by powering itself off, which leads to a race
situation where the radio powers on, then reads the power off message,
powering itself off again. Allow the initial power off
to be skipped.

Change-Id: Iebd53b98e63c8f2ec9461c7f220fa1bb7ccd1e17
Revert "libril: HTC8960RIL: add flag to force CDMA+LTE network mode"

This reverts part of commit: 492c36536d259d55ea947a03ff22ad05ae6f51b2

Change-Id: I8cd4d1261b26e9fbe2aaaf7d423b9606aa243494
HTCQualcommRIL: remove unused responseIccCardStatus function

Change-Id: I45fecfe2841911463e2dd02b7728ce5e6eca17a0
HTCQualcommRIL: re-add force LTE modes

Change-Id: Ib1a53e0c34631ae187088a0f0161e3954ac36a80
SamsungQcomRIL: New class and get rid of old and outdated codes

Consolidate the RIL and base on the CDMA RIL
Now inherit class related to the Samsung Qualcomm family

Special thanks to Dan Pasanen for coninuing the patcheset
while my macbook was in repair.

* Rebase on standard ril
* samsungDriverCall now handled in the superclass

* Supports:
  * Quad-core Exynos4 with Qualcomm modem and later
  * Snapdragon S3 and later

Change-Id: Ie593e32087a9bfeb5d16802a10c2739cf1061676

Conflicts:
	src/java/com/android/internal/telephony/RIL.java
	src/java/com/android/internal/telephony/SamsungCDMAQualcommRIL.java
SamsungQualcommRIL: fix logic order

Change-Id: I9d201b0a4c00d8283108ba3f62c91d39c89bd001
ril: Add Samsung-specific unsolicited commands

 * This is shamelessly stolen from the Exynos RIL, but it's relevant for
   JF now. Without a proper response to the WB_AMR query, audio fails in
   strange and unusual ways.

Change-Id: I9f37c7b82e9b171479847a24ff3a1e10ada973bd
SamsungQualcommRIL: use the advantage of static type.

Change-Id: I3ebee8c6f6648be47ce896d64d34ddfa5e286208
SamsungQualcommRIL: fix race condition when starting phone type.

* ril is init but hasn't picked cdma or gsm, instead the ril picks no-phone.
* support switching gsm to cdma and vica versa
Change-Id: Ib9eaf88d5a7e90b2458ab787da230fca9a41249f
SamsungQualcommRIL: evaluate samsungDriverCall in responseCallList()

  * fixes race condition where mRilVersion is not valid when setPhoneType() is
    called. When this happens, the auto-enable of samsungDriverCall for v7 RIL's
    is broken. The result is that hanging up does not work.
Change-Id: I2642110d3683648aaff722c86d3dc21cbd9ee802
HTCQualcommRIL: clean up unused functions and responses

Change-Id: I0c381677dbb2a8a76008c8eec6e1057fd22be43c
SamsungQualcommRIL: fix errors and replaces it with known values

* handles all exception and errors coming from the ril.
* fix an issue with mnc, potentially fixing herpderpd/lte  daemon.
* properly fix all exceptions
* We only need AMR states, cyanogen said
* clean up legacy stuff

Change-Id: If76e0c995b1d95e155fc2fe724de1f12013125c3
SamsungQualcommRIL: support exynos RIL radio states.

* required for m3
* enable it with v3 feature:  exynos4RadioState
* remove m3 class
Change-Id: Id34320c59a316e2b6747bd3a48077b863ab772d6
HTCQualcommRIL: optionally ignore IccCard states greater than 2

The htc fireball (Verizon) throws CARDSTATE_NOT_INITIALIZED corresponding
to card state 3. Include an option to ignore card states greater than 2
with an oldril prop.

Change-Id: I7c8d5cd43af1e89e47ce777d301581d6c4bc427f
HTCQualcommRIL: handle more unsolicited states

The following commits added, changed, then removed, handling of
several unsolicited responses that are needed by some s4 devices:

CyanogenMod@6cbccb7ef071f78b031daf5d74d5cb5cf314ad30
CyanogenMod@492c36536d259d55ea947a03ff22ad05ae6f51b2
CyanogenMod@a8dd7a045649b15d95b3afde47ba5c8ebe28d2de

Patch set 2 includes support for a new unsolicited state:
3020: RIL_UNSOL_CDMA_NETWORK_BASE_PLUSCODE_DIAL

Depends on: http://review.cyanogenmod.org/44363

Change-Id: Ifadd7c736d02b3db8cd1d9105619920c1bfd77cc
SamsungQualcommRIL: support google play edition blobs

Change-Id: Ib9836c44271f84d669d4a0166e8367d99646f88f
CallTracker: Add back-off and retry toggle to getCurrentCalls

Add a system property to handle cases where the modem
reacts slowly and does not update CURRENT_CALLS to include calls which
are dialing. A delay is introduced to avoid spamming the modem and then
GetCurrentCalls is called again in order to avoid the calltracker from
marking the call as ended when it is still active.

Tested and LS970 and E970 (Sprint and ATT LG Optimus G).

Change-Id: I7d3aac00b811bceb2909adf239492962a737de4a

Conflicts:
	src/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
	src/java/com/android/internal/telephony/gsm/GsmCallTracker.java
Store phone blacklist in content provider (1/4)

Change-Id: I9dafdb3e10bd2a71695c2a02cc483c594d86c543
SamsungExynos4RIL: cleanup for use with opensource libril

* only emergency dialing needs hacks

Change-Id: Ib573d65fd4fb3201bdbe0960838d15f88645a8ec
SamsungQualcommRIL: fix passing isgsm flag

Change-Id: I3a07ac5157db9c64bca1016ab137419968c16fe6
SamsungQualcommRIL: always convert hex to int.

Change-Id: Idc9183c9041f4fb816ff82f428812bcfe7e5fce0
SamsungQualcommRIL: fix HD voice

Change-Id: I8dfd96adeae15c42f57810cdb54a9eb915dead4f
Update all CM radio code for the current API

Change-Id: Ic29c2e06d48fdf8a7f0ea6d859c5d30e046a8940
Samsungqualcommril: fix parser

Change-Id: Ib033aa75942f14241561ded8dee1039176039170

Conflicts:
	src/java/com/android/internal/telephony/SamsungQualcommRIL.java
Revert "SamsungQualcommRIL: always convert hex to int."

This reverts commit ef61f36300a3bca75bd0d06ad7d89e474c208af4.

Change-Id: Ia374a84cfdb8afdea9776e8cce5ad4e23409fe68
SamsungQualcommRIL: fix NPE

Change-Id: I640228aee5424605d3df5c491f1c36ea72a6d3a7
SamsungQualcommRIL: rebase Sammyqualcommril to RIL.java 4.3.

Change-Id: I6a6c8dde58912b4ed814a41644b882e88ece38b1
SamsungQualcommRIL: use proper Log tag

Change-Id: I6e7901816edc2435db188ffa820047c8f38c7c89
CM: Use Rlog

Change-Id: I7439a200b9b8f815500ce89c922df069acbfc1a0
Telephony: Generic Blacklist support (5 of 5)

Change-Id: Ida51f9b1aa1f11b6179f623ede89c314d3f92f65

Conflicts:
	src/java/android/provider/Telephony.java
Introduce HTCCDMAQualcommRIL for HTC CDMA devices

This is based off HTCQualcommRIL with added changes from
SamsungQualcommRIL.

Adds responseDataRegistrationState from Chris Lawrence.

Change-Id: Id5b9c59b100229dd3abd356ecc5d4d94e93155d9
telephony: set PROPERTY_DATA_NETWORK to data technology

The GSM SS is inaccurately setting the property to voice technology
instead of data technology (CDMA's SS is correct.)

Change-Id: I35a0a789bc06159f65325946e43f166f531bb1cc
SamsungExynos3RIL: rebase to latest RIL

Change-Id: Ibb15014055b1648fe073f4bf6b1ff673271caab4
Revert "Initialize RIL with the correct CDMA subscription mode setting"

This reverts commit 8bf373e05d72cac5b80a6ffcc18e6234430b38cd.

Conflicts:
	src/java/com/android/internal/telephony/PhoneFactory.java
RIL subclasses: Fix processSolicited for the new API
Telephony: prevent NPE

Change-Id: Ia7a08334a901ef67353d5816d0822d0cb2d57daf
HTCQualcommRIL: fix data drops when switching state

* HTC RIL always throws this exception after the initial data call
  setup, so only switch ifname if the call goes from active to inactive.
* Prevents data drop due to empty address/DNS/gateway when radio tech
  switches to/from LTE/3G/2G.

Change-Id: Ia540e9b48e2f0ff7deb4d798aaac2c45ef38dbb3
Telephony: Query SignalStrength when there is a RAT change.

In CdmaLte phone when RAT switch happens, telephony receiving
new signal info before updating to new RAT and because of that
the received signal info is ignored and empty bars updated
on UI. To avoid that query signal strength info when there
is a change in PS RAT happens.
CRs-Fixed: 464438

Change-Id: If494b9380f47bd82fe4f5dec03f9538c7ab76b49
Add initial preferred APN feature

Add new column "preferred" to the carriers database fot the initial
preferred APN setting.

Change-Id: Ife93851f29ee9cc24a1192281d49cd321e7638c6
Move custom icccardstatus back to HTCQualcommRil.

On m7spr and jewel,  we no longer need the custom ril class.

Patchset4: remove htccdmaqualcommril class.

Change-Id: I02a26a8d52f724e4ba0e8955f6ab8fae1951edbb

Conflicts:
	src/java/com/android/internal/telephony/HTCCDMAQualcommRIL.java
telephony: DataConnection: support old RILs

Older RILs require different technology value

Change-Id: Ia72bb1229132a00b5c343c0467823b895f0338d0
SamsungExynos3RIL: fix sim PIN handling

(cherry-picked from cm-10.2)

- fake sim status changed on incorrect PIN (rebase from RIL)
- notify PIN-correct using RADIO_ON instead of on signal strength
  (causes ICC to be queried all the time if no SIM is inserted)

Change-Id: Ie0a77eee7d6a230d511d648633aa0e6f945038ff
HTCQualcommRIL: properly reset radio on RIL_CONNECTED

* Resets radio on RIL_CONNECTED, but only after the first RIL_CONNECTED
  response.

Change-Id: I94a56d97eca173b8bcc5b38e59ee43740d2ef74a
cdma: Restore SVDO after merge.

Allow evdo/ehrpd + voice simutaneously.
Use ro.ril.svdo=true

Change-Id: If7be25edc10f21680adbe3a059370d77a82ef076
Telephony: check if the provisioning apn is actually empty before

checking if they are equal.  Fixes cases where the stubbed apn
(empty) equal to the empty provisioning apn.

Fixes no IP issues on CDMA data types.

Change-Id: Id7bda83778f5ce59c87463c4d44fc5768dbc4a08
telephony: Add Qualcomm42RIL

 * Provides translation to JB_MR1 version

Change-Id: Ida0142403da6e012e9069ed0d4a19b06da97085b
Add SMS Middleware layer.

Change-Id: If5621d0c5126d6917ab00143af645692f3c4a384
Could not enable data connection

Could not enable the default type APN in below case:
1. Default apn exists, connect wifi
2. Delete default apn
3. Disconnect wifi

enableApnType won't reactivate default apn type when no
default apn exists. Add default apn criterium to avoid this.

Change-Id: Ic8699669e576e5d2140852f359e34ed6c3275633
SamsungQualcommRIL: Add more validation of Signal Strength

Change-Id: I4b166543ba6898616c9e64a86ff65693f8e33f72
SamsungQualcommRil: reversed engineered implimentation of dial() from touchwiz

derived from Ricardo Ceq. and Tony Layher work.

Change-Id: Ie17762a5bce84791f85c98dfca88f576b2f5aeb9
Allow tablets to send SMS if enabled in device overlays (2/2)

Change-Id: I30299d44eb59e89104b9b0b90be10da2a6ce62ac
SamsungQualcommRIL: fix my derp.

* don't code when you are tired
Change-Id: Ic02bd9cbbe96b674d7c93a2c5807563ddf46199a
PhoneFactory: fall back to default RIL if custom RIL Class fails

If the ro.telephony.ril_class property is set to an invalid class it will cause
Phone to repeatedly FC and make the device unuseable. This allows it to handle the
exceptions gracefully and fall back on the default RIL.

Change-Id: Ic9c309aff173de5267aa7ef633bfff87243f24fd
SamsungQualcommRIL: kill off some old code

Change-Id: I9784c99e0ac82d6982f5240e2576fce6a7c1e1b6
SamsungQualcommRIL: skip setCdmaSubscriptionSource if CDMA_SUBSCRIPTION_MODE is null

Change-Id: I9784c99e0ac82d6982f5240e2576fce6a7c1e1bf
SamsungQualcommRIL: Create 2 more app for nv type of subscription.

A proper patch for http://review.cyanogenmod.org/#/c/48388/

Change-Id: I42e3ec88452239a6b953dff0e636a8c2e5dbf958
PhoneFactory: Block radio init if the device's custom class can't be used

Trap the initialization process in a 10 second error loop. The device
will be normally usable, and have a dead radio. The radio log buffer
will have the full stack dump explaining what went wrong during the
custom class instantiation

Change-Id: Id47d51737a9fb78e6d43a179ba304b1ba03c4219
SamsungQualcommRIL: Add Operator replace functionality to search network.

Add a new api called unOptimizedOperatorReplace, this is designed for
loop based like the one in operatorinfo.

Change-Id: Ic72a70178a1868365d85e81403cc88e0a75a7e39
GsmSST: Disregard any invalid verbose values for timezones in NITZ requests

And assume anything resulting in "GMT" is invalid, since that's the
default value returned by libcore

Change-Id: I361650400e71976d8327ee3929947ca26a9eff57
(cherry picked from commit f440bcd71fe735872b7e4c7ecd557503a79df756)
SamsungQualcommRIL: fixup drivercall for universal builds

Change-Id: I92ba18b5406c73897444d1db378c23d8561cc147
Move message blacklist to framework (1/3).

Change-Id: I321e3a3c40dd49772978258e8a27208868a22332
Voice+, Whisperpush: Need to send SMS_RECEIVED_ACTION for all apps.

Change-Id: I05fe3fb6dc6acea612e25d7a93d0891ad6d1754e
SamsungQualcommRil: fix typo

Change-Id: I3e9476db5997b01e122019eccb2073ec2f275661
telephony: Fix custom RILs for new API

Change-Id: Ibc4174fbe9046dcdfcdf58f6aaf2dc7b5bcd483b
telephony: Fix initialization order of SMS proxy

 * This was getting initialized too early, propogating a null
   thru the stack.

Change-Id: I1ee371eea8ee3311ae1809fd9347b42e6e6b8979
telephony: Fixes for SMS middleware

 * Update for API changes with data messages and priority.

Change-Id: Ica950731667bb8d79d966e8c00a4f0bafeb3e8bb
Fix "telephony: DataConnection: support old RILs"

Ia72bb1229132a00b5c343c0467823b895f0338d0 was broken in the QCRIL
merge (function call missing)

Change-Id: Ib038783a6d96633e7d857402375053d0d8d875e9
UiccController: Query GET_SIM_STATUS when radio state is ON

mCi.registerForAvailable resulted in the SIM query firing off
too quickly and resulted in the SIM initially being identifed
as ABSENT.

Change-Id: Iaef6ffe1315560262e19ebacd304716982bb8174
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
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
RIL: mark mInstanceId as protected

To use in RIL subclasses

Change-Id: I4ab1ea79079e3b03670b1e985f7a574df1f16658
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
Added support for DC-HSPA+ also in opt/telephony

Change-Id: Ieb6b36a418dcf5570156458aa5169b3bb831d19a