public void saveDragLineResult(Context context, String fileName) { String mFileName = fileName + PhoneInfo.getLogFileName(); resultFileName = mFileName; try { FileOutputStream fos = context.openFileOutput(mFileName, Context.MODE_APPEND); PrintStream ps = new PrintStream(fos); if (this.calErr == DragLineResult.POINTS_NOT_DOWN_OR_UP) { ps.print(String.format(Locale.US,"TestTime:%d DriverPoints:%d SystemPoints:%d Not monotonous!\n", testNumber, driverPoints, systemPoints)); } else if (calErr == DragLineResult.POINTS_TOO_LESS) { ps.print(String.format(Locale.US,"TestTime:%d DriverPoints:%d SystemPoints:%d DriverPoints<30,fail!\n", testNumber, driverPoints, systemPoints)); } else { ps.print(String.format(Locale.US, "TestTime:%d D:%d S:%d V:%d \n", testNumber, driverPoints, systemPoints, getTouchEventList().size())); ps.print(String.format(Locale.US, " Slide Velocity:%.2fmm/s\n", avgV)); ps.print(String.format(Locale.US, " Vmax - Vmin:%.2f-%.2f=%.2fmm/s\n", maxV, minV, maxV - minV)); ps.print(String.format(Locale.US, " Velocity Standard Deviation:%.2f\n", windowAvgStdDev)); } ps.print("\n"); ps.close(); fos.close(); } catch (Exception e) { e.printStackTrace(); } }
安卓应用数据保存
最新推荐文章于 2024-05-11 15:09:47 发布