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

Commit f8b130c1 authored by Zongheng Wang's avatar Zongheng Wang
Browse files

Use the public constructure of FastXmlSerializer

FastXmlSerializer() is an @UnsupportedAppUsage. There's another
constructure FastXmlSerializer(int bufferSize) which is public. When
buffer size is zero or negative, the default buffer size will be used.
So FastXmlSerializer() and FastXmlSerializer(0) should be the same.

Bug: 145231333
Test: Manual
Change-Id: I88bab4d655fa0ec59d4445362e06f46b1c5bacec
parent c5725410
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ public class BluetoothMapConvoListing {
     */
    public byte[] encode() throws UnsupportedEncodingException {
        StringWriter sw = new StringWriter();
        XmlSerializer xmlConvoElement = new FastXmlSerializer();
        XmlSerializer xmlConvoElement = new FastXmlSerializer(0);
        try {
            xmlConvoElement.setOutput(sw);
            xmlConvoElement.startDocument("UTF-8", true);
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ public class BluetoothMapFolderElement implements Comparable<BluetoothMapFolderE

    public byte[] encode(int offset, int count) throws UnsupportedEncodingException {
        StringWriter sw = new StringWriter();
        XmlSerializer xmlMsgElement = new FastXmlSerializer();
        XmlSerializer xmlMsgElement = new FastXmlSerializer(0);
        int i, stopIndex;
        // We need index based access to the subFolders
        BluetoothMapFolderElement[] folders =
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class BluetoothMapMessageListing {
                xmlMsgElement.setOutput(sw);
                xmlMsgElement.text("\n");
            } else {
                xmlMsgElement = new FastXmlSerializer();
                xmlMsgElement = new FastXmlSerializer(0);
                xmlMsgElement.setOutput(sw);
                xmlMsgElement.startDocument("UTF-8", true);
                xmlMsgElement.setFeature(