private int allowedThreads(){
  if (mSpeed == -1) {
    Log.d(TAG,"No speed measurements. Only 1 thread allowed");
    return 1;
  }
 else   if (mSpeed < 10) {
    Log.d(TAG,"Speed below 10kb. Only 1 thread allowed");
    return 1;
  }
 else {
    Log.d(TAG,"No thread restriction. " + MAX_THREADS + " allowed");
    return MAX_THREADS;
  }
}

private int allowedThreads ( ) { if ( mSpeed == - 1 ) { Log . d ( TAG , "No speed measurements. Only 1 thread allowed" ) ; return 1 ; } else if ( mSpeed < 10 ) { Log . d ( TAG , "Speed below 10kb. Only 1 thread allowed" ) ; return 1 ; } else { Log . d ( TAG , "No thread restriction. " + MAX_THREADS + " allowed" ) ; return MAX_THREADS ; } }
returns number of parallel uploads threads
