Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
update_from_chromium.py. (We should probably get rid of the use_glib
variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
roll_network_service_patches/network_service.patch}. These are for
rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
(Maybe the patch even works -- I haven't checked.)
TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com
Review URL: https://codereview.chromium.org/1180693002.
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index 6cae0cf..3ce5359 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -19,6 +19,7 @@
from pylib import constants
from pylib import forwarder
from pylib.device import adb_wrapper
+from pylib.device import device_errors
from pylib.device import device_utils
from pylib.utils import run_tests_helper
@@ -56,16 +57,15 @@
devices = device_utils.DeviceUtils.HealthyDevices()
if options.device:
- if options.device not in [str(d) for d in devices]:
- raise Exception('Error: %s not in attached devices %s' % (options.device,
- ','.join(devices)))
- devices = [options.device]
- else:
- if not devices:
- raise Exception('Error: no connected devices')
+ device = next((d for d in devices if d == options.device), None)
+ if not device:
+ raise device_errors.DeviceUnreachableError(options.device)
+ elif devices:
+ device = devices[0]
logging.info('No device specified. Defaulting to %s', devices[0])
+ else:
+ raise device_errors.NoDevicesError()
- device = devices[0]
constants.SetBuildType(options.build_type)
try:
forwarder.Forwarder.Map(port_pairs, device)