Merge "Switch from "#" to "__" when encoding fully-qualified class names"
diff --git a/.classpath b/.classpath
index d86f7d8..b97ce58 100644
--- a/.classpath
+++ b/.classpath
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="res"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry exported="true" kind="var" path="TRADEFED_ROOT/prebuilt/common/kxml2/kxml2-2.3.0.jar"/>
+ <classpathentry exported="true" kind="var" path="TRADEFED_ROOT/prebuilts/misc/common/kxml2/kxml2-2.3.0.jar"/>
<classpathentry exported="true" kind="var" path="TRADEFED_ROOT/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/javalib.jar" sourcepath="/TRADEFED_ROOT/external/guava/src"/>
<classpathentry exported="true" kind="var" path="TRADEFED_ROOT/out/host/common/obj/JAVA_LIBRARIES/jline-1.0_intermediates/javalib.jar" sourcepath="/TRADEFED_ROOT/external/jline/src"/>
<classpathentry exported="true" kind="var" path="TRADEFED_ROOT/out/host/common/obj/JAVA_LIBRARIES/junit_intermediates/javalib.jar" sourcepath="/TRADEFED_ROOT/external/junit/src"/>
diff --git a/prod-tests/src/com/android/continuous/SmokeTest.java b/prod-tests/src/com/android/continuous/SmokeTest.java
index ab1010e..30c599a 100644
--- a/prod-tests/src/com/android/continuous/SmokeTest.java
+++ b/prod-tests/src/com/android/continuous/SmokeTest.java
@@ -22,10 +22,6 @@
import com.android.tradefed.config.OptionClass;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.result.BugreportCollector;
-import com.android.tradefed.result.BugreportCollector.Freq;
-import com.android.tradefed.result.BugreportCollector.Noun;
-import com.android.tradefed.result.BugreportCollector.Predicate;
-import com.android.tradefed.result.BugreportCollector.Relation;
import com.android.tradefed.result.DeviceFileReporter;
import com.android.tradefed.result.ITestInvocationListener;
import com.android.tradefed.result.LogDataType;
diff --git a/prod-tests/src/com/android/framework/tests/FrameworkPerfTest.java b/prod-tests/src/com/android/framework/tests/FrameworkPerfTest.java
index 549d782..bacb81e 100644
--- a/prod-tests/src/com/android/framework/tests/FrameworkPerfTest.java
+++ b/prod-tests/src/com/android/framework/tests/FrameworkPerfTest.java
@@ -18,7 +18,6 @@
import com.android.ddmlib.testrunner.IRemoteAndroidTestRunner;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
-
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
@@ -27,17 +26,17 @@
import com.android.tradefed.result.TestResult;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
+import com.google.common.collect.ImmutableMap;
+
+import junit.framework.Assert;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.regex.Pattern;
import java.util.regex.Matcher;
-import junit.framework.Assert;
-
-import com.google.common.collect.ImmutableMap;
+import java.util.regex.Pattern;
/**
* Test that measures the average latency of foreground and background
diff --git a/prod-tests/src/com/android/graphics/tests/OpenGlPerformanceTest.java b/prod-tests/src/com/android/graphics/tests/OpenGlPerformanceTest.java
index 2f03e6e..a1583d1 100644
--- a/prod-tests/src/com/android/graphics/tests/OpenGlPerformanceTest.java
+++ b/prod-tests/src/com/android/graphics/tests/OpenGlPerformanceTest.java
@@ -41,7 +41,6 @@
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
-//import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
diff --git a/prod-tests/src/com/android/graphics/tests/UiPerformanceTest.java b/prod-tests/src/com/android/graphics/tests/UiPerformanceTest.java
index 332ae25..ea2a23f 100644
--- a/prod-tests/src/com/android/graphics/tests/UiPerformanceTest.java
+++ b/prod-tests/src/com/android/graphics/tests/UiPerformanceTest.java
@@ -29,6 +29,7 @@
import com.android.tradefed.result.SnapshotInputStreamSource;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
+import com.android.tradefed.util.RunUtil;
import junit.framework.Assert;
@@ -41,8 +42,6 @@
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import com.android.tradefed.util.IRunUtil;
-import com.android.tradefed.util.RunUtil;
/**
* Run UiPerformanceTest suite which measures the performance of
diff --git a/prod-tests/src/com/android/media/tests/CameraShotToShotLatencyTest.java b/prod-tests/src/com/android/media/tests/CameraShotToShotLatencyTest.java
index 0343476..f60a456 100644
--- a/prod-tests/src/com/android/media/tests/CameraShotToShotLatencyTest.java
+++ b/prod-tests/src/com/android/media/tests/CameraShotToShotLatencyTest.java
@@ -19,17 +19,18 @@
import com.android.ddmlib.IDevice;
import com.android.ddmlib.testrunner.IRemoteAndroidTestRunner;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
-
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.result.BugreportCollector;
-import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.result.ITestInvocationListener;
+import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.result.LogDataType;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
+import junit.framework.Assert;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@@ -39,8 +40,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import junit.framework.Assert;
-
public class CameraShotToShotLatencyTest implements IDeviceTest, IRemoteTest {
private static final Pattern MEAN_PATTERN =
@@ -54,7 +53,7 @@
private static final String LATENCY_KEY_MEAN = "Shot2ShotLatencyMean";
private static final String LATENCY_KEY_SD = "Shot2ShotLatencySD";
- private static final String TEST_TAG = "CameraShotToShotLatencyTest";
+ private static final String TEST_RU = "CameraLatency";
private final String mOutputPath = "mediaStressOut.txt";
ITestDevice mTestDevice = null;
@@ -76,7 +75,7 @@
Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, bugListener));
Map<String, String> metrics = parseOutputFile();
- reportMetrics(bugListener, TEST_TAG, metrics);
+ reportMetrics(bugListener, TEST_RU, metrics);
cleanupDevice();
}
diff --git a/prod-tests/src/com/android/media/tests/MediaPlayerStressTest.java b/prod-tests/src/com/android/media/tests/MediaPlayerStressTest.java
index 08e8b4b..89591b6 100644
--- a/prod-tests/src/com/android/media/tests/MediaPlayerStressTest.java
+++ b/prod-tests/src/com/android/media/tests/MediaPlayerStressTest.java
@@ -179,7 +179,7 @@
// ignore
continue;
} else {
- Log.e(LOG_TAG, String.format("Got unmatched line: %s", line));
+ Log.d(LOG_TAG, String.format("Got unmatched line: %s", line));
continue;
}
runMetrics.put(key, capture.get(0).get(0));
diff --git a/prod-tests/src/com/android/media/tests/MediaTest.java b/prod-tests/src/com/android/media/tests/MediaTest.java
index 0d2c17b..473f989 100644
--- a/prod-tests/src/com/android/media/tests/MediaTest.java
+++ b/prod-tests/src/com/android/media/tests/MediaTest.java
@@ -16,13 +16,10 @@
package com.android.media.tests;
-import java.util.regex.Matcher;
-
-import com.android.media.tests.VideoEditingMemoryTest;
-
-import junit.framework.Assert;
import junit.framework.TestCase;
+import java.util.regex.Matcher;
+
public class MediaTest extends TestCase {
private String mPositiveOutput = "testStressAddRemoveEffects diff : 472";
diff --git a/prod-tests/src/com/android/performance/tests/StartupMetricsTest.java b/prod-tests/src/com/android/performance/tests/StartupMetricsTest.java
index 664e4b5..d0c61aa 100644
--- a/prod-tests/src/com/android/performance/tests/StartupMetricsTest.java
+++ b/prod-tests/src/com/android/performance/tests/StartupMetricsTest.java
@@ -78,12 +78,12 @@
Assert.assertTrue(waitForBootComplete(mTestDevice, mBootTimeMs, mBootPoolTimeMs));
long availableTime = System.currentTimeMillis();
- long offlineDuration = onlineTime - startTime;
- long unavailDuration = availableTime - startTime;
+ double offlineDuration = onlineTime - startTime;
+ double unavailDuration = availableTime - startTime;
CLog.d("Reboot: %d millis until online, %d until available",
offlineDuration, unavailDuration);
- runMetrics.put("online", Double.toString((double)offlineDuration/1000.0));
- runMetrics.put("bootcomplete", Double.toString((double)unavailDuration/1000.0));
+ runMetrics.put("online", Double.toString(offlineDuration/1000.0));
+ runMetrics.put("bootcomplete", Double.toString(unavailDuration/1000.0));
reportMetrics(listener, "boottime", runMetrics);
}
diff --git a/prod-tests/src/com/android/wireless/tests/RadioHelper.java b/prod-tests/src/com/android/wireless/tests/RadioHelper.java
index d4edde8..bd07ece 100644
--- a/prod-tests/src/com/android/wireless/tests/RadioHelper.java
+++ b/prod-tests/src/com/android/wireless/tests/RadioHelper.java
@@ -17,10 +17,10 @@
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.result.ITestInvocationListener;
import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.result.LogDataType;
-import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.util.IRunUtil;
import com.android.tradefed.util.RunUtil;
diff --git a/prod-tests/src/com/android/wireless/tests/RadioStressTest.java b/prod-tests/src/com/android/wireless/tests/RadioStressTest.java
index 2d23422..32b5f81 100644
--- a/prod-tests/src/com/android/wireless/tests/RadioStressTest.java
+++ b/prod-tests/src/com/android/wireless/tests/RadioStressTest.java
@@ -28,8 +28,6 @@
import com.android.tradefed.result.LogDataType;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
-import com.android.tradefed.util.IRunUtil;
-import com.android.tradefed.util.RunUtil;
import junit.framework.Assert;
diff --git a/prod-tests/src/com/android/wireless/tests/SmsStressTest.java b/prod-tests/src/com/android/wireless/tests/SmsStressTest.java
index 624f82f..a61fed4 100644
--- a/prod-tests/src/com/android/wireless/tests/SmsStressTest.java
+++ b/prod-tests/src/com/android/wireless/tests/SmsStressTest.java
@@ -22,14 +22,12 @@
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
-import com.android.tradefed.result.BugreportCollector;
import com.android.tradefed.result.ITestInvocationListener;
import com.android.tradefed.result.InputStreamSource;
import com.android.tradefed.result.LogDataType;
import com.android.tradefed.result.SnapshotInputStreamSource;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
-import com.android.tradefed.util.RegexTrie;
import junit.framework.Assert;
@@ -38,9 +36,7 @@
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/prod-tests/src/com/android/wireless/tests/TelephonyStabilityTest.java b/prod-tests/src/com/android/wireless/tests/TelephonyStabilityTest.java
index 9a9e18d..f39c52f 100644
--- a/prod-tests/src/com/android/wireless/tests/TelephonyStabilityTest.java
+++ b/prod-tests/src/com/android/wireless/tests/TelephonyStabilityTest.java
@@ -28,9 +28,7 @@
import com.android.tradefed.result.SnapshotInputStreamSource;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
-import com.android.tradefed.util.IRunUtil;
import com.android.tradefed.util.RegexTrie;
-import com.android.tradefed.util.RunUtil;
import junit.framework.Assert;
diff --git a/prod-tests/src/com/android/wireless/tests/TelephonyTest.java b/prod-tests/src/com/android/wireless/tests/TelephonyTest.java
index df32b75..c5fc891 100644
--- a/prod-tests/src/com/android/wireless/tests/TelephonyTest.java
+++ b/prod-tests/src/com/android/wireless/tests/TelephonyTest.java
@@ -26,8 +26,6 @@
import com.android.tradefed.result.ITestInvocationListener;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
-import com.android.tradefed.util.IRunUtil;
-import com.android.tradefed.util.RunUtil;
import junit.framework.Assert;
diff --git a/prod-tests/src/com/android/wireless/tests/WifiStressTest.java b/prod-tests/src/com/android/wireless/tests/WifiStressTest.java
index 696c6fb..048dafd 100644
--- a/prod-tests/src/com/android/wireless/tests/WifiStressTest.java
+++ b/prod-tests/src/com/android/wireless/tests/WifiStressTest.java
@@ -237,6 +237,9 @@
runner.addInstrumentationArg("reconnect_ssid", mReconnectionSsid);
runner.addInstrumentationArg("reconnect_password", mReconnectionPassword);
runner.addInstrumentationArg("sleep_time", mIdleTime);
+ if (mWifiOnly) {
+ runner.addInstrumentationArg("wifi-only", String.valueOf(mWifiOnly));
+ }
// Add bugreport listener for failed test
BugreportCollector bugListener = new
diff --git a/src/com/android/tradefed/build/AppBuildInfo.java b/src/com/android/tradefed/build/AppBuildInfo.java
index c7f72fd..6c88ae0 100644
--- a/src/com/android/tradefed/build/AppBuildInfo.java
+++ b/src/com/android/tradefed/build/AppBuildInfo.java
@@ -28,7 +28,7 @@
*/
public class AppBuildInfo extends BuildInfo implements IAppBuildInfo {
- private List<File> mAppPackageFiles = new ArrayList<File>();
+ private List<VersionedFile> mAppPackageFiles = new ArrayList<VersionedFile>();
/**
* Creates a {@link AppBuildInfo}.
@@ -45,8 +45,8 @@
* {@inheritDoc}
*/
@Override
- public List<File> getAppPackageFiles() {
- List<File> listCopy = new ArrayList<File>(mAppPackageFiles.size());
+ public List<VersionedFile> getAppPackageFiles() {
+ List<VersionedFile> listCopy = new ArrayList<VersionedFile>(mAppPackageFiles.size());
listCopy.addAll(mAppPackageFiles);
return listCopy;
}
@@ -55,8 +55,8 @@
* {@inheritDoc}
*/
@Override
- public void addAppPackageFile(File appPackageFile) {
- mAppPackageFiles.add(appPackageFile);
+ public void addAppPackageFile(File appPackageFile, String version) {
+ mAppPackageFiles.add(new VersionedFile(appPackageFile, version));
}
/**
@@ -64,8 +64,8 @@
*/
@Override
public void cleanUp() {
- for (File appPackageFile : mAppPackageFiles) {
- appPackageFile.delete();
+ for (VersionedFile appPackageFile : mAppPackageFiles) {
+ appPackageFile.getFile().delete();
}
mAppPackageFiles.clear();
}
@@ -78,13 +78,14 @@
AppBuildInfo copy = new AppBuildInfo(getBuildId(), getTestTag(), getBuildTargetName());
copy.addAllBuildAttributes(this);
try {
- for (File origFile : mAppPackageFiles) {
+ for (VersionedFile origVerFile : mAppPackageFiles) {
// Only using createTempFile to create a unique dest filename
+ File origFile = origVerFile.getFile();
File copyFile = FileUtil.createTempFile(origFile.getName(),
FileUtil.getExtension(origFile.getName()));
copyFile.delete();
FileUtil.hardlinkFile(origFile, copyFile);
- copy.addAppPackageFile(copyFile);
+ copy.addAppPackageFile(copyFile, origVerFile.getVersion());
}
} catch (IOException e) {
throw new RuntimeException(e);
@@ -94,5 +95,4 @@
return copy;
}
-
}
diff --git a/src/com/android/tradefed/build/AppDeviceBuildInfo.java b/src/com/android/tradefed/build/AppDeviceBuildInfo.java
index cbe5330..af7fb15 100644
--- a/src/com/android/tradefed/build/AppDeviceBuildInfo.java
+++ b/src/com/android/tradefed/build/AppDeviceBuildInfo.java
@@ -244,15 +244,15 @@
* {@inheritDoc}
*/
@Override
- public void addAppPackageFile(File appPackageFile) {
- mAppBuildInfo.addAppPackageFile(appPackageFile);
+ public void addAppPackageFile(File appPackageFile, String version) {
+ mAppBuildInfo.addAppPackageFile(appPackageFile, version);
}
/**
* {@inheritDoc}
*/
@Override
- public List<File> getAppPackageFiles() {
+ public List<VersionedFile> getAppPackageFiles() {
return mAppBuildInfo.getAppPackageFiles();
}
@@ -268,8 +268,12 @@
*/
@Override
public void cleanUp() {
- mDeviceBuild.cleanUp();
- mAppBuildInfo.cleanUp();
+ if (mDeviceBuild != null) {
+ mDeviceBuild.cleanUp();
+ }
+ if (mAppBuildInfo != null) {
+ mAppBuildInfo.cleanUp();
+ }
}
/**
diff --git a/src/com/android/tradefed/build/BuildInfo.java b/src/com/android/tradefed/build/BuildInfo.java
index 49c65d0..33e235a 100644
--- a/src/com/android/tradefed/build/BuildInfo.java
+++ b/src/com/android/tradefed/build/BuildInfo.java
@@ -41,27 +41,6 @@
private String mDeviceSerial = null;
/**
- * Data structure containing the image file and related metadata
- */
- private static class VersionedFile {
- private final File mFile;
- private final String mVersion;
-
- VersionedFile(File file, String version) {
- mFile = file;
- mVersion = version;
- }
-
- File getFile() {
- return mFile;
- }
-
- String getVersion() {
- return mVersion;
- }
- }
-
- /**
* Creates a {@link BuildInfo} using default attribute values.
*/
public BuildInfo() {
diff --git a/src/com/android/tradefed/build/IAppBuildInfo.java b/src/com/android/tradefed/build/IAppBuildInfo.java
index 75026db..b6225a2 100644
--- a/src/com/android/tradefed/build/IAppBuildInfo.java
+++ b/src/com/android/tradefed/build/IAppBuildInfo.java
@@ -25,13 +25,13 @@
public interface IAppBuildInfo extends IBuildInfo {
/**
- * Gets a copy of the list of local app apk file(s).
+ * Gets a copy of the set of local app apk file(s) and their versions.
*/
- public List<File> getAppPackageFiles();
+ public List<VersionedFile> getAppPackageFiles();
/**
- * Adds the local apk file.
+ * Adds the local apk file and its associated version
*/
- public void addAppPackageFile(File appPackageFile);
+ public void addAppPackageFile(File appPackageFile, String version);
}
diff --git a/src/com/android/tradefed/build/VersionedFile.java b/src/com/android/tradefed/build/VersionedFile.java
new file mode 100644
index 0000000..9e4ce7b
--- /dev/null
+++ b/src/com/android/tradefed/build/VersionedFile.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.tradefed.build;
+
+import java.io.File;
+
+/**
+ * Data structure representing a file that has an associated version.
+ */
+public class VersionedFile {
+ private final File mFile;
+ private final String mVersion;
+
+ public VersionedFile(File file, String version) {
+ mFile = file;
+ mVersion = version;
+ }
+
+ public File getFile() {
+ return mFile;
+ }
+
+ public String getVersion() {
+ return mVersion;
+ }
+}
diff --git a/src/com/android/tradefed/device/DeviceStateMonitor.java b/src/com/android/tradefed/device/DeviceStateMonitor.java
index 3bd2004..8a94b74 100644
--- a/src/com/android/tradefed/device/DeviceStateMonitor.java
+++ b/src/com/android/tradefed/device/DeviceStateMonitor.java
@@ -46,12 +46,10 @@
private static final int MAX_OP_TIME = 10 * 1000;
/** The time in ms to wait for a device to be online. */
- // TODO: make this configurable
- private static final long DEFAULT_ONLINE_TIMEOUT = 1 * 60 * 1000;
+ private long mDefaultOnlineTimeout = 1 * 60 * 1000;
/** The time in ms to wait for a device to available. */
- // TODO: make this configurable
- private static final long DEFAULT_AVAILABLE_TIMEOUT = 6 * 60 * 1000;
+ private long mDefaultAvailableTimeout = 6 * 60 * 1000;
private List<DeviceStateListener> mStateListeners;
private IDeviceManager mMgr;
@@ -75,6 +73,22 @@
}
/**
+ * Set the time in ms to wait for a device to be online in {@link #waitForDeviceOnline()}.
+ */
+ @Override
+ public void setDefaultOnlineTimeout(long timeoutMs) {
+ mDefaultOnlineTimeout = timeoutMs;
+ }
+
+ /**
+ * Set the time in ms to wait for a device to be available in {@link #waitForDeviceAvailable()}.
+ */
+ @Override
+ public void setDefaultAvailableTimeout(long timeoutMs) {
+ mDefaultAvailableTimeout = timeoutMs;
+ }
+
+ /**
* {@inheritDoc}
*/
@Override
@@ -107,7 +121,7 @@
*/
@Override
public IDevice waitForDeviceOnline() {
- return waitForDeviceOnline(DEFAULT_ONLINE_TIMEOUT);
+ return waitForDeviceOnline(mDefaultOnlineTimeout);
}
/**
@@ -207,7 +221,7 @@
*/
@Override
public IDevice waitForDeviceAvailable() {
- return waitForDeviceAvailable(DEFAULT_AVAILABLE_TIMEOUT);
+ return waitForDeviceAvailable(mDefaultAvailableTimeout);
}
/**
diff --git a/src/com/android/tradefed/device/IDeviceStateMonitor.java b/src/com/android/tradefed/device/IDeviceStateMonitor.java
index 3cd5c6e..d7d8d5c 100644
--- a/src/com/android/tradefed/device/IDeviceStateMonitor.java
+++ b/src/com/android/tradefed/device/IDeviceStateMonitor.java
@@ -154,4 +154,14 @@
*/
public boolean isAdbTcp();
+ /**
+ * Set the time in ms to wait for a device to be online in {@link #waitForDeviceOnline()}.
+ */
+ public void setDefaultOnlineTimeout(long timeoutMs);
+
+ /**
+ * Set the time in ms to wait for a device to be available in {@link #waitForDeviceAvailable()}.
+ */
+ public void setDefaultAvailableTimeout(long timeoutMs);
+
}
diff --git a/src/com/android/tradefed/device/ITestDevice.java b/src/com/android/tradefed/device/ITestDevice.java
index 92ddca9..a623ff7 100644
--- a/src/com/android/tradefed/device/ITestDevice.java
+++ b/src/com/android/tradefed/device/ITestDevice.java
@@ -27,6 +27,7 @@
import java.io.File;
import java.io.InputStream;
import java.util.Collection;
+import java.util.Set;
/**
* Provides an reliable and slightly higher level API to a ddmlib {@link IDevice}.
@@ -771,4 +772,12 @@
*/
public void setOptions(TestDeviceOptions options);
+ /**
+ * Fetch the package names installed on the device.
+ *
+ * @return {@link Set} of {@link String} package names currently installed on the device.
+ * @throws DeviceNotAvailableException
+ */
+ public Set<String> getInstalledPackageNames() throws DeviceNotAvailableException;
+
}
diff --git a/src/com/android/tradefed/device/TestDevice.java b/src/com/android/tradefed/device/TestDevice.java
index d36ee7d..3278d6b 100644
--- a/src/com/android/tradefed/device/TestDevice.java
+++ b/src/com/android/tradefed/device/TestDevice.java
@@ -59,7 +59,9 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -76,6 +78,8 @@
private static final String LOGCAT_CMD = "logcat -v threadtime";
private static final String LOGCAT_DESC = "logcat";
private static final String BUGREPORT_CMD = "bugreport";
+ private static final String LIST_PACKAGES_CMD = "pm list packages";
+ private static final Pattern PACKAGE_REGEX = Pattern.compile("package:(.*)");
/**
* Allow pauses of up to 2 minutes while receiving bugreport. Note that dumpsys may pause up to
* a minute while waiting for unresponsive components, but should bail after that minute, if it
@@ -203,6 +207,8 @@
public void setOptions(TestDeviceOptions options) {
throwIfNull(options);
mOptions = options;
+ mMonitor.setDefaultOnlineTimeout(options.getOnlineTimeout());
+ mMonitor.setDefaultAvailableTimeout(options.getAvailableTimeout());
}
/**
@@ -2308,4 +2314,21 @@
public boolean isEnableAdbRoot() {
return mOptions.isEnableAdbRoot();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<String> getInstalledPackageNames() throws DeviceNotAvailableException {
+ Set<String> packages= new HashSet<String>();
+ String output = executeShellCommand(LIST_PACKAGES_CMD);
+ if (output != null) {
+ Matcher m = PACKAGE_REGEX.matcher(output);
+ while (m.find()) {
+ String packageName = m.group(1);
+ packages.add(packageName);
+ }
+ }
+ return packages;
+ }
}
diff --git a/src/com/android/tradefed/device/TestDeviceOptions.java b/src/com/android/tradefed/device/TestDeviceOptions.java
index 4fa3555..358cb55 100644
--- a/src/com/android/tradefed/device/TestDeviceOptions.java
+++ b/src/com/android/tradefed/device/TestDeviceOptions.java
@@ -51,6 +51,14 @@
+ "format the filesystem and reboot after unencryption")
private int mUnencryptRebootTimeout = 0;
+ @Option(name = "online-timeout", description = "default time in ms to wait for the device to "
+ + "be visible on adb.")
+ private long mOnlineTimeout = 1 * 60 * 1000;
+
+ @Option(name = "available-timeout", description = "default time in ms to wait for the device "
+ + "to be available aka fully boot.")
+ private long mAvailableTimeout = 6 * 60 * 1000;
+
/**
* @return the mEnableAdbRoot
*/
@@ -169,4 +177,18 @@
public void setUnencryptRebootTimeout(int unencryptRebootTimeout) {
mUnencryptRebootTimeout = unencryptRebootTimeout;
}
+
+ /**
+ * @return the default time in ms to to wait for a device to be online.
+ */
+ public long getOnlineTimeout() {
+ return mOnlineTimeout;
+ }
+
+ /**
+ * @return the default time in ms to to wait for a device to be available.
+ */
+ public long getAvailableTimeout() {
+ return mAvailableTimeout;
+ }
}
\ No newline at end of file
diff --git a/src/com/android/tradefed/device/WifiHelper.java b/src/com/android/tradefed/device/WifiHelper.java
index d49491f..8bf27bc 100644
--- a/src/com/android/tradefed/device/WifiHelper.java
+++ b/src/com/android/tradefed/device/WifiHelper.java
@@ -20,7 +20,6 @@
import com.android.tradefed.util.FileUtil;
import com.android.tradefed.util.IRunUtil;
import com.android.tradefed.util.RunUtil;
-import com.android.tradefed.util.StreamUtil;
import java.io.File;
import java.io.IOException;
@@ -396,27 +395,6 @@
}
/**
- * Calls wpa_cli and also checks output for OK or FAIL.
- *
- * @param cmd the wpa_cli command to run
- * @return <code>true</code> if output contains OK, <code>false</code> if output does not
- * contain OK or it failed
- * @throws DeviceNotAvailableException
- */
- private boolean callWpaCliChecked(String cmd) throws DeviceNotAvailableException {
- WpaCliOutput output = callWpaCli(cmd);
- if (!output.isSuccess()) {
- return false;
- }
- for (String line: output.mOutputLines) {
- if (line.equals("OK")) {
- return true;
- }
- }
- return false;
- }
-
- /**
* Processes the output of a wpa_cli command.
*/
private static class WpaCliOutput extends MultiLineReceiver {
@@ -477,7 +455,6 @@
private static class WifiUtilOutput extends MultiLineReceiver {
private boolean mDidCommandComplete = false;
- private boolean mIsCommandSuccess = true;
private static final String INST_SUCCESS_MARKER = "INSTRUMENTATION_CODE: -1";
private static final Pattern RESULT_PAT =
@@ -511,10 +488,6 @@
}
}
- public boolean isSuccess() {
- return mDidCommandComplete && mIsCommandSuccess;
- }
-
/**
* {@inheritDoc}
*/
diff --git a/src/com/android/tradefed/result/BugreportCollector.java b/src/com/android/tradefed/result/BugreportCollector.java
index 48b5bae..49fb5dc 100644
--- a/src/com/android/tradefed/result/BugreportCollector.java
+++ b/src/com/android/tradefed/result/BugreportCollector.java
@@ -17,8 +17,8 @@
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.tradefed.build.IBuildInfo;
-import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
import java.util.ArrayList;
@@ -183,20 +183,6 @@
}
}
- private Noun getNounFromPredicate(Predicate p) {
- // FIXME: This is totally a hack, since it assumes knowledge about the structure of a
- // FIXME: Predicate. In particular, the Predicate class is probably more general than it
- // FIXME: needs to be.
- List<SubPredicate> spList = p.getPredicate();
- for (SubPredicate sp : spList) {
- if (sp != null && sp instanceof Noun) {
- return (Noun) sp;
- }
- }
- return null;
- }
-
-
// Now that the Predicate framework is done, actually start on the BugreportCollector class
/**
* We keep an internal {@link CollectingTestListener} instead of subclassing to make sure that
diff --git a/src/com/android/tradefed/result/LogFileSaver.java b/src/com/android/tradefed/result/LogFileSaver.java
index 54e7ce2..3b69e84 100644
--- a/src/com/android/tradefed/result/LogFileSaver.java
+++ b/src/com/android/tradefed/result/LogFileSaver.java
@@ -131,7 +131,7 @@
throws IOException {
final String saneDataName = sanitizeFilename(dataName);
// add underscore to end of data name to make generated name more readable
- File logFile = FileUtil.createTempFile(dataName + "_", "." + dataType.getFileExt(),
+ File logFile = FileUtil.createTempFile(saneDataName + "_", "." + dataType.getFileExt(),
mRootDir);
FileUtil.writeToFile(dataStream, logFile);
Log.i(LOG_TAG, String.format("Saved log file %s", logFile.getAbsolutePath()));
diff --git a/src/com/android/tradefed/result/NameMangleListener.java b/src/com/android/tradefed/result/NameMangleListener.java
index 63582e6..4f1a6ec 100644
--- a/src/com/android/tradefed/result/NameMangleListener.java
+++ b/src/com/android/tradefed/result/NameMangleListener.java
@@ -16,7 +16,6 @@
package com.android.tradefed.result;
-import com.android.ddmlib.testrunner.ITestRunListener;
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.tradefed.build.IBuildInfo;
diff --git a/src/com/android/tradefed/targetprep/AppSetup.java b/src/com/android/tradefed/targetprep/AppSetup.java
index 91d0261..509e329 100644
--- a/src/com/android/tradefed/targetprep/AppSetup.java
+++ b/src/com/android/tradefed/targetprep/AppSetup.java
@@ -18,12 +18,12 @@
import com.android.ddmlib.Log;
import com.android.tradefed.build.IAppBuildInfo;
import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.build.VersionedFile;
import com.android.tradefed.config.Option;
import com.android.tradefed.config.Option.Importance;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
-import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
@@ -62,8 +62,8 @@
device.reboot();
}
- for (File apkFile : appBuild.getAppPackageFiles()) {
- device.installPackage(apkFile, true);
+ for (VersionedFile apkFile : appBuild.getAppPackageFiles()) {
+ device.installPackage(apkFile.getFile(), true);
}
}
diff --git a/src/com/android/tradefed/targetprep/RunCommandTargetPreparer.java b/src/com/android/tradefed/targetprep/RunCommandTargetPreparer.java
index c535a8e..20c13ef 100644
--- a/src/com/android/tradefed/targetprep/RunCommandTargetPreparer.java
+++ b/src/com/android/tradefed/targetprep/RunCommandTargetPreparer.java
@@ -39,7 +39,7 @@
// If the command had any output, the executeShellCommand method will log it at the
// VERBOSE level; so no need to do any logging from here.
CLog.d("About to run command on device %s: %s", device.getSerialNumber(), cmd);
- final String output = device.executeShellCommand(cmd);
+ device.executeShellCommand(cmd);
}
}
}
diff --git a/src/com/android/tradefed/targetprep/SystemUpdaterDeviceFlasher.java b/src/com/android/tradefed/targetprep/SystemUpdaterDeviceFlasher.java
index f799915..de42f5e 100644
--- a/src/com/android/tradefed/targetprep/SystemUpdaterDeviceFlasher.java
+++ b/src/com/android/tradefed/targetprep/SystemUpdaterDeviceFlasher.java
@@ -21,7 +21,6 @@
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
-import com.android.tradefed.targetprep.IDeviceFlasher.UserDataFlashOption;
import java.io.File;
import java.util.Arrays;
diff --git a/src/com/android/tradefed/testtype/DeviceBatteryLevelChecker.java b/src/com/android/tradefed/testtype/DeviceBatteryLevelChecker.java
index 6ab971f..85b6c42 100644
--- a/src/com/android/tradefed/testtype/DeviceBatteryLevelChecker.java
+++ b/src/com/android/tradefed/testtype/DeviceBatteryLevelChecker.java
@@ -23,9 +23,11 @@
import com.android.tradefed.config.Option;
import com.android.tradefed.config.OptionClass;
import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.DeviceSelectionOptions;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.result.ITestInvocationListener;
+import com.android.tradefed.targetprep.ITargetPreparer;
import com.android.tradefed.util.IRunUtil;
import com.android.tradefed.util.RunUtil;
diff --git a/src/com/android/tradefed/util/ByteArrayList.java b/src/com/android/tradefed/util/ByteArrayList.java
index cfddc27..2b3f85b 100644
--- a/src/com/android/tradefed/util/ByteArrayList.java
+++ b/src/com/android/tradefed/util/ByteArrayList.java
@@ -94,9 +94,9 @@
* So: k >= minCapacity / (size * growthFactor)
* k = ceil(minCapacity / size / growthFactor)
*/
- int growthFactorMultiples = (int)Math.ceil((float)minCapacity / mGrowthFactor / curSize);
+ int growthFactorMultiples = (int)Math.ceil(minCapacity / mGrowthFactor / curSize);
// newSize = oldSize * (growthFactor * k) >= minCapacity, from above
- float newSize = (float)curSize * mGrowthFactor * growthFactorMultiples;
+ float newSize = curSize * mGrowthFactor * growthFactorMultiples;
setSize((int)Math.ceil(newSize));
}
diff --git a/src/com/android/tradefed/util/FileUtil.java b/src/com/android/tradefed/util/FileUtil.java
index 26787ec..1440370 100644
--- a/src/com/android/tradefed/util/FileUtil.java
+++ b/src/com/android/tradefed/util/FileUtil.java
@@ -17,7 +17,6 @@
import com.android.ddmlib.Log;
import com.android.tradefed.command.FatalHostError;
-import com.android.tradefed.log.LogUtil.CLog;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
diff --git a/src/com/android/tradefed/util/net/HttpHelper.java b/src/com/android/tradefed/util/net/HttpHelper.java
index 0acf721..5a11b6d 100644
--- a/src/com/android/tradefed/util/net/HttpHelper.java
+++ b/src/com/android/tradefed/util/net/HttpHelper.java
@@ -262,6 +262,7 @@
mException = e;
}
+ @Override
public void cancel() {
// ignore
}
@@ -283,6 +284,7 @@
* Perform a single GET request, storing the response or the associated exception in case of
* error.
*/
+ @Override
public boolean run() {
try {
if (mIgnoreResult) {
@@ -321,6 +323,7 @@
* Perform a single POST request, storing the response or the associated exception in case
* of error.
*/
+ @Override
public boolean run() {
InputStream inputStream = null;
OutputStream outputStream = null;
diff --git a/tests/src/com/android/tradefed/device/StubTestDevice.java b/tests/src/com/android/tradefed/device/StubTestDevice.java
index d54d3bc..22211dc 100644
--- a/tests/src/com/android/tradefed/device/StubTestDevice.java
+++ b/tests/src/com/android/tradefed/device/StubTestDevice.java
@@ -26,6 +26,7 @@
import java.io.File;
import java.util.Collection;
+import java.util.Set;
/**
* Empty implementation of {@link ITestDevice}.
@@ -627,4 +628,13 @@
throws DeviceNotAvailableException {
return false;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<String> getInstalledPackageNames() throws DeviceNotAvailableException {
+ // ignore
+ return null;
+ }
}
diff --git a/tests/src/com/android/tradefed/device/TestDeviceStressTest.java b/tests/src/com/android/tradefed/device/TestDeviceStressTest.java
index 67036ca..84cae87 100644
--- a/tests/src/com/android/tradefed/device/TestDeviceStressTest.java
+++ b/tests/src/com/android/tradefed/device/TestDeviceStressTest.java
@@ -15,9 +15,6 @@
*/
package com.android.tradefed.device;
-import java.io.File;
-import java.io.IOException;
-
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
@@ -26,6 +23,9 @@
import com.android.tradefed.testtype.DeviceTestCase;
import com.android.tradefed.util.FileUtil;
+import java.io.File;
+import java.io.IOException;
+
/**
* Long running functional tests for {@link TestDevice} that verify an operation can be run
* many times in sequence
diff --git a/tests/src/com/android/tradefed/device/TestDeviceTest.java b/tests/src/com/android/tradefed/device/TestDeviceTest.java
index 141017d..e0af43e 100644
--- a/tests/src/com/android/tradefed/device/TestDeviceTest.java
+++ b/tests/src/com/android/tradefed/device/TestDeviceTest.java
@@ -40,6 +40,8 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
/**
* Unit tests for {@link TestDevice}.
@@ -953,5 +955,44 @@
mRecoveryTestDevice.reboot();
verifyMocks();
}
+
+ /**
+ * Unit test for {@link TestDevice#getInstalledPackageNames()}.
+ */
+ public void testgetInstalledPackageNames() throws Exception {
+ final String output = "package:com.android.wallpaper\n"
+ + "package:com.android.wallpaper.livepickler";
+ Set<String> expected = new HashSet<String>();
+ expected.add("com.android.wallpaper");
+ expected.add("com.android.wallpaper.livepickler");
+ assertgetInstalledPackageNames(output, expected);
+ }
+
+ /**
+ * Unit test for {@link TestDevice#getInstalledPackageNames()}.
+ * <p/>
+ * Test bad bad output.
+ */
+ public void testgetInstalledPackageNamesForBadOutput() throws Exception {
+ final String output = "junk output";
+ Set<String> expected = new HashSet<String>();
+ assertgetInstalledPackageNames(output, expected);
+ }
+
+ /**
+ * Helper method to verify the {@link TestDevice#getInstalledPackageNames()} method under
+ * different conditions.
+ *
+ * @param output the test output to inject
+ * @param expectedPackages the expected {@link Set} of packages to expect
+ */
+ private void assertgetInstalledPackageNames(final String output, Set<String> expectedPackages)
+ throws Exception {
+ final String expectedCmd = "pm list packages";
+ // expect shell command to be called, and return the test shell output
+ injectShellResponse(expectedCmd, output);
+ EasyMock.replay(mMockIDevice, mMockMonitor);
+ assertEquals(expectedPackages, mTestDevice.getInstalledPackageNames());
+ }
}
diff --git a/tests/src/com/android/tradefed/device/WifiHelperTest.java b/tests/src/com/android/tradefed/device/WifiHelperTest.java
index ab392a5..a6634a4 100644
--- a/tests/src/com/android/tradefed/device/WifiHelperTest.java
+++ b/tests/src/com/android/tradefed/device/WifiHelperTest.java
@@ -30,11 +30,6 @@
private ITestDevice mMockDevice;
private WifiHelper mWifi;
- private static final String NETCFG_WIFI_RESPONSE =
- "lo UP 127.0.0.1 255.0.0.0 0x00000049\r\n" +
- "usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002\r\n" +
- "eth0 UP 192.168.1.1 255.255.254.0 0x00001043\r\n";
-
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -97,15 +92,6 @@
injectShellResponse(statusQueryReturn);
}
- private void injectWpaCliOKResponse() throws DeviceNotAvailableException {
- final String response = String.format(
- "Using interface 'eth0'\r\n" +
- "OK\r\n" +
- "%s\r\n",
- WifiHelper.SUCCESS_MARKER);
- injectShellResponse(response);
- }
-
private void injectShellResponse(final String data) throws DeviceNotAvailableException {
mMockDevice.executeShellCommand((String)EasyMock.anyObject(),
(IShellOutputReceiver)EasyMock.anyObject());
diff --git a/tests/src/com/android/tradefed/result/BugreportCollectorTest.java b/tests/src/com/android/tradefed/result/BugreportCollectorTest.java
index f4f2d76..b02f5dd 100644
--- a/tests/src/com/android/tradefed/result/BugreportCollectorTest.java
+++ b/tests/src/com/android/tradefed/result/BugreportCollectorTest.java
@@ -15,8 +15,8 @@
*/
package com.android.tradefed.result;
-import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.ddmlib.testrunner.ITestRunListener.TestFailure;
+import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.result.BugreportCollector.Filter;
import com.android.tradefed.result.BugreportCollector.Freq;
diff --git a/tests/src/com/android/tradefed/result/FailureEmailResultReporterTest.java b/tests/src/com/android/tradefed/result/FailureEmailResultReporterTest.java
index ecce961..f240be6 100644
--- a/tests/src/com/android/tradefed/result/FailureEmailResultReporterTest.java
+++ b/tests/src/com/android/tradefed/result/FailureEmailResultReporterTest.java
@@ -33,6 +33,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean hasFailedTests() {
return mHasFailedTests;
}
@@ -40,6 +41,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public InvocationStatus getInvocationStatus() {
return mInvocationStatus;
}
diff --git a/tests/src/com/android/tradefed/result/InvocationFailureEmailResultReporterTest.java b/tests/src/com/android/tradefed/result/InvocationFailureEmailResultReporterTest.java
index 945d96c..aef79c3 100644
--- a/tests/src/com/android/tradefed/result/InvocationFailureEmailResultReporterTest.java
+++ b/tests/src/com/android/tradefed/result/InvocationFailureEmailResultReporterTest.java
@@ -31,6 +31,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public InvocationStatus getInvocationStatus() {
return mInvocationStatus;
}
diff --git a/tests/src/com/android/tradefed/result/TestFailureEmailResultReporterTest.java b/tests/src/com/android/tradefed/result/TestFailureEmailResultReporterTest.java
index 388b147..9ca0123 100644
--- a/tests/src/com/android/tradefed/result/TestFailureEmailResultReporterTest.java
+++ b/tests/src/com/android/tradefed/result/TestFailureEmailResultReporterTest.java
@@ -31,6 +31,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public boolean hasFailedTests() {
return mHasFailedTests;
}
diff --git a/tests/src/com/android/tradefed/targetprep/KernelFlashPreparerTest.java b/tests/src/com/android/tradefed/targetprep/KernelFlashPreparerTest.java
index 35f6a81..64e5aac 100644
--- a/tests/src/com/android/tradefed/targetprep/KernelFlashPreparerTest.java
+++ b/tests/src/com/android/tradefed/targetprep/KernelFlashPreparerTest.java
@@ -83,10 +83,12 @@
mMockRunUtil = EasyMock.createMock(IRunUtil.class);
mFlashPreparer = new KernelFlashPreparer() {
+ @Override
IRunUtil getRunUtil() {
return mMockRunUtil;
}
+ @Override
String getBootImgPath() {
return mBootImg.getAbsolutePath();
}
@@ -139,6 +141,7 @@
*/
public void testSetup_targetsetuperror() throws Exception {
mFlashPreparer = new KernelFlashPreparer() {
+ @Override
File createBootImage(File mkbootimg, File kernel, File ramdisk) throws IOException {
throw new IOException();
}
@@ -261,6 +264,7 @@
*/
private KernelFlashPreparer getStubBootPreparer() {
return new KernelFlashPreparer() {
+ @Override
File createBootImage(File mkbootimg, File kernel, File ramdisk) {
return mBootImg;
}
diff --git a/tests/src/com/android/tradefed/util/net/HttpHelperTest.java b/tests/src/com/android/tradefed/util/net/HttpHelperTest.java
index 3fdfc91..08cfb36 100644
--- a/tests/src/com/android/tradefed/util/net/HttpHelperTest.java
+++ b/tests/src/com/android/tradefed/util/net/HttpHelperTest.java
@@ -319,7 +319,6 @@
* {@inheritDoc}
*/
@Override
- @SuppressWarnings("unused")
public HttpURLConnection createConnection(URL url, String method, String contentType)
throws IOException {
return null;
@@ -329,7 +328,6 @@
* {@inheritDoc}
*/
@Override
- @SuppressWarnings("unused")
InputStream getConnectionInputStream(HttpURLConnection conn) throws IOException {
return mInputStream;
}
@@ -338,7 +336,6 @@
* {@inheritDoc}
*/
@Override
- @SuppressWarnings("unused")
OutputStream getConnectionOutputStream(HttpURLConnection conn) throws IOException {
return mOutputStream;
}