diff options
author | Wojciech Staszkiewicz <staszkiewicz@google.com> | 2015-05-14 10:34:55 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-05-14 10:34:55 +0000 |
commit | e2ad30ef5168d55f7c1b4a2dc4fe699be1bf8a48 (patch) | |
tree | e80c8eb1f2a67192138dea8821b51d03ad6b42e7 /packages/SettingsProvider | |
parent | dee1479c90179b7307cb889a4a233ef8633fabe8 (diff) | |
parent | be752b1f28f1f3724b235e3f0a77b4c07c40e631 (diff) | |
download | frameworks_base-e2ad30ef5168d55f7c1b4a2dc4fe699be1bf8a48.zip frameworks_base-e2ad30ef5168d55f7c1b4a2dc4fe699be1bf8a48.tar.gz frameworks_base-e2ad30ef5168d55f7c1b4a2dc4fe699be1bf8a48.tar.bz2 |
am be752b1f: Merge "Pass charset to XmlPullParser.setInput instead of null" into mnc-dev
* commit 'be752b1f28f1f3724b235e3f0a77b4c07c40e631':
Pass charset to XmlPullParser.setInput instead of null
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java index f853f3f..9209c26 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java @@ -38,6 +38,7 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; @@ -353,7 +354,7 @@ final class SettingsState { out = destination.startWrite(); XmlSerializer serializer = Xml.newSerializer(); - serializer.setOutput(out, "utf-8"); + serializer.setOutput(out, StandardCharsets.UTF_8.name()); serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); serializer.startDocument(null, true); serializer.startTag(null, TAG_SETTINGS); @@ -406,7 +407,7 @@ final class SettingsState { } try { XmlPullParser parser = Xml.newPullParser(); - parser.setInput(in, null); + parser.setInput(in, StandardCharsets.UTF_8.name()); parseStateLocked(parser); } catch (XmlPullParserException | IOException e) { |