Ignore spammy package logs when dumping.

Bug: 18390552
Change-Id: Ie333f57d46d6ab3f4b9daa17f98b1e94a236e959
This commit is contained in:
Jeff Sharkey
2014-11-24 13:43:45 -08:00
parent 43aef1643b
commit 962bd4a691

View File

@@ -12744,23 +12744,17 @@ public class PackageManagerService extends IPackageManager.Stub {
pw.println();
pw.println("Package warning messages:");
final File fname = getSettingsProblemFile();
FileInputStream in = null;
BufferedReader in = null;
String line = 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) {
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);
}