parameters: (config, device_sdk_version)
return_statement: return categories
docstring: Gets the list of atrace categories available for tracing.
    Args:
        config: Tracing config.
        device_sdk_version: Sdk version int of device to be queried.
docstring_summary: Gets the list of atrace categories available for tracing.
    Args:
        config: Tracing config.
        device_sdk_version: Sdk version int of device to be queried.
docstring_tokens: Gets the list of atrace categories available for tracing . Args : config : Tracing config . device_sdk_version : Sdk version int of device to be queried .
function: def get_available_categories(config, device_sdk_version):
    """Gets the list of atrace categories available for tracing.
    Args:
        config: Tracing config.
        device_sdk_version: Sdk version int of device to be queried.
    """
    devutils = device_utils.DeviceUtils(config.device_serial_number)
    categories_output = devutils.RunShellCommand(
        LIST_CATEGORIES_ARGS, check_return=True)
    categories = [c.split('-')[0].strip() for c in categories_output]
  
    if device_sdk_version < version_codes.MARSHMALLOW:
      # work around platform bug where rs tag would corrupt trace until M(Api23)
      categories = [c for c in categories if c != 'rs']
    return categories
function_tokens: def get_available_categories ( config , device_sdk_version ) : devutils = device_utils . DeviceUtils ( config . device_serial_number ) categories_output = devutils . RunShellCommand ( LIST_CATEGORIES_ARGS , check_return = True ) categories = [ c . split ( '-' ) [ 0 ] . strip ( ) for c in categories_output ] if device_sdk_version < version_codes . MARSHMALLOW : # work around platform bug where rs tag would corrupt trace until M(Api23) categories = [ c for c in categories if c != 'rs' ] return categories