use of com.att.aro.core.bestpractice.pojo.ScreenRotationResult in project VideoOptimzer by attdevsupport.
the class ScreenRotationImpl method runTest.
@Override
public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) {
ScreenRotationResult result = new ScreenRotationResult();
// assuming it is passed for now
boolean passScreenRotation = true;
double screenRotationBurstTime = 0.0;
for (Burst burst : tracedata.getBurstCollectionAnalysisData().getBurstCollection()) {
if (burst.getBurstCategory() == BurstCategory.SCREEN_ROTATION) {
// screen rotation trigger network activity => fail
passScreenRotation = false;
screenRotationBurstTime = burst.getBeginTime();
break;
}
}
result.setScreenRotationBurstTime(screenRotationBurstTime);
if (passScreenRotation) {
result.setResultType(BPResultType.PASS);
result.setResultText(textResultPass);
} else {
result.setResultType(BPResultType.FAIL);
result.setResultText(textResults);
}
result.setResultExcelText(result.getResultType().getDescription());
result.setScreenRotationBurstTime(screenRotationBurstTime);
result.setAboutText(aboutText);
result.setDetailTitle(detailTitle);
result.setLearnMoreUrl(learnMoreUrl);
result.setOverviewTitle(overviewTitle);
result.setExportAllScreenRotationDescPass(exportAllScreenRotationDescPass);
result.setExportAllScreenRotationFailed(exportAllScreenRotationFailed);
return result;
}
Aggregations