def stop_recording(self, output=None, is_interrupted=None):
        """
        Stop recording the device display. Recoding file will be kept in the device.

        """
        if self.yosemite_recorder.recording_proc is not None or self.recorder is None:
            if output is None:
                output = self.recorder_save_path
            return self.yosemite_recorder.stop_recording(output=output, is_interrupted=is_interrupted)
        
        LOGGING.info("stopping recording")
        self.recorder.stop()
        self.recorder = None

        if output and not is_interrupted:
            shutil.move(self.recorder_save_path, output)
            LOGGING.info("save video to {}".format(output))
        return True

        Stop recording the device display. Recoding file will be kept in the device.

        
airtest/core/android/android.py