opt
This commit is contained in:
@@ -48,6 +48,7 @@ import com.mogo.utils.logger.Logger;
|
||||
import com.mogo.utils.network.utils.GsonUtil;
|
||||
import com.mogo.utils.storage.SharedPrefsMgr;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -840,16 +841,22 @@ public class MockIntentHandler implements IntentHandler {
|
||||
}
|
||||
}
|
||||
|
||||
List< ADASRecognizedResult > allList = new ArrayList<>();
|
||||
// List< ADASRecognizedResult > allList = new ArrayList<>();
|
||||
JSONArray jsonArray = new JSONArray( );
|
||||
for ( BufferedReader reader : readers ) {
|
||||
String line = reader.readLine();
|
||||
ADASRecognizedResult adasRecognizedResult = GsonUtil.objectFromJson( line, ADASRecognizedResult.class );
|
||||
if ( adasRecognizedResult != null ) {
|
||||
allList.add( adasRecognizedResult );
|
||||
}
|
||||
// ADASRecognizedResult adasRecognizedResult = GsonUtil.objectFromJson( line, ADASRecognizedResult.class );
|
||||
jsonArray.put( line );
|
||||
// if ( adasRecognizedResult != null ) {
|
||||
// allList.add( adasRecognizedResult );
|
||||
// }
|
||||
}
|
||||
|
||||
AdasRecognizedResultDrawer.getInstance().renderAdasRecognizedResult( allList );
|
||||
JSONObject object = new JSONObject();
|
||||
object.put( "action", "view" );
|
||||
object.put( "models", jsonArray );
|
||||
|
||||
MogoApisHandler.getInstance().getApis().getAdasControllerApi().mockAdasRecognized( object.toString() );
|
||||
Log.i( "mock-timer-adas", "cost " + ( System.currentTimeMillis() - start ) + "ms" );
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user