@Override
    public void onDeviceStarted(String avdName, String serial) {
      AndroidEmulator emulator = findEmulator(avdName);
      if (emulator != null) {
        Integer port = Integer.parseInt(serial.replace("emulator-", ""));
        emulator.setSerial(port);
        emulator.setWasStartedBySelendroid(false);
      }
    }
Removes the given device from store so that it cannot be any longer be used for testing. This
can happen if e.g. the hardware device gets unplugged from the computer.

@param device the device to remove.
@throws DeviceStoreException when parameter is not type of 'DefaultHardwareDevice'.
selendroid-standalone/src/main/java/io/selendroid/standalone/server/model/DeviceStore.java