优化显示逻辑

This commit is contained in:
wangcongtao
2021-03-11 11:50:58 +08:00
parent 283126473f
commit a9b2ed9a66
24 changed files with 409 additions and 60 deletions

View File

@@ -326,23 +326,11 @@ public class MogoADASController implements IMogoADASController {
}
}
private LogWriter locLogWriter;
@Override
@Deprecated
public void ownerCarStateInfo( String ownerCarStateInfo ) {
if ( locLogWriter == null ) {
SimpleDateFormat sdf = new SimpleDateFormat( "yyyyMMddhhmmss" );
String date = sdf.format( new Date() );
String path = context.getExternalCacheDir().getAbsolutePath() + "/adaslog/" + date + "/loc.txt";
Logger.d( TAG, path );
locLogWriter = new LogWriter( path );
}
final long start = System.currentTimeMillis();
ADASCarStateInfo stateInfo = GsonUtil.objectFromJson( ownerCarStateInfo, ADASCarStateInfo.class );
long cost = System.currentTimeMillis() - start;
locLogWriter.write( ownerCarStateInfo, Long.valueOf( stateInfo.getValues().getReceiverDataTime() ) - cost );
Logger.d( "ADAS-LOC-timer", "upd 到 aidl 传输耗时:%s", start - Long.valueOf( stateInfo.getValues().getStartReceiverDataTime() ) );
if ( stateInfo == null || stateInfo.getValues() == null ) {
return;
}