Fix for updating TCP buffer size when switching network type

When PDP connects in GSM network, the TCP buffer window size is
set to max 8760. If the phone swicthes to UMTS, the TCP buffer
size is not updated to UMTS, i.e. GPRS buffer size is still
used with limited data transfer spead as a result.
This fix makes sure the TCP buffer size is updated when
switching network type.

Based off of (varible name change): https://android-review.googlesource.com/#/c/41612/

Change-Id: Idf19bca0b2eca218899aba68002d652b65070916
Audio: Restore volume for all streams on headset connect/disconnect

Audio streams which play sound from both speaker and a connected device would
report to AudioService only the speaker as the playback device, meaning volumes
would not be saved for a separate device state. This patch makes it so the
connected device will be reported instead, fixing volume restore on device
change for those streams (alarm, ring, notifications).

Readded safe headset restore capping for all streams.

Patch Set 3: Changed cap to 10/15

Change-Id: Id2e690f7894475ba0086f62342b8eeb163d24da1

Conflicts:

	media/java/android/media/AudioService.java
Audioservice: fix A2dp support on Samsung's Audio Policy HAL.

Samsung's audio policy HAL doesn't handle A2DP delay commands
correctly which was merged in JB.
Adds a nodelaya2dp config option.

Change-Id: Ib2a1648876ad7b5b21194bd2ad27f5767e46dbb2

Conflicts:

	core/res/res/values/public.xml

Conflicts:

	media/java/android/media/AudioService.java
kill dupes
Framework: Audio service - add missing pieces from CM9 port

Author: Phil Tunstall
Fix ring/notification volume not restoring correctly on headset (dis)connect

We weren't checking the alias of each stream when restoring, which meant that
for the notification stream volume:
1. The wrong volume level would be stored.
2. The volume level to restore would be retrieved from the wrong place, and then
overwrite the correctly restored ring stream volume.

As well as fixing that I have improved the readability of the code a bit.

 + Change-Id: I95234c2b7ad7dfd4dbd455a56c8a69975c514b50

Author:  Phil Tunstall
Sound preference: Safe volume restore when plugging in a headset (1/2)
When enabled, volumes that were above a threshold (~55%) the previous time
something was connected to the audio jack will be restored to that threshold
rather than their full level.

Affects all sound streams apart from voice call audio.

 + Change-Id: I0007a09ce75b55c95986e38a4cbb24fe4e8200a9

Author: dalingrin
Add separate headset and speaker volumes
This is a simple implementation of keeping separate volume
settings for the wired headset and the speaker without
overhauling the audio system.

This allows a person with sensitive headphones to keep music, ringer
and other stream volumes lower than they would usually keep the
speaker volumes.

 + Change-Id: Ia614c1e3ac548ff4e0104a090cda13b9daef09cb

Author: gsarrica
Allow unlinking of notification sound and ringtone volume.
Thanks to http://forum.aokp.co/ for this.

 + Change-Id: I55db003cc1691fbca5d3e8ea79e088d0622d38ee

Settings side has been merged

Change-Id: I19deecf2346bcf0691dc3a1480791df7b00afb06

Conflicts:

	media/java/android/media/AudioService.java
Add safe headset volume check (1/2) Credit: CyanogenMod

Change-Id: I346133915da311948fec1771ad2a8cbb282d0e6b