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

Commit 962bd4a6 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Ignore spammy package logs when dumping.

Bug: 18390552
Change-Id: Ie333f57d46d6ab3f4b9daa17f98b1e94a236e959
parent 43aef164
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);
                    }