| OLD | NEW |
| 1 #!/usr/bin/env python | |
| 2 # | |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # 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 |
| 5 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 6 | 4 |
| 7 """Provides an interface to start and stop Android emulator. | 5 """Provides an interface to start and stop Android emulator. |
| 8 | 6 |
| 9 Assumes system environment ANDROID_NDK_ROOT has been set. | 7 Assumes system environment ANDROID_NDK_ROOT has been set. |
| 10 | 8 |
| 11 Emulator: The class provides the methods to launch/shutdown the emulator with | 9 Emulator: The class provides the methods to launch/shutdown the emulator with |
| 12 the android virtual device named 'avd_armeabi' . | 10 the android virtual device named 'avd_armeabi' . |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 logging.critical('emulator _ShutdownOnSignal') | 359 logging.critical('emulator _ShutdownOnSignal') |
| 362 for sig in self._SIGNALS: | 360 for sig in self._SIGNALS: |
| 363 signal.signal(sig, signal.SIG_DFL) | 361 signal.signal(sig, signal.SIG_DFL) |
| 364 self.Shutdown() | 362 self.Shutdown() |
| 365 raise KeyboardInterrupt # print a stack | 363 raise KeyboardInterrupt # print a stack |
| 366 | 364 |
| 367 def _InstallKillHandler(self): | 365 def _InstallKillHandler(self): |
| 368 """Install a handler to kill the emulator when we exit unexpectedly.""" | 366 """Install a handler to kill the emulator when we exit unexpectedly.""" |
| 369 for sig in self._SIGNALS: | 367 for sig in self._SIGNALS: |
| 370 signal.signal(sig, self._ShutdownOnSignal) | 368 signal.signal(sig, self._ShutdownOnSignal) |
| OLD | NEW |