code: private boolean shouldDoWithThisDevice( IDevice idevice ) throws MojoExecutionException, MojoFailureException
      {
  
          for ( String device : getDevices() )
          {
              // use specified device or all emulators or all devices
              if ( "emulator".equals( device ) && idevice.isEmulator() )
              {
                  return true;
              }
  
              if ( "usb".equals( device ) && ! idevice.isEmulator() )
              {
                  return true;
              }
  
              if ( idevice.isEmulator() && ( device.equalsIgnoreCase( idevice.getAvdName() ) || device
                      .equalsIgnoreCase( idevice.getSerialNumber() ) ) )
              {
                  return true;
              }
  
              if ( ! idevice.isEmulator() && device.equals( idevice.getSerialNumber() ) )
              {
                  return true;
              }
          }
  
          return false;
      }
docs: Determines if this {@link IDevice}(s) should be used
  
  @param idevice the device to check
  @return if the device should be used
  @throws org.apache.maven.plugin.MojoExecutionException
  in case there is a problem
  @throws org.apache.maven.plugin.MojoFailureException
  in case there is a problem