private void attemptTtsFailover(String failedEngine){
  LogUtils.log(SpeechController.class,Log.ERROR,"Attempting TTS failover from %s",failedEngine);
  mTtsFailures++;
  if ((mInstalledTtsEngines.size() <= 1) || (mTtsFailures < MAX_TTS_FAILURES)) {
    setTtsEngine(failedEngine,false);
    return;
  }
  if (failedEngine != null) {
    mInstalledTtsEngines.remove(failedEngine);
    mInstalledTtsEngines.addLast(failedEngine);
  }
  final String nextEngine=mInstalledTtsEngines.getFirst();
  setTtsEngine(nextEngine,true);
}

private void attemptTtsFailover ( String failedEngine ) { LogUtils . log ( SpeechController . class , Log . ERROR , "Attempting TTS failover from %s" , failedEngine ) ; mTtsFailures ++ ; if ( ( mInstalledTtsEngines . size ( ) <= 1 ) || ( mTtsFailures < MAX_TTS_FAILURES ) ) { setTtsEngine ( failedEngine , false ) ; return ; } if ( failedEngine != null ) { mInstalledTtsEngines . remove ( failedEngine ) ; mInstalledTtsEngines . addLast ( failedEngine ) ; } final String nextEngine = mInstalledTtsEngines . getFirst ( ) ; setTtsEngine ( nextEngine , true ) ; }
assumes the current engine has failed and attempts to start the next available engine .
