parameters: (self)
return_statement: return output
docstring: Stops an existing logcat recording subprocess and returns output.
  
      Returns:
        The logcat output as a string or an empty string if logcat was not
        being recorded at the time.
docstring_summary: Stops an existing logcat recording subprocess and returns output.
docstring_tokens: Stops an existing logcat recording subprocess and returns output .
function: def StopRecordingLogcat(self):
      """Stops an existing logcat recording subprocess and returns output.
  
      Returns:
        The logcat output as a string or an empty string if logcat was not
        being recorded at the time.
      """
      if not self.logcat_process:
        return ''
      # Cannot evaluate directly as 0 is a possible value.
      # Better to read the self.logcat_process.stdout before killing it,
      # Otherwise the communicate may return incomplete output due to pipe break.
      if self.logcat_process.poll() is None:
        self.logcat_process.kill()
      (output, _) = self.logcat_process.communicate()
      self.logcat_process = None
      return output
function_tokens: def StopRecordingLogcat ( self ) : if not self . logcat_process : return '' # Cannot evaluate directly as 0 is a possible value. # Better to read the self.logcat_process.stdout before killing it, # Otherwise the communicate may return incomplete output due to pipe break. if self . logcat_process . poll ( ) is None : self . logcat_process . kill ( ) ( output , _ ) = self . logcat_process . communicate ( ) self . logcat_process = None return output