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

Commit 2f1258d2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Resolve XML parser used to parse system data."

parents 713bf48d e72d3dec
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -51,7 +51,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;


public class WallpaperBackupAgent extends BackupAgent {
public class WallpaperBackupAgent extends BackupAgent {
    private static final String TAG = "WallpaperBackup";
    private static final String TAG = "WallpaperBackup";
@@ -323,8 +322,7 @@ public class WallpaperBackupAgent extends BackupAgent {
    private Rect parseCropHint(File wallpaperInfo, String sectionTag) {
    private Rect parseCropHint(File wallpaperInfo, String sectionTag) {
        Rect cropHint = new Rect();
        Rect cropHint = new Rect();
        try (FileInputStream stream = new FileInputStream(wallpaperInfo)) {
        try (FileInputStream stream = new FileInputStream(wallpaperInfo)) {
            XmlPullParser parser = Xml.newPullParser();
            XmlPullParser parser = Xml.resolvePullParser(stream);
            parser.setInput(stream, StandardCharsets.UTF_8.name());


            int type;
            int type;
            do {
            do {
@@ -351,8 +349,7 @@ public class WallpaperBackupAgent extends BackupAgent {
    private ComponentName parseWallpaperComponent(File wallpaperInfo, String sectionTag) {
    private ComponentName parseWallpaperComponent(File wallpaperInfo, String sectionTag) {
        ComponentName name = null;
        ComponentName name = null;
        try (FileInputStream stream = new FileInputStream(wallpaperInfo)) {
        try (FileInputStream stream = new FileInputStream(wallpaperInfo)) {
            final XmlPullParser parser = Xml.newPullParser();
            final XmlPullParser parser = Xml.resolvePullParser(stream);
            parser.setInput(stream, StandardCharsets.UTF_8.name());


            int type;
            int type;
            do {
            do {