Fix the bug that it should write the zero diff to the output file when the actual diff is negative.

Change-Id: I5d7c12b0ad9c0286658067cacb7f385626a3107f
This commit is contained in:
Yu Shan Emily Lau
2010-03-12 11:51:41 -08:00
parent d3d9b85ef4
commit adc238a97c

View File

@@ -395,10 +395,10 @@ public class MediaPlayerPerformance extends ActivityInstrumentationTestCase<Medi
Thread.sleep(10000);
mEndPid = getMediaserverPid();
int memDiff = mEndMemory - startMemory;
if (memDiff < 0)
if (memDiff < 0) {
memDiff = 0;
else
output.write("The total diff = " + memDiff);
}
output.write("The total diff = " + memDiff);
output.write("\n\n");
// mediaserver crash
if (startPid != mEndPid) {