QualcommSharedRIL: Check call status before validating data call state

Ported over from CAF's change Iea75053cb8226ec15d2a2c11a73332e5ebe8c793,
since applying it to the main RIL class breaks non-qcoms

Change-Id: I1ac57537cffd52ce269250ea948f8b728a1c5636
smdk4210: fix setPreferedNetworkType when mobile data is connected

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

Change-Id: Ib9e4bba6da705c127ce1f3aa3c242b9262541cee
LGEQualcommUiccRIL: Disable setupDataCall override

This is apparently not necessary anymore

Change-Id: I026b6bf40ff629c8db640520adef2a61b6e14fed
telephony: fix Network Operators list on Samsung Qualcomm devices

setNetworkSelectionModeManual() and responseOperatorInfos() are overridden
in QualcommSharedRIL with code that breaks Samsung Qualcomm RIL's.
Override them, again, to put back the original functionality found in
RIL.java.

Change-Id: I7ac663a60edf62c80cdac831443ca6cddbe3702c
QualcommSharedRIL: Fix restoring network mode preference on reboot.

Change-Id Ib9e4bba6da705c127ce1f3aa3c242b9262541cee fixed this in the
master RIL class, and broke the qcom-specific implementation. Fix
it by rescoping the variable.

Change-Id: I70784ee0f8e7b0b74cab8dafdc83610191ba245c
QualcommSharedRIL: Disable radio power request on ril socket connect

Google introduced the code to send the radio power off as soon as
the ril socket is connected. Telephony sends Radio Power On
before the response for radio power off is received from QMI.
QMI cannot handle a RADIO_POWER request when there is a
pending request already.
Block this radio power off request to avoid this scenario.
Long term solution would be to check for any pending
radio power response before sending the radio power
request.

Change-Id: I9b77cd9f400e543f8768f501586e89863b6837b5
telephony: Smdk4210RIL: clean up processUnsolicited

Remove full overload of processUnsolicited and have it work with the
requests unknown by the RIL superclass. Pass everything else upwards,
unmodified.

Change-Id: I129120995c17b45c17dd50b77f281de352c20ae2
QualcommSharedRIL: Fix signalstrength on pre-ICS radio libraries

Change-Id: Id59e04a36a892657deb2dd76d8455a7bad8956fe
Add NT_MODE's for NETWORK_MODE's 8 and 10

as defined in RILConstants.java

The RIL in newer motorola phones is set to 10 as default.
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>

Change-Id: Ic80a9d984be40a5f921204e8997943b44c52d421
LGEQualcommUiccRIL: Fix signalstrength on pre-ICS radio libraries

And datacall parameters, too
Change-Id: Ifc6f959044622bab2e7198ad15ce6f56dde370f7
Smdk4210Ril: fix bad file format

Change-Id: I26a48a1422060a19c76fbc83af95ae7649442bf0
SamsungQualcommUiccRIL: use signalstrength value instead of # of bars

  * Math error in GSM level calculation gave high probability that 4
    Samsung bars would be shown as 3 AOSP bars.
  * Samsung sends # of bars in the signalstrength field of GSM and LTE,
    indexes 0 and 7. But this is on a 0-5 scale where AOSP uses 0-4 scale.
    The cutoff points for the bins are also different. Because of this
    confusion, just pass the measured signalstrength to the framework
    instead of computing signalstrength based on # of Samsung bars.
  * For debug and experimentation, Samsung's bar method can be enabled
    by setting telephony.sends_barcount=true

Change-Id: I8238af83f3a597b32eb99f42c71cbc263ad5bc82
Smdk4210RIL: fix signalstrength

based on http://review.cyanogenmod.com/#/c/18220/

Change-Id: I872221e58e89412fcecf67c7208ab2c89aac7c04
fix automatic timezone failing on some GSM networks

in the code that parses the NITZ string, someone made the assumption that if
any data follows the DST flag, it must be be the android emulator appending
an actual timezone string in "Area!Location" format.  However, it seems that
some carriers or perhaps in some locations, the carrier sends an additional
field in the NITZ string.  For example, this is a string from AT&T:

12/07/01,09:37:43-16,01,310

The extra field is "310" above.  This patch will only assume that the field
in question is a textual timezone if and only if it contains an exclamation
point.  Otherwise, the extra field is ignored and the timezone is parsed
as it should be.

Change-Id: I6cc4278027a6de5545d76b803f5359923e60878a
Signed-off-by: Gary Dezern <garyd9@gmail.com>
Smdk4210RIL: added support for hd-voice (wideband amr)

Change-Id: I93d3d985d38a2b852023c3803eb2073dea989185
Add SamsungCDMAQualcommRIL class for CDMA Galaxy S III family based on msm8960.

* Samsung CDMA RIL doesn't send CDMA NV in RIUM infomation format which causes
the CDMA RIL stack to crash and end up not being provisioned.
* Samsung put CDMA NV in GSM format. I forced the RIL stack to process CDMA NV
request as a GSM SIM in CDMA mode.
* Fix hangup bug, force drivercall class not to crash due to a malformed
response from ril. I suspect samsung rom ignores that. --FIXED properly JULY 3RD
* Workaround for signal strength.
* Properly fix drivercall which caused a regression in the previous attempt to
fix driver call because the ril is giving another request for videocall
infomation and causing drivercall to crash.
patchset 3, 4, and 7: Cleanup whitespace
patchset 8: wrapped commit message
Change-Id: I733a635edc645f4e7952083008e7eca12d7af015
Smdk4210RIL: some cleanup

Change-Id: Ic715d1f7657d2ca99cc44d6b6971daeee176530e
SamsumgCDMAQualcommRIL: 'Phantom Ringtone' Fix

Import the fix from SamsungRIL to fix the 'Phantom ringtone' (or 'Ring of Death').
See source for comments about the fix.

Change-Id: Id62c5f5347942fe8afa1d1962d0b7f3845e25e4c