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

Commit 0f667f58 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Ignore spammy package logs when dumping." into lmp-mr1-dev

parents 7038c390 962bd4a6
Loading
Loading
Loading
Loading
+10 −15
Original line number Diff line number Diff line
@@ -12744,23 +12744,17 @@ public class PackageManagerService extends IPackageManager.Stub {
                pw.println();
                pw.println("Package warning messages:");
                final File fname = getSettingsProblemFile();
                FileInputStream in = null;
                try {
                    in = new FileInputStream(fname);
                    final int avail = in.available();
                    final byte[] data = new byte[avail];
                    in.read(data);
                    pw.print(new String(data));
                } catch (FileNotFoundException e) {
                } catch (IOException e) {
                } finally {
                    if (in != null) {
                BufferedReader in = null;
                String line = null;
                try {
                            in.close();
                        } catch (IOException e) {
                        }
                    in = new BufferedReader(new FileReader(getSettingsProblemFile()));
                    while ((line = in.readLine()) != null) {
                        if (line.contains("ignored: updated version")) continue;
                        pw.println(line);
                    }
                } catch (IOException ignored) {
                } finally {
                    IoUtils.closeQuietly(in);
                }
            }
@@ -12770,6 +12764,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                try {
                    in = new BufferedReader(new FileReader(getSettingsProblemFile()));
                    while ((line = in.readLine()) != null) {
                        if (line.contains("ignored: updated version")) continue;
                        pw.print("msg,");
                        pw.println(line);
                    }