/** * Main entry point being called when the UI automator process is started. */ public void testRun() { Log4JConfigurator.configure(); AccessibilityHelper accessibilityHelper = AccessibilityFactory.getAccessibilityHelper(); accessibilityHelper.initializeAccessibilityEventListener(); try { socketServer = new OnDeviceSocketServer<UIAutomatorRequest>(this, ConnectionConstants.UI_AUTOMATOR_PORT); socketServer.start(); isRunning = true; LOGGER.info("Automator socket server started successfully."); } catch (IOException e) { LOGGER.error("Could not start ATMOSPHERE socket server", e); } while (isRunning) { try { Thread.sleep(SLEEP_TIEMOUT); } catch (InterruptedException e) { // Nothing to do here } } }