Telephony: Start DataStallAlarm only on Data CONNECTED state

Telephony framework uses AlarmManager for recovery mechanism of data
stalled issue.
Framework configures the ELAPSED_REALTIME_WAKEUP alarm for every
6minutes irrespective of the data state. Due to this,quiet a few
wakeups are seen even when the device is not connected to Mobile
Data network.

Fix is to check the Data connection state before starting
this alarm.

Change-Id: I219bff9199e5ce70bbcd05c95d65731886215fe9
Author: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Jeevaka Badrappan <jeevaka.badrappan@intel.com>
Signed-off-by: Arun Ravindran <arun.ravindran@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 28494
Telephony: Unregister from UiccController when disposed

Change-Id: I296d3f292a72d2f8181f866bd1de7637c8333c63
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
Merge "SamsungExynos3RIL: don't send IccStatus notification on CDMA devices" into cm-10.1
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
CatService: Alpha ID fix for OPEN_CHANNEL and other p-commands (2/2)

p-cmds that support the below mentioned scenarios:
- SETUP CALL
- OPEN CHANNEL
- SEND DTMF
- SEND SMS
- SEND SS
- SEND USSD
- LAUNCH BROWSER
- PLAY TONE
- SELECT ITEM

Senarios handled :
- NO ALPHA ID : Introduce a new configurable sys prop
  "persist.atel.noalpha.usrcnf".
   --  Allow display of default UI confirmation if prop is set to true
   --  No UI confirmation to be show if prop is set to false
- NULL ALPHA ID (len = 0 ) :
   -- NO UI confirmation to be displayed

Cherry-picked from CAF commit 5ea0d64186ca08abc0857aae1f83de969393be3b
Without this SimToolkit will pop up asking for user response instead
of recieveing response from framework.

Change-Id: I75b9b9ee630e31154e940bc47ff951f8a1dab236
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
Merge "Telephony: Start DataStallAlarm only on Data CONNECTED state" into cm-10.1
Merge "Telephony: Unregister from UiccController when disposed" into cm-10.1
Mms auto-retrieval (2/3): framework

Change-Id: If59780c1a4c153618a2110c60b1b1d4c03f145fd

It's only porting this http://review.cyanogenmod.org/#/c/26166/
Part 2 of 3

Patch Set2:
Correncting undifened symbols
Merge "Fix restoring network mode preference on reboot" into cm-10.1
Merge "SamsungExynos4RIL: fix signal strength" into cm-10.1
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
Merge "SamsungExynos3RIL: fix unable to swtich 2G/3G while connected to wifi" into cm-10.1
Reset data stall watch dog after doing recovery

Without resetting data stall watch dog, one data
stall will lead to radio reset if there is no
data traffic after doing recovery.

Change-Id: Icc7b1e7f160cd0c8910f7132d7c2fea0d29803e5
Signed-off-by: Bin Li <libin@marvell.com>
Telephony: Correct the typo in RIL.java

Change-Id: Ic4bcd054f14d7e4b702b924f799e4d1619b666e0
PhoneProxy: On v6 or greater RIL, when LTE_ON_CDMA is TRUE,

always create CDMALTEPhone, irrespective of the voice radio
tech reported.  Newer phones now have v7 RIL which need
this to be true also also for data connection to initiate.

Change-Id: I2825aa53c1525b71d7551a7b2ceff7c3931cc344
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>
telephony: Support for Virgin Mobile MMS

Based off of rmcc's bringup commit for jellybean:
https://github.com/CyanogenMod/android_frameworks_base/commit/657a58f681f389010f214dd3ee23102cf17e325b

Change-Id: Ife2d39da9a5adfc19bb6389cb36b5c12eb5a903a
Signed-off-by: Gannon Macdonald <gannon050197@gmail.com>