| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import collections | 6 import collections |
| 7 import logging | 7 import logging |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 device.EnableRoot() | 91 device.EnableRoot() |
| 92 except device_errors.CommandFailedError as e: | 92 except device_errors.CommandFailedError as e: |
| 93 # Try to change the flags and start the activity anyway. | 93 # Try to change the flags and start the activity anyway. |
| 94 # TODO(jbudorick) Handle this exception appropriately after interface | 94 # TODO(jbudorick) Handle this exception appropriately after interface |
| 95 # conversions are finished. | 95 # conversions are finished. |
| 96 logging.error(str(e)) | 96 logging.error(str(e)) |
| 97 flags = flag_changer.FlagChanger(device, package_info.cmdline_file) | 97 flags = flag_changer.FlagChanger(device, package_info.cmdline_file) |
| 98 if ENABLE_TEST_INTENTS_FLAG not in flags.Get(): | 98 if ENABLE_TEST_INTENTS_FLAG not in flags.Get(): |
| 99 flags.AddFlags([ENABLE_TEST_INTENTS_FLAG]) | 99 flags.AddFlags([ENABLE_TEST_INTENTS_FLAG]) |
| 100 | 100 |
| 101 device.old_interface.StartActivity(package, activity, action=action) | 101 device.StartActivity(intent.Intent(package=package, activity=activity, |
| 102 action=action)) |
| 102 | 103 |
| 103 if __name__ == '__main__': | 104 if __name__ == '__main__': |
| 104 sys.exit(main(sys.argv)) | 105 sys.exit(main(sys.argv)) |
| OLD | NEW |