telephony: SignalStrengh: Don't calculate a LTE snr if the srq is invalid

If the previous values are invalid and signal quality is -1, chances are there's
no LTE signal at all, so don't calculate the SNR and mark it invalid as well.

This fixes the strength indicator in GSM devices where it was being skewed
by the ghost LTE value

Change-Id: I070573401c141aa99941a332ee256246697abb90
Telephony: Add getLteOnGsmMode() method (1/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.
Samsung STK support

Change-Id: I08d169bc466df290fca838b09f6b0fbea2ac82a8

Conflicts:
	telephony/java/com/android/internal/telephony/RILConstants.java

Conflicts:
	core/res/res/values/config.xml
	core/res/res/values/symbols.xml
core and telephony: Additional HSPAP support

Change-Id: I5e921d2308d873678d6ef67a91cff50d383a176b
CDMA RIL: add SVDO support (1/2)

based on Richard Ross's commit

Change-Id: I313edd3c52d1d0b397ca519757470b87882424d7
Framework: Fix GSM signal strength

Certain OEM gsm ril libs send back a bogus value for LTE signal
that causes SignalStrength.java to default to LTE and report
incorrect signal values.
Use prop value ro.telephony.ril.v3=signalstrength to get proper
GSM signal reading on certain devices.

Change-Id: Ibb23d7b3a2d21001ccbbc6ebfbdc3c5248f18cfc
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>

Conflicts:
	telephony/java/android/telephony/SignalStrength.java
telephony: hide needsOldRilFeature

Change-Id: I741b510fdacc166ad40741bf2e9db5c8a1039384
TelephonyProperties: Alpha ID fix for OPEN_CHANNEL and other p-commands (1/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: I012707285ee3a93119c2e2956ec599d631db10d5
Signed-off-by: dhacker29 <davidhackerdvm@gmail.com>

Conflicts:

	telephony/java/com/android/internal/telephony/TelephonyProperties.java
ServiceState: add support for DCHSPAP

Change-Id: Ib0a328652c14580718400b00146b770481be5458
Signal strength: add more checks to signal strength,

so it doesn't fall under the range of poor signal and automatically
assumes a gsm signal, actually checks if all values are true and not
valid then pass it on to lte or gsm. This fixes cases when gsm signal
is not valid and lte is active. When lte is active and shows a really
weak and gsm signal is not avalible due some broken vendor ril or
just running cdma lte and a few others senario creates this issue.

Change-Id: If9c5dc1a969605cd1eeb9218de02a9f8dbbd3ae1
Enable SVDO. (2/2)

Allow evdo/ehrpd + voice simutaneously.
Use ro.ril.svdo=true
Change-Id: Ifcefd1ee49c5137209b776b00ae8e189dc618247
TelephonyManager: isSmsCapable: respect telephony properties

The 2 telephony properties override if SMS send/receive is enabled
in the telephony code. Also respect them for the isSmsCapable API.

Use case: Acer A700/701 (Wi-Fi only/3G) share the same build

Change-Id: Iaa1b45c62fa5a48a4c4a222d5e47980dd1678d48
Telephony: Add support for NETWORK_TYPE_GSM

Add support for NETWORK_TYPE_GSM in TelephonyManager and
corresponding mapping in ServicState.java so that when
application queries getVoiceNetworkType() and currently
camped rat is GSM, they get network mode as GSM instead
of network mode unknown.

Change-Id: I5e971c625532696776b9555ad8cfd85eba4fc423
CRs-Fixed: 526435
(cherry picked from commit 3e01fcec13725955f0ca3fb20730ff21f4edc128)
(cherry picked from commit c70f5687965908cd585e52901cf6cd88bd405140)
(cherry picked from commit 8e3c2300729ecb3cd3e6b640b0174f49e2189f0c)
Squashed commit of the theme engine support.

Updated 4.2 support for the old T-Mobile theme engine, as usual
needs the provider and switcher apps installed as well.

I'm finally dropping the 400+ commit history on this, since everybody
else keeps picking it up from CM as a single patch anyway... But
for the record, nothing of this would be possible without Josh, Ed,
and the rest of the TMo guys who wrote and maintained it until 2.2:

amit chabra <amit.chabra@t-mobile.com>
Amit Kohli <amit.kohli@t-mobile.com>
Chris Cogar <chriscogar@t-mobile.com>
Dirk Sigurdson <dirk.sigurdson@t-mobile.com>
Ed Carrigan <edward.carrigan@t-mobile.com>
Gaurav Sharma <gaurav.sharma3@t-mobile.com>
Hui Feng <hui.feng@t-mobile.com>
John Ritz <john.ritz1@t-mobile.com>
Josh Guilfoyle <josh.guilfoyle@t-mobile.com>
Mark Roberts <mark.roberts48@t-mobile.com>
Pankaj Kumar <Pankaj.kumar6@t-mobile.com>
Samuel Cheung <samuel.cheung@t-mobile.com>
Sergey Ten <sergey.ten6@t-mobile.com>

Change-Id: I7148d51be48f28a2dc4bdf9ec9018f04b268ffc4

Conflicts:

	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/SystemServer.java
	services/java/com/android/server/am/ActivityManagerService.java
	services/java/com/android/server/wm/WindowManagerService.java
SystemUI: Reinflate on theme change

Summary:
Reflect the updated assets immediately once the config_changed
notification happens

Change-Id: I480a719fbdd45875277871af39ce65849918ec0a

Test Plan: build, test, merge

Reviewers: synergy, anders3408, jriordan001, raymanfx, donald.munn

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D168
Bring in internal framework for all the CFX Feature winning!
Bring in CAF/CM Bluetooth resources. Much love and respect to all!

Summary: Resources needed for Qcom device BT support

Test Plan: Get it to compile with other needed revisions, get it to work, merge

Reviewers: synergy, anders3408, jriordan001, raymanfx, donald.munn

Differential Revision: http://review.codefirex.com/D191
gps: Add support for Qualcomm GPS hardware

 * This ABI is changed, but we aren't using the new features in MR1.
 * Add a little translation for the changed fields and methods.

Change-Id: Ieecc2235b42f64fc69d4651855f4e9edfe7d738d
Add support for Samsung extended AGPS

The AGPS implementation in the GPS chipset used in some Samsung devices
(i9100, i9300) can make use of the Psc field. Adapt the relevant
functions hiding the changes incompatible with other devices under the
AGPS_USE_PSC #define.

Credit to Qaweck from xda-developers forum for finding the meaning
of the field.

Change-Id: Ie4691c79ca379a1f5c0a87500c1b06b56ae7ac0d
fix for screenshot animation glitch in portrait

Summary:
edits by Stefano Semeraro aka Suxsem.

Change-Id: I7a03a24c5b1bfdfe616f940b2bd7be42091f45a6

framework: fix screenshot and rotation animation for devices with abnormal hw rotation

port foreward from cm10.1:
https://github.com/CyanogenMod/android_frameworks_base/commit/ac555b9ca9a76d13a26fc9ea40980fe57258761b#diff-d6f7bba268a742c91252cc9e64e2381a

Change-Id: I14b6e2403b9be345a1a591138f8a3a12ca8e4f89

Test Plan: build, test, merge

Reviewers: synergy, jriordan001, donald.munn, raymanfx, randall.rushing, anders3408

Reviewed By: anders3408

Differential Revision: http://review.codefirex.com/D187