File tree Expand file tree Collapse file tree
android/sdl_android/src/main/java/com/smartdevicelink/transport Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -249,7 +249,7 @@ public void run() { //FIXME probably check to see what the BT does
249249 if (!stateProgress ){//We are trying to weed through the bad packet info until we get something
250250 //Log.w(TAG, "Packet State Machine did not move forward from state - "+ psm.getState()+". PSM being Reset.");
251251 psm .reset ();
252- buffer = new byte [ READ_BUFFER_SIZE ];
252+ continue ; //Move to the next iteration of the loop
253253 }
254254
255255 if (psm .getState () == SdlPsm .FINISHED_STATE ){
@@ -259,9 +259,11 @@ public void run() { //FIXME probably check to see what the BT does
259259 packet .setTransportRecord (getTransportRecord ());
260260 handler .obtainMessage (SdlRouterService .MESSAGE_READ , packet ).sendToTarget ();
261261 }
262- //We put a trace statement in the message read so we can avoid all the extra bytes
262+ //Reset the PSM now that we have a finished packet.
263+ //We will continue to loop through the data to see if any other packet
264+ //is present.
263265 psm .reset ();
264- buffer = new byte [ READ_BUFFER_SIZE ] ; //FIXME just do an array copy and send off
266+ continue ; //Move to the next iteration of the loop
265267 }
266268 }
267269 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments