if ( result != 0 || usedTime < 2000) {   for (int i = 0; i < args.length; i++) { String arg = args[i]; if (arg.startsWith("-Xdevice:") ){ args[i] = arg + "_Emu"; break; }
if ( result != 0 || usedTime < 3000) {  if (xDevice != null) { System.out.println("Now trying " + xDevice + "..."); args[ xDeviceParamIndex ] = xDevice; result = super.exec(args, info, wait, filter, executionDir);
	protected int exec(String[] args, String info, boolean wait, OutputFilter filter, File executionDir) throws IOException {		long startTime = System.currentTimeMillis();		int result = super.exec(args, info, wait, filter, executionDir);		long usedTime = System.currentTimeMillis() - startTime;		if ( result != 0 || usedTime < 2000) {			// there was an error - new Sony Ericsson emulators require a "_emu" 			// at the end of the device name - why? Who knows?			for (int i = 0; i < args.length; i++) {				String arg = args[i];				if (arg.startsWith("-Xdevice:") ){					args[i] = arg + "_Emu";					break;				}			}			result = super.exec(args, info, wait, filter, executionDir);		}		return result;	}