public synchronized ProcessingTask popNextSession(){
  if (!mQueue.isEmpty() && !mHoldProcessing) {
    Log.d(TAG,"Popping a session. Remaining: " + (mQueue.size() - 1));
    return mQueue.remove();
  }
 else {
    Log.d(TAG,"Popping null. On hold? " + mHoldProcessing);
    mServiceRunning=false;
    return null;
  }
}

public synchronized ProcessingTask popNextSession ( ) { if ( ! mQueue . isEmpty ( ) && ! mHoldProcessing ) { Log . d ( TAG , "Popping a session. Remaining: " + ( mQueue . size ( ) - 1 ) ) ; return mQueue . remove ( ) ; } else { Log . d ( TAG , "Popping null. On hold? " + mHoldProcessing ) ; mServiceRunning = false ; return null ; } }
remove the next task from the queue and return it .
