| Index: build/android/surface_stats.py
|
| diff --git a/build/android/surface_stats.py b/build/android/surface_stats.py
|
| index 74bfdcee4934ab3a4e76e1273c8aa8ef59ec8bb8..911dd2e557509889c89cc0add41ede1f93c089b7 100755
|
| --- a/build/android/surface_stats.py
|
| +++ b/build/android/surface_stats.py
|
| @@ -13,6 +13,8 @@ import optparse
|
| import sys
|
| import time
|
|
|
| +from pylib.device import adb_wrapper
|
| +from pylib.device import device_errors
|
| from pylib.device import device_utils
|
| from pylib.perf import surface_stats_collector
|
| from pylib.utils import run_tests_helper
|
| @@ -98,7 +100,14 @@ def main(argv):
|
| options, _ = parser.parse_args(argv)
|
| run_tests_helper.SetLogLevel(options.verbose_count)
|
|
|
| - device = device_utils.DeviceUtils(options.device)
|
| + if options.device:
|
| + device = device_utils.DeviceUtils(options.device)
|
| + else:
|
| + devices = adb_wrapper.AdbWrapper.GetDevices()
|
| + if not devices:
|
| + raise device_errors.NoDevicesError
|
| + device = device_utils.DeviceUtils(devices[0])
|
| +
|
| collector = surface_stats_collector.SurfaceStatsCollector(device)
|
| collector.DisableWarningAboutEmptyData()
|
|
|
|
|