tools/android/appstats.py
def GetDeviceToTrack(preset=None):
    """Returns a device serial to connect to.  If |preset| is specified it will
    return |preset| if it is connected and |None| otherwise.  If |preset| is not
    specified it will return the first connected device."""
    devices = [d.adb.GetDeviceSerial()
               for d in device_utils.DeviceUtils.HealthyDevices()]
    if not devices:
      return None

    if preset:
      return preset if preset in devices else None

    return devices[0]
Returns a device serial to connect to.  If |preset| is specified it will
    return |preset| if it is connected and |None| otherwise.  If |preset| is not
    specified it will return the first connected device.
Returns a device serial to connect to.
Returns a device serial to connect to .
def GetDeviceToTrack(preset=None):
    devices = [d.adb.GetDeviceSerial()
               for d in device_utils.DeviceUtils.HealthyDevices()]
    if not devices:
      return None
    if preset:
      return preset if preset in devices else None
    return devices[0]
def GetDeviceToTrack ( preset = None ) : devices = [ d . adb . GetDeviceSerial ( ) for d in device_utils . DeviceUtils . HealthyDevices ( ) ] if not devices : return None if preset : return preset if preset in devices else None return devices [ 0 ]
Returns a device serial to connect to.
Returns a device serial to connect to .
"""Returns a device serial to connect to.  If |preset| is specified it will
    return |preset| if it is connected and |None| otherwise.  If |preset| is not
    specified it will return the first connected device."""
preset