Change heuristic interface to add a URI field.
Change-Id: I9b84f64999f219cd0c149197e4b2aa963a8b40f7
diff --git a/src/com/android/loganalysis/heuristic/AbstractHeuristic.java b/src/com/android/loganalysis/heuristic/AbstractHeuristic.java
index d74ab4a..459883e 100644
--- a/src/com/android/loganalysis/heuristic/AbstractHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/AbstractHeuristic.java
@@ -16,6 +16,7 @@
package com.android.loganalysis.heuristic;
import com.android.loganalysis.item.BugreportItem;
+import com.android.loganalysis.item.ConflictingItemException;
import com.android.loganalysis.item.DumpsysItem;
import com.android.loganalysis.item.KernelLogItem;
import com.android.loganalysis.item.LogcatItem;
@@ -37,7 +38,8 @@
* {@inheritDoc}
*/
@Override
- public void addBugreport(Date timestamp, BugreportItem bugreport) {
+ public void addBugreport(BugreportItem bugreport, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
@@ -45,7 +47,8 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
@@ -53,7 +56,8 @@
* {@inheritDoc}
*/
@Override
- public void addKernelLog(Date timestamp, KernelLogItem kernelLog) {
+ public void addKernelLog(KernelLogItem kernelLog, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
@@ -61,7 +65,18 @@
* {@inheritDoc}
*/
@Override
- public void addMemInfo(Date timestamp, MemInfoItem meminfo) {
+ public void addMemInfo(MemInfoItem meminfo, Date timestamp, String uri)
+ throws ConflictingItemException {
+ // Ignore
+ }
+
+ /**
+ * {@inheritDoc}
+ * @throws ConflictingItemException
+ */
+ @Override
+ public void addProcrank(ProcrankItem procrank, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
@@ -69,7 +84,8 @@
* {@inheritDoc}
*/
@Override
- public void addProcrank(Date timestamp, ProcrankItem procrank) {
+ public void addTop(TopItem top, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
@@ -77,15 +93,8 @@
* {@inheritDoc}
*/
@Override
- public void addTop(Date timestamp, TopItem top) {
- // Ignore
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void addDumpsys(Date timestamp, DumpsysItem dumpsys) {
+ public void addDumpsys(DumpsysItem dumpsys, Date timestamp, String uri)
+ throws ConflictingItemException {
// Ignore
}
diff --git a/src/com/android/loganalysis/heuristic/AnrHeuristic.java b/src/com/android/loganalysis/heuristic/AnrHeuristic.java
index 3ad6ec3..ece2f29 100644
--- a/src/com/android/loganalysis/heuristic/AnrHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/AnrHeuristic.java
@@ -41,7 +41,7 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
diff --git a/src/com/android/loganalysis/heuristic/CpuUsageHeuristic.java b/src/com/android/loganalysis/heuristic/CpuUsageHeuristic.java
index da2f161..81104c0 100644
--- a/src/com/android/loganalysis/heuristic/CpuUsageHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/CpuUsageHeuristic.java
@@ -49,14 +49,15 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
/**
* {@inheritDoc}
*/
- public void addTop(Date timestamp, TopItem top) {
+ @Override
+ public void addTop(TopItem top, Date timestamp, String uri) {
mTop = top;
}
diff --git a/src/com/android/loganalysis/heuristic/IHeuristic.java b/src/com/android/loganalysis/heuristic/IHeuristic.java
index 4bdfab5..3d8be15 100644
--- a/src/com/android/loganalysis/heuristic/IHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/IHeuristic.java
@@ -16,6 +16,7 @@
package com.android.loganalysis.heuristic;
import com.android.loganalysis.item.BugreportItem;
+import com.android.loganalysis.item.ConflictingItemException;
import com.android.loganalysis.item.DumpsysItem;
import com.android.loganalysis.item.IItem;
import com.android.loganalysis.item.KernelLogItem;
@@ -55,39 +56,102 @@
public static final String FAILED = "FAILED";
/**
- * Add a bugreport item to be checked.
+ * Add a {@link BugreportItem} to be checked.
+ *
+ * @param bugreport The {@link BugreportItem}.
+ * @param timestamp The {@link Date} of the bugreport, may be {@code null}.
+ * @param uri The URI of the bugreport, may be {@code null}.
+ * @throws ConflictingItemException If the {@link BugreportItem} contains information which does
+ * not match previously added {@link BugreportItem}s. This should only occur if the bugreports
+ * did not come from the same run. For example, if there was a device restart or if the
+ * bugreports are from multiple devices.
*/
- public void addBugreport(Date timestamp, BugreportItem bugreport);
+ public void addBugreport(BugreportItem bugreport, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a logcat item to be checked.
+ * Add a {@link LogcatItem} to be checked.
+ *
+ * @param logcat The {@link LogcatItem}.
+ * @param timestamp The {@link Date} of the logcat, may be {@code null}.
+ * @param uri The URI of the logcat, may be {@code null}.
+ * @throws ConflictingItemException If the {@link LogcatItem} contains information which does
+ * not match previously added {@link LogcatItem}s. This should only occur if the logcats did not
+ * come from the same run. For example, if there was a device restart or if logcats are from
+ * multiple devices.
*/
- public void addLogcat(Date timestamp, LogcatItem logcat);
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a kernel log item to be checked.
+ * Add a {@link KernelLogItem} to be checked.
+ *
+ * @param kernelLog The {@link KernelLogItem}.
+ * @param timestamp The {@link Date} of the kernel log, may be {@code null}.
+ * @param uri The URI of the kernel log, may be {@code null}.
+ * @throws ConflictingItemException If the {@link KernelLogItem} contains information which does
+ * not match previously added {@link KernelLogItem}s. This should only occur if the kernel logs
+ * did not come from the same run. For example, if there was a device restart or if kernel logs
+ * come from multiple devices.
*/
- public void addKernelLog(Date timestamp, KernelLogItem kernelLog);
+ public void addKernelLog(KernelLogItem kernelLog, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a memory info item to be checked.
+ * Add a {@link MemInfoItem} to be checked.
+ *
+ * @param meminfo The {@link MemInfoItem}.
+ * @param timestamp The {@link Date} of the kernel log, may be {@code null}.
+ * @param uri The URI of the kernel log, may be {@code null}.
+ * @throws ConflictingItemException If the {@link MemInfoItem} contains information which does
+ * not match previously added {@link MemInfoItem}s. This should only occur if the mem info did
+ * not come from the same run. For example, if there was a device restart or if mem info came
+ * from multiple devices.
*/
- public void addMemInfo(Date timestamp, MemInfoItem meminfo);
+ public void addMemInfo(MemInfoItem meminfo, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a procrank item to be checked.
+ * Add a {@link ProcrankItem} to be checked.
+ *
+ * @param procrank The {@link ProcrankItem}.
+ * @param timestamp The {@link Date} of the procrank output, may be {@code null}.
+ * @param uri The URI of the procrank output, may be {@code null}.
+ * @throws ConflictingItemException If the {@link ProcrankItem} contains information which does
+ * not match previously added {@link ProcrankItem}s. This should only occur if the procranks
+ * did not come from the same run. For example, if there was a device restart or if procranks
+ * come from multiple devices.
*/
- public void addProcrank(Date timestamp, ProcrankItem procrank);
+ public void addProcrank(ProcrankItem procrank, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a top item to be checked.
+ * Add a {@link TopItem} to be checked.
+ *
+ * @param top The {@link TopItem}.
+ * @param timestamp The {@link Date} of the top output, may be {@code null}.
+ * @param uri The URI of the top output, may be {@code null}.
+ * @throws ConflictingItemException If the {@link TopItem} contains information which does not
+ * match previously added {@link TopItem}s. This should only occur if the top info did not come
+ * from the same run. For example, if there was a device restart or if top info came from
+ * multiple devices.
*/
- public void addTop(Date timestamp, TopItem top);
+ public void addTop(TopItem top, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
- * Add a dumpsys item to be checked.
+ * Add a {@link DumpsysItem} to be checked.
+ *
+ * @param dumpsys The {@link DumpsysItem}.
+ * @param timestamp The {@link Date} of the dumpsys, may be {@code null}.
+ * @param uri The URI of the dumpsys, may be {@code null}.
+ * @throws ConflictingItemException If the {@link DumpsysItem} contains information which does
+ * not match previously added {@link DumpsysItem}s. This should only occur if the dumpsys did
+ * not come from the same run. For example, if there was a device restart or if dumpsys came
+ * from multiple devices.
*/
- public void addDumpsys(Date timestamp, DumpsysItem dumpsys);
+ public void addDumpsys(DumpsysItem dumpsys, Date timestamp, String uri)
+ throws ConflictingItemException;
/**
* Checks to see if there are any problems.
diff --git a/src/com/android/loganalysis/heuristic/JavaCrashHeuristic.java b/src/com/android/loganalysis/heuristic/JavaCrashHeuristic.java
index 4c32c4d..d132615 100644
--- a/src/com/android/loganalysis/heuristic/JavaCrashHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/JavaCrashHeuristic.java
@@ -41,7 +41,7 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
diff --git a/src/com/android/loganalysis/heuristic/KernelResetHeuristic.java b/src/com/android/loganalysis/heuristic/KernelResetHeuristic.java
index ba6a08c..be39f77 100644
--- a/src/com/android/loganalysis/heuristic/KernelResetHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/KernelResetHeuristic.java
@@ -42,7 +42,7 @@
* {@inheritDoc}
*/
@Override
- public void addKernelLog(Date timestamp, KernelLogItem kernelLog) {
+ public void addKernelLog(KernelLogItem kernelLog, Date timestamp, String uri) {
mKernelLog = kernelLog;
}
diff --git a/src/com/android/loganalysis/heuristic/MemoryUsageHeuristic.java b/src/com/android/loganalysis/heuristic/MemoryUsageHeuristic.java
index 1355390..49b7fa8 100644
--- a/src/com/android/loganalysis/heuristic/MemoryUsageHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/MemoryUsageHeuristic.java
@@ -49,14 +49,15 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
/**
* {@inheritDoc}
*/
- public void addMemInfo(Date timestamp, MemInfoItem top) {
+ @Override
+ public void addMemInfo(MemInfoItem top, Date timestamp, String uri) {
mMemInfo = top;
}
diff --git a/src/com/android/loganalysis/heuristic/NativeCrashHeuristic.java b/src/com/android/loganalysis/heuristic/NativeCrashHeuristic.java
index a10982c..dd24057 100644
--- a/src/com/android/loganalysis/heuristic/NativeCrashHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/NativeCrashHeuristic.java
@@ -41,7 +41,7 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
diff --git a/src/com/android/loganalysis/heuristic/PowerUsageHeuristic.java b/src/com/android/loganalysis/heuristic/PowerUsageHeuristic.java
index a9b27b3..f7c06e1 100644
--- a/src/com/android/loganalysis/heuristic/PowerUsageHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/PowerUsageHeuristic.java
@@ -48,7 +48,8 @@
/**
* {@inheritDoc}
*/
- public void addDumpsys(Date timestamp, DumpsysItem dumpsys) {
+ @Override
+ public void addDumpsys(DumpsysItem dumpsys, Date timestamp, String uri) {
mBatteryInfo = dumpsys.getBatteryInfo();
}
diff --git a/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristic.java b/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristic.java
index 3d77267..9b70b7c 100644
--- a/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristic.java
+++ b/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristic.java
@@ -52,7 +52,7 @@
* {@inheritDoc}
*/
@Override
- public void addLogcat(Date timestamp, LogcatItem logcat) {
+ public void addLogcat(LogcatItem logcat, Date timestamp, String uri) {
mLogcat = logcat;
}
@@ -60,7 +60,7 @@
* {@inheritDoc}
*/
@Override
- public void addProcrank(Date timestamp, ProcrankItem procrank) {
+ public void addProcrank(ProcrankItem procrank, Date timestamp, String uri) {
mProcrank = procrank;
}
diff --git a/src/com/android/loganalysis/item/ConflictingItemException.java b/src/com/android/loganalysis/item/ConflictingItemException.java
index 1fede84..c21ab92 100644
--- a/src/com/android/loganalysis/item/ConflictingItemException.java
+++ b/src/com/android/loganalysis/item/ConflictingItemException.java
@@ -26,7 +26,7 @@
*
* @param message The reason for the conflict.
*/
- ConflictingItemException(String message) {
+ public ConflictingItemException(String message) {
super(message);
}
}
diff --git a/tests/src/com/android/loganalysis/heuristic/AnrHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/AnrHeuristicTest.java
index a76f6fd..50be2f6 100644
--- a/tests/src/com/android/loganalysis/heuristic/AnrHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/AnrHeuristicTest.java
@@ -32,7 +32,7 @@
AnrHeuristic heuristic = new AnrHeuristic();
LogcatItem logcat = new LogcatItem();
logcat.addEvent(new AnrItem());
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}
@@ -43,7 +43,7 @@
public void testCheckHeuristic_no_anr() {
AnrHeuristic heuristic = new AnrHeuristic();
LogcatItem logcat = new LogcatItem();
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertFalse(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/CpuUsageHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/CpuUsageHeuristicTest.java
index 6010e8e..6698ebb 100644
--- a/tests/src/com/android/loganalysis/heuristic/CpuUsageHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/CpuUsageHeuristicTest.java
@@ -36,7 +36,7 @@
top.setTotal(1000);
top.setUser((int) (heuristic.getCutoff() * top.getTotal()) + 1);
top.setIdle(top.getTotal() - top.getUser());
- heuristic.addTop(null, top);
+ heuristic.addTop(top, null, null);
assertTrue(heuristic.failed());
}
@@ -50,7 +50,7 @@
top.setTotal(1000);
top.setUser((int) (heuristic.getCutoff() * top.getTotal()) - 1);
top.setIdle(top.getTotal() - top.getUser());
- heuristic.addTop(null, top);
+ heuristic.addTop(top, null, null);
assertFalse(heuristic.failed());
}
@@ -65,7 +65,7 @@
MiscLogcatItem item = new MiscLogcatItem();
item.setCategory(LogcatParser.HIGH_CPU_USAGE);
logcat.addEvent(item);
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/JavaCrashHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/JavaCrashHeuristicTest.java
index a3aa707..ef537a2 100644
--- a/tests/src/com/android/loganalysis/heuristic/JavaCrashHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/JavaCrashHeuristicTest.java
@@ -33,7 +33,7 @@
JavaCrashHeuristic heuristic = new JavaCrashHeuristic();
LogcatItem logcat = new LogcatItem();
logcat.addEvent(new JavaCrashItem());
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}
@@ -45,7 +45,7 @@
public void testCheckHeuristic_no_java_crash() {
JavaCrashHeuristic heuristic = new JavaCrashHeuristic();
LogcatItem logcat = new LogcatItem();
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertFalse(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/KernelResetHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/KernelResetHeuristicTest.java
index 53d3aff..a88167a 100644
--- a/tests/src/com/android/loganalysis/heuristic/KernelResetHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/KernelResetHeuristicTest.java
@@ -36,7 +36,7 @@
MiscKernelLogItem item = new MiscKernelLogItem();
item.setCategory(KernelLogParser.KERNEL_RESET);
kernelLog.addEvent(item);
- heuristic.addKernelLog(null, kernelLog);
+ heuristic.addKernelLog(kernelLog, null, null);
assertTrue(heuristic.failed());
}
@@ -48,7 +48,7 @@
public void testCheckHeuristic_no_reset() {
KernelResetHeuristic heuristic = new KernelResetHeuristic();
KernelLogItem kernelLog = new KernelLogItem();
- heuristic.addKernelLog(null, kernelLog);
+ heuristic.addKernelLog(kernelLog, null, null);
assertFalse(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/MemoryUsageHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/MemoryUsageHeuristicTest.java
index c185bad..6779eb1 100644
--- a/tests/src/com/android/loganalysis/heuristic/MemoryUsageHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/MemoryUsageHeuristicTest.java
@@ -35,7 +35,7 @@
MemInfoItem memInfo = new MemInfoItem();
memInfo.put("MemTotal", 1000000);
memInfo.put("MemFree", (int) ((1.0 - heuristic.getCutoff()) * memInfo.get("MemTotal")) - 1);
- heuristic.addMemInfo(null, memInfo);
+ heuristic.addMemInfo(memInfo, null, null);
assertTrue(heuristic.failed());
}
@@ -48,7 +48,7 @@
MemInfoItem memInfo = new MemInfoItem();
memInfo.put("MemTotal", 1000000);
memInfo.put("MemFree", (int) ((1.0 - heuristic.getCutoff()) * memInfo.get("MemTotal")) + 1);
- heuristic.addMemInfo(null, memInfo);
+ heuristic.addMemInfo(memInfo, null, null);
assertFalse(heuristic.failed());
}
@@ -63,7 +63,7 @@
MiscLogcatItem item = new MiscLogcatItem();
item.setCategory(LogcatParser.HIGH_MEMORY_USAGE);
logcat.addEvent(item);
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/NativeCrashHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/NativeCrashHeuristicTest.java
index 7f1c1af..b722d48 100644
--- a/tests/src/com/android/loganalysis/heuristic/NativeCrashHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/NativeCrashHeuristicTest.java
@@ -33,7 +33,7 @@
NativeCrashHeuristic heuristic = new NativeCrashHeuristic();
LogcatItem logcat = new LogcatItem();
logcat.addEvent(new NativeCrashItem());
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}
@@ -45,7 +45,7 @@
public void testCheckHeuristic_no_java_crash() {
NativeCrashHeuristic heuristic = new NativeCrashHeuristic();
LogcatItem logcat = new LogcatItem();
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertFalse(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/PowerUsageHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/PowerUsageHeuristicTest.java
index 7db3d25..9892928 100644
--- a/tests/src/com/android/loganalysis/heuristic/PowerUsageHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/PowerUsageHeuristicTest.java
@@ -36,7 +36,7 @@
batteryInfo.addLastUnpluggedWakeLock("wakelock", 0, heuristic.getCutoff() + 1, 0);
batteryInfo.addLastUnpluggedKernelWakeLock("kernelwakelock", heuristic.getCutoff() - 1, 0);
dumpsys.setBatteryInfo(batteryInfo);
- heuristic.addDumpsys(null, dumpsys);
+ heuristic.addDumpsys(dumpsys, null, null);
assertTrue(heuristic.failed());
}
@@ -52,7 +52,7 @@
batteryInfo.addLastUnpluggedWakeLock("wakelock", 0, heuristic.getCutoff() - 1, 0);
batteryInfo.addLastUnpluggedKernelWakeLock("kernelwakelock", heuristic.getCutoff() + 1, 0);
dumpsys.setBatteryInfo(batteryInfo);
- heuristic.addDumpsys(null, dumpsys);
+ heuristic.addDumpsys(dumpsys, null, null);
assertTrue(heuristic.failed());
}
@@ -68,7 +68,7 @@
batteryInfo.addLastUnpluggedWakeLock("wakelock", 0, heuristic.getCutoff() - 1, 0);
batteryInfo.addLastUnpluggedKernelWakeLock("kernelwakelock", heuristic.getCutoff() - 1, 0);
dumpsys.setBatteryInfo(batteryInfo);
- heuristic.addDumpsys(null, dumpsys);
+ heuristic.addDumpsys(dumpsys, null, null);
assertFalse(heuristic.failed());
}
diff --git a/tests/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristicTest.java b/tests/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristicTest.java
index 8c5d920..07f06bb 100644
--- a/tests/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristicTest.java
+++ b/tests/src/com/android/loganalysis/heuristic/RuntimeRestartHeuristicTest.java
@@ -33,7 +33,7 @@
public void testCheckHeuristic_empty_procrank() {
RuntimeRestartHeuristic heuristic = new RuntimeRestartHeuristic();
ProcrankItem procrank = new ProcrankItem();
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertFalse(heuristic.failed());
}
@@ -46,7 +46,7 @@
RuntimeRestartHeuristic heuristic = new RuntimeRestartHeuristic();
ProcrankItem procrank = new ProcrankItem();
procrank.addProcrankLine(0, "foo", 0, 0, 0, 0);
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertTrue(heuristic.failed());
}
@@ -60,7 +60,7 @@
ProcrankItem procrank = new ProcrankItem();
procrank.addProcrankLine(heuristic.getCutoff() + 1, heuristic.getSystemServerName(), 0, 0,
0, 0);
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertTrue(heuristic.failed());
}
@@ -76,7 +76,7 @@
0, 0);
procrank.addProcrankLine(heuristic.getCutoff() + 1, heuristic.getBootAnimationName(), 0, 0,
0, 0);
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertTrue(heuristic.failed());
}
@@ -90,7 +90,7 @@
ProcrankItem procrank = new ProcrankItem();
procrank.addProcrankLine(heuristic.getCutoff() - 1, heuristic.getSystemServerName(), 0, 0,
0, 0);
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertFalse(heuristic.failed());
}
@@ -106,7 +106,7 @@
0, 0);
procrank.addProcrankLine(heuristic.getCutoff() - 2, heuristic.getBootAnimationName(), 0, 0,
0, 0);
- heuristic.addProcrank(null, procrank);
+ heuristic.addProcrank(procrank, null, null);
assertFalse(heuristic.failed());
}
@@ -121,7 +121,7 @@
MiscLogcatItem item = new MiscLogcatItem();
item.setCategory(LogcatParser.RUNTIME_RESTART);
logcat.addEvent(item);
- heuristic.addLogcat(null, logcat);
+ heuristic.addLogcat(logcat, null, null);
assertTrue(heuristic.failed());
}