| OLD | NEW | 
|   1 #!/usr/bin/env python |   1 #!/usr/bin/env python | 
|   2 # |   2 # | 
|   3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |   3 # 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 |   4 # Use of this source code is governed by a BSD-style license that can be | 
|   5 # found in the LICENSE file. |   5 # found in the LICENSE file. | 
|   6  |   6  | 
|   7 """Utility script to install APKs from the command line quickly.""" |   7 """Utility script to install APKs from the command line quickly.""" | 
|   8  |   8  | 
|   9 import optparse |   9 import optparse | 
|  10 import os |  10 import os | 
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  58   if len(args) > 1: |  58   if len(args) > 1: | 
|  59     raise Exception('Error: Unknown argument:', args[1:]) |  59     raise Exception('Error: Unknown argument:', args[1:]) | 
|  60  |  60  | 
|  61   devices = android_commands.GetAttachedDevices() |  61   devices = android_commands.GetAttachedDevices() | 
|  62   if not devices: |  62   if not devices: | 
|  63     raise Exception('Error: no connected devices') |  63     raise Exception('Error: no connected devices') | 
|  64  |  64  | 
|  65   if not options.apk_package: |  65   if not options.apk_package: | 
|  66     options.apk_package = apk_helper.GetPackageName(options.apk) |  66     options.apk_package = apk_helper.GetPackageName(options.apk) | 
|  67  |  67  | 
|  68   device_utils.DeviceUtils.parallel(devices).old_interface.ManagedInstall( |  68   device_utils.DeviceUtils.parallel(devices).Install(options.apk) | 
|  69       options.apk, options.keep_data, options.apk_package).pFinish(None) |  | 
|  70  |  69  | 
|  71  |  70  | 
|  72 if __name__ == '__main__': |  71 if __name__ == '__main__': | 
|  73   sys.exit(main(sys.argv)) |  72   sys.exit(main(sys.argv)) | 
|  74  |  73  | 
| OLD | NEW |