private List<AndroidDevice> getDevices() { return androidBridge.get().getDevices(); }
private AndroidDevice getPhysicalDevice() throws AndroidExecutionException { String serialId = configuration.get().getSerialId(); List<AndroidDevice> devices = androidBridge.get().getDevices(); if (devices == null || devices.size() == 0) { throw new AndroidExecutionException("There are no devices on the Android bridge."); } for (AndroidDevice device : devices) { if (!device.isEmulator() && serialId.equals(device.getSerialNumber())) { logger.info("Detected physical device with serial ID " + serialId + "."); return device; } } throw new AndroidExecutionException("Unable to get device with serial ID " + serialId + "."); }
private AndroidDevice getPhysicalDevice() throws AndroidExecutionException { String serialId = configuration.get().getSerialId(); List<AndroidDevice> devices = androidBridge.get().getDevices(); if (devices == null || devices.size() == 0) { throw new AndroidExecutionException("There are no physical devices on the Android bridge."); } for (AndroidDevice device : devices) { if (!device.isEmulator() && serialId.equals(device.getSerialNumber())) { logger.log(Level.INFO, "Connecting to physical device with serial ID {0}", serialId); return device; } } throw new AndroidExecutionException("Unable to get device with serial ID " + serialId + "."); }