Fix WebView.loadData ignores encoding on Android 3.x and after

In WebView.loadData encoding parameter was ignored (expect if the value was 'base64').
Now, charset encoding is used to display the data.

The following call should display well.
webView.loadData("éàçèù", "text/plain", "utf-8") will display 'éàçèù' where it display garbage in version > 3.x.
webview.loadData("aGVsb68=", "text/plain", "base64") will still display 'hello'.
webview.loadData("6eDn6Pk=", "text/plain", "utf-8,base64") will show 'éàçèù' where it display garbage in the current version.
webview.loadDataWithBaseURL(url, "éàçèù", "text/plain", "utf-8", null) will still display 'éàçèù' if (url is null or different of "data:").
webView.loadDataWithBaseURL("data:", "éàçèù", "text/plain", "utf-8", null) will display 'éàçèù' where it display garbage in version > 3.x

This assure downward compatibility with the change made in 3.x

This fix a bug that appears in the 3.x android version.
Fix issues:
19747 http://code.google.com/p/android/issues/detail?id=19747
19306 http://code.google.com/p/android/issues/detail?id=19306
17163 http://code.google.com/p/android/issues/detail?id=17163

Sources:
- http://en.wikipedia.org/wiki/Data_URI_scheme
- http://tools.ietf.org/html/rfc2397

Amends:
rebased to 4.3
remove + string concat
remove "or base64" from the url encoded case
integrate jb remastering
integrate new comments style

Change-Id: I518d916204423f3fc78f76e4e868e5d5377c1cea
Signed-off-by: Guillaume Châtelet <guillaume.chatelet@orange.com>
Add Javadoc and Exception for getCapabilitiesForType().

getCapabilitiesForType() will throw an error.
However, there was no description of the error that is thrown javadoc.
Therefore, the description has been added to the javadoc.

Change-Id: I336877515d80e04c8411c96eec5ea7193a70b5e9

Conflicts:
	media/java/android/media/MediaCodecInfo.java
Don't play notifications during noise-free condition

Don't play sound and vibrate of notification when recording source
is speech recognition or camcorder.
Add a query method in AudioManager to know whether camcorder is
active recording source.

Change-Id: Ia645e40faf99e3cb0969a7843cb2a81d3581ae93
Signed-off-by: Soowon Choi <soowon.choi@lge.com>
voip: set the DSCP mark for RTP packets

Set the DSCP mark for RTP packets to 0x38 (DSCP Class Selector 7), so that the RTP packets maybe put
in the high-priority AC_VO WiFi queue to get better Voice performance.
With this marking, U-APSD (WMM powersave) may also be enabled, if the Acces Point support this.

Change-Id: I72d6d8904455531de2cad347975dae31f3d59a5a
Author: Frode Isaksen <frodex.isaksen@intel.com>
Signed-off-by: Frode Isaksen <frodex.isaksen@intel.com>
Singed-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: 21361

Conflicts:
	voip/jni/rtp/RtpStream.cpp
Telephony: Definition of new data profile based on apn type

Definition of new data profiles MMS, HIPRI and SUPL.
The value of the data profile is determined based on the the apn type
define in Phone.java.

Change-Id: Idcd26ccc49f3e0f32bd8a79b7b94db6caa0ca3e2
Author: Alain Kouassu <alain.kouassu@intel.com>
Signed-off-by: Alain Kouassu <alain.kouassu@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: 32959
Detach engines before destroying WallpaperService

WallpaperService contained a race condition where the service might be
destroyed before all its engines had been detached. For subclass
ImageWallpaper this would leak the engine's BroadcastListener, which in
turn would trigger a system crash (as ImageWallpaper runs as part of
the system).

Change-Id: Ia900173a1d3070cbf6bcf769f68376c8c8cbc62a

Conflicts:
	core/java/android/service/wallpaper/WallpaperService.java
SyncManager: android reset is occurred.

When you run the settings using the status bar at the credit card while setting the google account, solve problems that may occur like android reset.

Change-Id: I543444b2255da840935cb26f60d66c465f67203e
GlobalAction dialog ref not set to null

When a GlobalAction dialog is dismissed when screen goes into
sleep the reference mDialog is not set to null. Next time the
long presses power button and brings up the GlobalAction dialog
the old reference still exist and we try to dismiss the dialog
again even if it does not exist.

The dialog reference in this case holds on to the dialog object
using more memory than neccesary, and in rare cases we might get
a crash when the dialog object is dissmissed the second time.

Change-Id: I44ef1c385d90777e8f6dd9fe111eb3d9b0d3cf3f
Check if intent can be resolved before starts

Change-Id: Ib9ef20f9480b1ad2093955fffb34298d493015d6
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
Fix a typo in NumberPicker javadoc.

Change-Id: I7c1777e166dabe2e24403301049f2d6e06b97e2d
improving translation

Change-Id: Ic4c51d532952d67dc1efbbe088b06e7b834835df
Setting MTU size for specific network.

Able to config network specific MTU size. Normally, the default size of MTU is 1500.
 US - ATT 1410, TMUS 1440, SPRINT 1422
 KR - SKT 1440, KT 1450, LGU+ 1428
 JP - KDDI 1420, SoftBank 1340
 CA - RGS 1430, FIDO 1430, MTS 1430, BELL 1358, SaskTel 1358
 AU - TEL 1400

Bug:10195070
Change-Id: Iafcef2061d5cac53ddb773c7a35daff7bef8ffa5

Conflicts:
	core/res/res/values-mcc302-mnc370/config.xml
	core/res/res/values-mcc302-mnc720/config.xml
	core/res/res/values-mcc302-mnc780/config.xml
	core/res/res/values-mcc310-mnc260/config.xml
	core/res/res/values-mcc505-mnc01/config.xml