am 0f667f58: Merge "Ignore spammy package logs when dumping." into lmp-mr1-dev

* commit '0f667f5855bff7432002dba2ef0d393fe2ad955f':
  Ignore spammy package logs when dumping.
This commit is contained in:
Jeff Sharkey
2014-11-24 22:26:10 +00:00
committed by Android Git Automerger

View File

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