Index: tools/testing/dart/android.dart |
diff --git a/tools/testing/dart/android.dart b/tools/testing/dart/android.dart |
index 985f6bc99a7ba67b6313d82698b5f6a753ed5474..423689a9290569fc707c3f795ba48127b747b604 100644 |
--- a/tools/testing/dart/android.dart |
+++ b/tools/testing/dart/android.dart |
@@ -193,6 +193,7 @@ class AndroidHelper { |
class AdbDevice { |
static const _adbServerStartupTime = const Duration(seconds: 3); |
String _deviceId; |
+ Map<String, String> _cachedData = new Map<String, String>(); |
String get deviceId => _deviceId; |
@@ -248,6 +249,19 @@ class AdbDevice { |
} |
/** |
+ * Upload data to the device, unless [local] is the same as the most recently |
+ * used source for [remote]. |
+ */ |
+ Future pushCachedData(String local, String remote) { |
+ if (_cachedData[remote] == local) { |
+ return new Future.value(new AdbCommandResult( |
+ "Skipped cached push", "", "", 0, false)); |
+ } |
+ _cachedData[remote] = local; |
+ return _adbCommand(['push', local, remote]); |
+ } |
+ |
+ /** |
* Change permission of directory recursively. |
*/ |
Future chmod(String mode, Path directory) { |
@@ -416,6 +430,7 @@ class AdbDevicePool { |
'No android devices found. ' |
'Please make sure "adb devices" shows your device!'); |
} |
+ print("Found ${devices.length} Android devices."); |
return new AdbDevicePool(devices); |
} |