| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import logging | 5 import logging |
| 6 import pipes | 6 import pipes |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from devil.android import device_errors # pylint: disable=import-error | 9 from devil.android import device_errors # pylint: disable=import-error |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 else: | 97 else: |
| 98 self._WriteFile(self._saved_command_line_file_contents) | 98 self._WriteFile(self._saved_command_line_file_contents) |
| 99 | 99 |
| 100 def _ReadFile(self): | 100 def _ReadFile(self): |
| 101 if self._device.PathExists(self.command_line_file): | 101 if self._device.PathExists(self.command_line_file): |
| 102 return self._device.ReadFile(self.command_line_file, as_root=True) | 102 return self._device.ReadFile(self.command_line_file, as_root=True) |
| 103 else: | 103 else: |
| 104 return None | 104 return None |
| 105 | 105 |
| 106 def _WriteFile(self, contents): | 106 def _WriteFile(self, contents): |
| 107 logging.info('Android app/browser startup args: %s', contents) |
| 107 self._device.WriteFile(self.command_line_file, contents, as_root=True) | 108 self._device.WriteFile(self.command_line_file, contents, as_root=True) |
| 108 | 109 |
| 109 def _RemoveFile(self): | 110 def _RemoveFile(self): |
| 110 self._device.RunShellCommand(['rm', '-f', self.command_line_file], | 111 self._device.RunShellCommand(['rm', '-f', self.command_line_file], |
| 111 as_root=True, check_return=True) | 112 as_root=True, check_return=True) |
| OLD | NEW |