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
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
input: Fix workaround for broken hardware keyboard support

Using a wrong reference to mHardKeyboardAvailable caused device config
to never report physical keyboards.

Change-Id: I9b64e2d89512436c17fa8929464e2b727fba1cf3
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
SamsungRIL: Update HSDPA checking for jellybean

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

Change-Id: I689aa448853677a8719af963bf3370abaefdaf23
implement noise suppression for phone calls (1/2)

Change-Id: I3604c51aae676025d29511f0547e755e42d56b38
Fix don't interrupt ongoing PIN/PUK verification

This fixes an issue which only occurs if
1. you use a SIM PIN
2. the PIN verification takes longer than the screen timeout is. e.g. when then screen turns black while "unlocking SIM" message is displayed!

It might be possible to simulate the bug by pressing power quickly after the PIN has ben entered and "unlocking SIM" message is still being displayed.

If the PIN verification takes longer thant the screen timeout is then the screen turns black.
If that happens LockPatternKeyguardView.reset() is called which then forces a re-creation of the view. But then the original created
SimUnlockScreen.onSimLockChangedResponse callback never receives the success message for the SIM unlock.
What then happens is that the LockPatternKeyguardView is re-created again and again whenever screen turns off while waiting
until we receive a SIM state changed event e.g. until we are back on network.
But when that happens we are presented the pattern unlock screen. With a single touch we can then (finally) get on the homescreen.

The fix removes the forced re-creation of the LockPatternKeyguardView if there is a PIN/PUK verification in progress. Which leads to a 'normal' unlock behavior:
1. enter pin
2. "unlocking SIM" message is displayed
3. maybe screen turns off after timeout
4. after some seconds you get on the homescreen directly

former ICS submission: http://review.cyanogenmod.com/#/c/19243/

AOSP: https://android-review.googlesource.com/#/c/32310/

The issue is still present when using jellybean code.

Change-Id: I1f9bb26105d07c72b59bdec064e9e93cbdc918c4
Camera : Powerkey shutter (1/3)

Allows user to take use power key to take pictures/videos

Patchset 2 : Add mask to setFlags
Patchset 3 : Rebased

Change-Id: Ic54cae422d7cf66c28d9ca778eca7931cc62c851
Disable touch while using the stylus (Galaxy Note)

Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.

The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.

Change-Id: I9f458d85d8bf83d6cf03b467d46ce066fd55b7e0
hwui: Disable framebuffer discarding for exynos4 devices

Change-Id: I27671f1dfc32f19dc792b9b13c328247e2b7b5fc
Framework : @Hide PREVENT_POWER_KEY

@Hide PREVENT_POWER_KEY to prevent it from entering public sdk.

Change-Id: I4fa9430d9796a9eac7273398092dfc9b5cc54d84
Framework : Hide PREVENT_POWER_KEY permission

@Hide PREVENT_POWER_KEY permission to prevent it from entering public sdk.

Change-Id: I9955ed17942db5a7f179c2efc97b5b1e563926e2
input: fix recents opening when waking the device with the home button without lockscreen

Port from ics
http://review.cyanogenmod.com/#/c/18584/

Change-Id: I354ace2a3b37bd336d2806b941f779538bc96c74
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
Smdk4210RIL: switch video and voicePrivacy, readability

Change-Id: I168abd4c11c576681d8d4774dfb751da8d19a49c
fix NAT detection in SipService

The NAT detection in SipService just checks if the client IP is a
private address. In this case keep alive is enforced. But if you
use a server which also has a private address, keep alive should not
be enabled to save battery.
This patch modifies the NAT detection to also check the server IP.
If both are private, NAT is not detected.

Change-Id: If4baaf1866253ca6c432e5cc4b07e3ebd9de6ba1