<commit_before>#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

""" Run the Skia render_pdfs executable. """

from android_build_step import AndroidBuildStep
from build_step import BuildStep
from render_pdfs import RenderPdfs
from utils import android_utils
import sys


BINARY_NAME = 'render_pdfs'


class AndroidRenderPdfs(RenderPdfs, AndroidBuildStep):
  def DoRenderPdfs(self):
    args = self._PdfArgs(self._device_dirs.SKPDir())
    android_utils.RunShell(self._serial, [BINARY_NAME] + args)

if '__main__' == __name__:
  sys.exit(BuildStep.RunBuildStep(AndroidRenderPdfs))
<commit_msg>Fix RenderPDFs on Android Review URL: https://codereview.appspot.com/7306057<commit_after>#!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

""" Run the Skia render_pdfs executable. """

from android_build_step import AndroidBuildStep
from build_step import BuildStep
from render_pdfs import RenderPdfs
from utils import android_utils
import sys


BINARY_NAME = 'render_pdfs'


class AndroidRenderPdfs(RenderPdfs, AndroidBuildStep):
  def DoRenderPdfs(self):
    args = self._PdfArgs(self._device_dirs.SKPDir())
    android_utils.RunSkia(self._serial, [BINARY_NAME] + args,
                          use_intent=(not self._has_root),
                          stop_shell=self._has_root)

if '__main__' == __name__:
  sys.exit(BuildStep.RunBuildStep(AndroidRenderPdfs))

{'fraction_non_alphanumeric': 0.08363858363858363, 'fraction_numerical': 0.009157509157509158, 'mean_word_length': 4.593856655290103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3741202', 'n_tokens_mistral': 535, 'n_tokens_neox': 516, 'n_words': 147}