tools/android/appstats.py
def GetPidsToTrack(adb, default_pid=None, process_filter=None):
    """Returns a list of tuples of (userid, pids, process name) based on the
    input arguments.  If |default_pid| is specified it will return that pid if
    it exists.  If |process_filter| is specified it will return the pids of
    processes with that string in the name. If both are specified it will
    intersect the two.  The returned result is sorted based on userid."""
    pids = []
    try:
      for process in adb.ListProcesses(process_filter):
        if default_pid and process.pid != default_pid:
          continue
        userid = DeviceHelper.__GetUserIdForProcessName(adb, process.name)
        pids.append((userid, process.pid, process.name))
    except device_errors.AdbShellCommandFailedError as exc:
      logging.warning('Error getting PIDs to track: %s', exc)
    return sorted(pids, key=lambda tup: tup[0])
Returns a list of tuples of (userid, pids, process name) based on the
    input arguments.  If |default_pid| is specified it will return that pid if
    it exists.  If |process_filter| is specified it will return the pids of
    processes with that string in the name. If both are specified it will
    intersect the two.  The returned result is sorted based on userid.
Returns a list of tuples of (userid, pids, process name) based on the
input arguments.  If |default_pid| is specified it will return that pid if
it exists.  If |process_filter| is specified it will return the pids of
processes with that string in the name. If both are specified it will
intersect the two.  The returned result is sorted based on userid.
Returns a list of tuples of ( userid pids process name ) based on the input arguments . If |default_pid| is specified it will return that pid if it exists . If |process_filter| is specified it will return the pids of processes with that string in the name . If both are specified it will intersect the two . The returned result is sorted based on userid .
def GetPidsToTrack(adb, default_pid=None, process_filter=None):
    pids = []
    try:
      for process in adb.ListProcesses(process_filter):
        if default_pid and process.pid != default_pid:
          continue
        userid = DeviceHelper.__GetUserIdForProcessName(adb, process.name)
        pids.append((userid, process.pid, process.name))
    except device_errors.AdbShellCommandFailedError as exc:
      logging.warning('Error getting PIDs to track: %s', exc)
    return sorted(pids, key=lambda tup: tup[0])
def GetPidsToTrack ( adb , default_pid = None , process_filter = None ) : pids = [ ] try : for process in adb . ListProcesses ( process_filter ) : if default_pid and process . pid != default_pid : continue userid = DeviceHelper . __GetUserIdForProcessName ( adb , process . name ) pids . append ( ( userid , process . pid , process . name ) ) except device_errors . AdbShellCommandFailedError as exc : logging . warning ( 'Error getting PIDs to track: %s' , exc ) return sorted ( pids , key = lambda tup : tup [ 0 ] )
Returns a list of tuples of (userid, pids, process name) based on the
input arguments.
Returns a list of tuples of ( userid pids process name ) based on the input arguments .
"""Returns a list of tuples of (userid, pids, process name) based on the
    input arguments.  If |default_pid| is specified it will return that pid if
    it exists.  If |process_filter| is specified it will return the pids of
    processes with that string in the name. If both are specified it will
    intersect the two.  The returned result is sorted based on userid."""
adb
default_pid
process_filter