Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37f0e0b4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Clean hidden api - FastXmlSerializer"

parents aa9664c4 5da79ad7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
package com.android.bluetooth.avrcpcontroller;

import android.util.Log;

import com.android.internal.util.FastXmlSerializer;
import android.util.Xml;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -290,7 +289,7 @@ public class BipImageDescriptor {
            return null;
        }
        StringWriter writer = new StringWriter();
        XmlSerializer xmlMsgElement = new FastXmlSerializer();
        XmlSerializer xmlMsgElement = Xml.newSerializer();
        try {
            xmlMsgElement.setOutput(writer);
            xmlMsgElement.startDocument("UTF-8", true);
+2 −3
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
package com.android.bluetooth.avrcpcontroller;

import android.util.Log;

import com.android.internal.util.FastXmlSerializer;
import android.util.Xml;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -305,7 +304,7 @@ public class BipImageProperties {
    @Override
    public String toString() {
        StringWriter writer = new StringWriter();
        XmlSerializer xmlMsgElement = new FastXmlSerializer();
        XmlSerializer xmlMsgElement = Xml.newSerializer();
        try {
            xmlMsgElement.setOutput(writer);
            xmlMsgElement.startDocument("UTF-8", true);
+1 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ import android.util.Log;
import android.util.Xml;

import com.android.bluetooth.Utils;
import com.android.internal.util.FastXmlSerializer;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -91,7 +90,7 @@ public class BluetoothMapConvoListing {
     */
    public byte[] encode() throws UnsupportedEncodingException {
        StringWriter sw = new StringWriter();
        XmlSerializer xmlConvoElement = new FastXmlSerializer(0);
        XmlSerializer xmlConvoElement = Xml.newSerializer();
        try {
            xmlConvoElement.setOutput(sw);
            xmlConvoElement.startDocument("UTF-8", true);
+1 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ import android.util.Log;
import android.util.Xml;

import com.android.bluetooth.Utils;
import com.android.internal.util.FastXmlSerializer;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -266,7 +265,7 @@ public class BluetoothMapFolderElement implements Comparable<BluetoothMapFolderE

    public byte[] encode(int offset, int count) throws UnsupportedEncodingException {
        StringWriter sw = new StringWriter();
        XmlSerializer xmlMsgElement = new FastXmlSerializer(0);
        XmlSerializer xmlMsgElement = Xml.newSerializer();
        int i, stopIndex;
        // We need index based access to the subFolders
        BluetoothMapFolderElement[] folders =
+2 −6
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ import android.util.Log;
import android.util.Xml;

import com.android.bluetooth.DeviceWorkArounds;
import com.android.internal.util.FastXmlSerializer;

import org.xmlpull.v1.XmlSerializer;

@@ -91,20 +90,17 @@ public class BluetoothMapMessageListing {
    public byte[] encode(boolean includeThreadId, String version)
            throws UnsupportedEncodingException {
        StringWriter sw = new StringWriter();
        XmlSerializer xmlMsgElement = null;
        boolean isBenzCarkit = DeviceWorkArounds.addressStartsWith(
                BluetoothMapService.getRemoteDevice().getAddress(),
                DeviceWorkArounds.MERCEDES_BENZ_CARKIT);
        try {
            XmlSerializer xmlMsgElement = Xml.newSerializer();
            xmlMsgElement.setOutput(sw);
            if (isBenzCarkit) {
                Log.d(TAG, "java_interop: Remote is Mercedes Benz, "
                        + "using Xml Workaround.");
                xmlMsgElement = Xml.newSerializer();
                xmlMsgElement.setOutput(sw);
                xmlMsgElement.text("\n");
            } else {
                xmlMsgElement = new FastXmlSerializer(0);
                xmlMsgElement.setOutput(sw);
                xmlMsgElement.startDocument("UTF-8", true);
                xmlMsgElement.setFeature(
                        "http://xmlpull.org/v1/doc/features.html#indent-output", true);
Loading