aboutsummaryrefslogtreecommitdiffstats
path: root/ddms/libs/ddmlib/src/com/android
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-12-20 20:20:24 -0800
committerTor Norbye <tnorbye@google.com>2011-12-21 13:36:23 -0800
commitab36f4e7488358dea4ab6b54ee2b7bef3da0232b (patch)
treee6846336e35cd0fb29addf962c9031c68492ed30 /ddms/libs/ddmlib/src/com/android
parent4ae7075d188a35298d834bfcd0500b77b08a12ab (diff)
downloadsdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.zip
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.gz
sdk-ab36f4e7488358dea4ab6b54ee2b7bef3da0232b.tar.bz2
Update SDK codebase to JDK 6
This changeset makes the SDK codebase compile with source=1.6 (which means it also requires JDK 6). This means that methods implementing an interface requires @Override's. It also means we can start using APIs like the ArrayDeque class and methods like String#isEmpty(). This changeset looks big but the change is trivial: it's basically adding @Override in all the places that need it, along with some other automatic Eclipse cleanup in certain files (such as reordering imports where they were incorrectly ordered (because older versions of Eclipse didn't always handle inner classes right)), as well as cleaning up trailing whitespace and removing some $NON-NLS-1$ markers on lines where there aren't any string literals anymore. This changeset also sets the source and target JDK level to 6 in the Eclipse compiler .settings file, and synchronizes this file to all the other Eclipse SDK projects. Change-Id: I6a9585aa44c3dee9a5c00739ab22fbdbcb9f8275
Diffstat (limited to 'ddms/libs/ddmlib/src/com/android')
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java2
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/Device.java39
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java1
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java7
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java13
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java14
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java2
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java5
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java5
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java3
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java1
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java20
14 files changed, 100 insertions, 18 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java b/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
index 90bd7d4..a68962f 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/AllocationInfo.java
@@ -56,6 +56,7 @@ public class AllocationInfo implements IStackTraceInfo {
return mDescending;
}
+ @Override
public int compare(AllocationInfo o1, AllocationInfo o2) {
int diff = 0;
switch (mSortMode) {
@@ -159,6 +160,7 @@ public class AllocationInfo implements IStackTraceInfo {
* (non-Javadoc)
* @see com.android.ddmlib.IStackTraceInfo#getStackTrace()
*/
+ @Override
public StackTraceElement[] getStackTrace() {
return mStackTrace;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
index 63f7292..cb4612f 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/CollectingOutputReceiver.java
@@ -34,6 +34,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public boolean isCancelled() {
return mIsCanceled;
}
@@ -48,6 +49,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public void addOutput(byte[] data, int offset, int length) {
if (!isCancelled()) {
String s = null;
@@ -64,6 +66,7 @@ public class CollectingOutputReceiver implements IShellOutputReceiver {
/**
* {@inheritDoc}
*/
+ @Override
public void flush() {
// ignore
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
index 5a3cfd1..f3931a1 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/Device.java
@@ -98,6 +98,7 @@ final class Device implements IDevice {
}
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -152,6 +153,7 @@ final class Device implements IDevice {
}
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -161,11 +163,13 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getSerialNumber()
*/
+ @Override
public String getSerialNumber() {
return mSerialNumber;
}
/** {@inheritDoc} */
+ @Override
public String getAvdName() {
return mAvdName;
}
@@ -186,6 +190,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getState()
*/
+ @Override
public DeviceState getState() {
return mState;
}
@@ -202,6 +207,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getProperties()
*/
+ @Override
public Map<String, String> getProperties() {
return Collections.unmodifiableMap(mProperties);
}
@@ -210,6 +216,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getPropertyCount()
*/
+ @Override
public int getPropertyCount() {
return mProperties.size();
}
@@ -218,6 +225,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getProperty(java.lang.String)
*/
+ @Override
public String getProperty(String name) {
return mProperties.get(name);
}
@@ -225,6 +233,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public boolean arePropertiesSet() {
return mArePropertiesSet;
}
@@ -232,6 +241,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertyCacheOrSync(String name) throws TimeoutException,
AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException {
if (mArePropertiesSet) {
@@ -244,6 +254,7 @@ final class Device implements IDevice {
/**
* {@inheritDoc}
*/
+ @Override
public String getPropertySync(String name) throws TimeoutException,
AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException {
CollectingOutputReceiver receiver = new CollectingOutputReceiver();
@@ -255,6 +266,7 @@ final class Device implements IDevice {
return value;
}
+ @Override
public String getMountPoint(String name) {
return mMountPoints.get(name);
}
@@ -269,6 +281,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isOnline()
*/
+ @Override
public boolean isOnline() {
return mState == DeviceState.ONLINE;
}
@@ -277,6 +290,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isEmulator()
*/
+ @Override
public boolean isEmulator() {
return mSerialNumber.matches(RE_EMULATOR_SN);
}
@@ -285,6 +299,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isOffline()
*/
+ @Override
public boolean isOffline() {
return mState == DeviceState.OFFLINE;
}
@@ -293,6 +308,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#isBootLoader()
*/
+ @Override
public boolean isBootLoader() {
return mState == DeviceState.BOOTLOADER;
}
@@ -301,6 +317,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#hasClients()
*/
+ @Override
public boolean hasClients() {
return mClients.size() > 0;
}
@@ -309,6 +326,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClients()
*/
+ @Override
public Client[] getClients() {
synchronized (mClients) {
return mClients.toArray(new Client[mClients.size()]);
@@ -319,6 +337,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClient(java.lang.String)
*/
+ @Override
public Client getClient(String applicationName) {
synchronized (mClients) {
for (Client c : mClients) {
@@ -336,6 +355,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getSyncService()
*/
+ @Override
public SyncService getSyncService()
throws TimeoutException, AdbCommandRejectedException, IOException {
SyncService syncService = new SyncService(AndroidDebugBridge.getSocketAddress(), this);
@@ -350,15 +370,18 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getFileListingService()
*/
+ @Override
public FileListingService getFileListingService() {
return new FileListingService(this);
}
+ @Override
public RawImage getScreenshot()
throws TimeoutException, AdbCommandRejectedException, IOException {
return AdbHelper.getFrameBuffer(AndroidDebugBridge.getSocketAddress(), this);
}
+ @Override
public void executeShellCommand(String command, IShellOutputReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -366,6 +389,7 @@ final class Device implements IDevice {
receiver, DdmPreferences.getTimeOut());
}
+ @Override
public void executeShellCommand(String command, IShellOutputReceiver receiver,
int maxTimeToOutputResponse)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
@@ -374,21 +398,25 @@ final class Device implements IDevice {
receiver, maxTimeToOutputResponse);
}
+ @Override
public void runEventLogService(LogReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.runEventLogService(AndroidDebugBridge.getSocketAddress(), this, receiver);
}
+ @Override
public void runLogService(String logname, LogReceiver receiver)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.runLogService(AndroidDebugBridge.getSocketAddress(), this, logname, receiver);
}
+ @Override
public void createForward(int localPort, int remotePort)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.createForward(AndroidDebugBridge.getSocketAddress(), this, localPort, remotePort);
}
+ @Override
public void removeForward(int localPort, int remotePort)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.removeForward(AndroidDebugBridge.getSocketAddress(), this, localPort, remotePort);
@@ -398,6 +426,7 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#getClientName(int)
*/
+ @Override
public String getClientName(int pid) {
synchronized (mClients) {
for (Client c : mClients) {
@@ -498,6 +527,7 @@ final class Device implements IDevice {
mMountPoints.put(name, value);
}
+ @Override
public void pushFile(String local, String remote)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -535,6 +565,7 @@ final class Device implements IDevice {
}
}
+ @Override
public void pullFile(String remote, String local)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -572,6 +603,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String installPackage(String packageFilePath, boolean reinstall, String... extraArgs)
throws InstallException {
try {
@@ -590,6 +622,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String syncPackageToDevice(String localFilePath)
throws IOException, AdbCommandRejectedException, TimeoutException, SyncException {
SyncService sync = null;
@@ -638,6 +671,7 @@ final class Device implements IDevice {
return new File(filePath).getName();
}
+ @Override
public String installRemotePackage(String remoteFilePath, boolean reinstall,
String... extraArgs) throws InstallException {
try {
@@ -665,6 +699,7 @@ final class Device implements IDevice {
}
}
+ @Override
public void removeRemotePackage(String remoteFilePath) throws InstallException {
try {
executeShellCommand("rm " + remoteFilePath, new NullOutputReceiver(), INSTALL_TIMEOUT);
@@ -679,6 +714,7 @@ final class Device implements IDevice {
}
}
+ @Override
public String uninstallPackage(String packageName) throws InstallException {
try {
InstallReceiver receiver = new InstallReceiver();
@@ -699,17 +735,20 @@ final class Device implements IDevice {
* (non-Javadoc)
* @see com.android.ddmlib.IDevice#reboot()
*/
+ @Override
public void reboot(String into)
throws TimeoutException, AdbCommandRejectedException, IOException {
AdbHelper.reboot(into, AndroidDebugBridge.getSocketAddress(), this);
}
+ @Override
public Integer getBatteryLevel() throws TimeoutException, AdbCommandRejectedException,
IOException, ShellCommandUnresponsiveException {
// use default of 5 minutes
return getBatteryLevel(5 * 60 * 1000);
}
+ @Override
public Integer getBatteryLevel(long freshnessMs) throws TimeoutException,
AdbCommandRejectedException, IOException, ShellCommandUnresponsiveException {
if (mLastBatteryLevel != null
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java b/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
index e039cda..8f1bd87 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/DeviceMonitor.java
@@ -486,6 +486,7 @@ final class DeviceMonitor {
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
device.executeShellCommand("echo $" + name, new MultiLineReceiver() { //$NON-NLS-1$
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
index 15a9fd2..5d569a2 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java
@@ -116,10 +116,11 @@ public final class FileListingService {
* Comparator object for FileEntry
*/
private static Comparator<FileEntry> sEntryComparator = new Comparator<FileEntry>() {
+ @Override
public int compare(FileEntry o1, FileEntry o2) {
if (o1 instanceof FileEntry && o2 instanceof FileEntry) {
- FileEntry fe1 = (FileEntry)o1;
- FileEntry fe2 = (FileEntry)o2;
+ FileEntry fe1 = o1;
+ FileEntry fe2 = o2;
return fe1.name.compareTo(fe2.name);
}
return 0;
@@ -569,6 +570,7 @@ public final class FileListingService {
return null;
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -696,6 +698,7 @@ public final class FileListingService {
}
}
}
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
index 9293379..2033f04 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/GetPropReceiver.java
@@ -20,12 +20,12 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * A receiver able to parse the result of the execution of
+ * A receiver able to parse the result of the execution of
* {@link #GETPROP_COMMAND} on a device.
*/
final class GetPropReceiver extends MultiLineReceiver {
final static String GETPROP_COMMAND = "getprop"; //$NON-NLS-1$
-
+
private final static Pattern GETPROP_PATTERN = Pattern.compile("^\\[([^]]+)\\]\\:\\s*\\[(.*)\\]$"); //$NON-NLS-1$
/** indicates if we need to read the first */
@@ -50,23 +50,24 @@ final class GetPropReceiver extends MultiLineReceiver {
if (line.length() == 0 || line.startsWith("#")) {
continue;
}
-
+
Matcher m = GETPROP_PATTERN.matcher(line);
if (m.matches()) {
String label = m.group(1);
String value = m.group(2);
-
+
if (label.length() > 0) {
mDevice.addProperty(label, value);
}
}
}
}
-
+
+ @Override
public boolean isCancelled() {
return false;
}
-
+
@Override
public void done() {
mDevice.update(Device.CHANGE_BUILD_INFO);
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java b/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
index 6a62e60..42f740c 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/HeapSegment.java
@@ -162,20 +162,20 @@ public final class HeapSegment implements Comparable<HeapSegment> {
* so that they can be examined independently.
*/
ByteBuffer data = hs.mUsageData;
- int eState = (int)data.get() & 0x000000ff;
- int eLen = ((int)data.get() & 0x000000ff) + 1;
+ int eState = data.get() & 0x000000ff;
+ int eLen = (data.get() & 0x000000ff) + 1;
while ((eState & PARTIAL_MASK) != 0) {
/* If the partial bit was set, the next byte should describe
* the same object as the current one.
*/
- int nextState = (int)data.get() & 0x000000ff;
+ int nextState = data.get() & 0x000000ff;
if ((nextState & ~PARTIAL_MASK) != (eState & ~PARTIAL_MASK)) {
throw new ParseException("State mismatch", data.position());
}
eState = nextState;
- eLen += ((int)data.get() & 0x000000ff) + 1;
+ eLen += (data.get() & 0x000000ff) + 1;
}
setSolidity(eState & 0x7);
@@ -209,6 +209,7 @@ public final class HeapSegment implements Comparable<HeapSegment> {
this.mLength = length;
}
+ @Override
public int compareTo(HeapSegmentElement other) {
if (mLength != other.mLength) {
return mLength < other.mLength ? -1 : 1;
@@ -253,8 +254,8 @@ public final class HeapSegment implements Comparable<HeapSegment> {
*/
hpsgData.order(ByteOrder.BIG_ENDIAN);
mHeapId = hpsgData.getInt();
- mAllocationUnitSize = (int) hpsgData.get();
- mStartAddress = (long) hpsgData.getInt() & 0x00000000ffffffffL;
+ mAllocationUnitSize = hpsgData.get();
+ mStartAddress = hpsgData.getInt() & 0x00000000ffffffffL;
mOffset = hpsgData.getInt();
mAllocationUnitCount = hpsgData.getInt();
@@ -411,6 +412,7 @@ public final class HeapSegment implements Comparable<HeapSegment> {
return str.toString();
}
+ @Override
public int compareTo(HeapSegment other) {
if (mHeapId != other.mHeapId) {
return mHeapId < other.mHeapId ? -1 : 1;
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
index f3d9412..ac1fa91 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
@@ -47,6 +47,7 @@ public abstract class MultiLineReceiver implements IShellOutputReceiver {
* @see com.android.ddmlib.adb.IShellOutputReceiver#addOutput(
* byte[], int, int)
*/
+ @Override
public final void addOutput(byte[] data, int offset, int length) {
if (isCancelled() == false) {
String s = null;
@@ -105,6 +106,7 @@ public abstract class MultiLineReceiver implements IShellOutputReceiver {
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#flush()
*/
+ @Override
public final void flush() {
if (mUnfinishedLine != null) {
processNewLines(new String[] { mUnfinishedLine });
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java b/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
index d2b5a1e..a963a64 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/NullOutputReceiver.java
@@ -31,18 +31,21 @@ public final class NullOutputReceiver implements IShellOutputReceiver {
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#addOutput(byte[], int, int)
*/
+ @Override
public void addOutput(byte[] data, int offset, int length) {
}
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#flush()
*/
+ @Override
public void flush() {
}
/* (non-Javadoc)
* @see com.android.ddmlib.adb.IShellOutputReceiver#isCancelled()
*/
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java b/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
index 6a94d22..bf0b4e1 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/SyncService.java
@@ -113,16 +113,21 @@ public final class SyncService {
* A Sync progress monitor that does nothing
*/
private static class NullSyncProgresMonitor implements ISyncProgressMonitor {
+ @Override
public void advance(int work) {
}
+ @Override
public boolean isCanceled() {
return false;
}
+ @Override
public void start(int totalWork) {
}
+ @Override
public void startSubTask(String name) {
}
+ @Override
public void stop() {
}
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java b/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
index 8f284f3..93db931 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/ThreadInfo.java
@@ -57,7 +57,7 @@ public final class ThreadInfo implements IStackTraceInfo {
mStime = stime;
mIsDaemon = isDaemon;
}
-
+
/**
* Sets the stack call of the thread.
* @param trace stackcall information.
@@ -80,7 +80,7 @@ public final class ThreadInfo implements IStackTraceInfo {
public String getThreadName() {
return mThreadName;
}
-
+
void setThreadName(String name) {
mThreadName = name;
}
@@ -124,6 +124,7 @@ public final class ThreadInfo implements IStackTraceInfo {
* (non-Javadoc)
* @see com.android.ddmlib.IStackTraceInfo#getStackTrace()
*/
+ @Override
public StackTraceElement[] getStackTrace() {
return mTrace;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java b/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
index 31f265f..22c0703 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/log/EventLogParser.java
@@ -33,9 +33,9 @@ import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
-import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -93,6 +93,7 @@ public final class EventLogParser {
processTagLine(line);
}
}
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
index cbb1c5a..204e07a 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/InstrumentationResultParser.java
@@ -419,6 +419,7 @@ public class InstrumentationResultParser extends MultiLineReceiver {
*
* @see IShellOutputReceiver#isCancelled()
*/
+ @Override
public boolean isCancelled() {
return mIsCancelled;
}
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
index b8cd154..124df7d 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/testrunner/RemoteAndroidTestRunner.java
@@ -17,9 +17,9 @@
package com.android.ddmlib.testrunner;
+import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.IDevice;
import com.android.ddmlib.Log;
-import com.android.ddmlib.AdbCommandRejectedException;
import com.android.ddmlib.ShellCommandUnresponsiveException;
import com.android.ddmlib.TimeoutException;
@@ -93,6 +93,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public String getPackageName() {
return mPackageName;
}
@@ -100,6 +101,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public String getRunnerName() {
if (mRunnerName == null) {
return DEFAULT_RUNNER_NAME;
@@ -117,6 +119,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setClassName(String className) {
addInstrumentationArg(CLASS_ARG_NAME, className);
}
@@ -124,6 +127,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setClassNames(String[] classNames) {
StringBuilder classArgBuilder = new StringBuilder();
@@ -139,6 +143,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setMethodName(String className, String testName) {
setClassName(className + METHOD_SEPARATOR + testName);
}
@@ -146,6 +151,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setTestPackageName(String packageName) {
addInstrumentationArg(PACKAGE_ARG_NAME, packageName);
}
@@ -153,6 +159,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void addInstrumentationArg(String name, String value) {
if (name == null || value == null) {
throw new IllegalArgumentException("name or value arguments cannot be null");
@@ -163,6 +170,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void removeInstrumentationArg(String name) {
if (name == null) {
throw new IllegalArgumentException("name argument cannot be null");
@@ -173,6 +181,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void addBooleanArg(String name, boolean value) {
addInstrumentationArg(name, Boolean.toString(value));
}
@@ -180,6 +189,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setLogOnly(boolean logOnly) {
addBooleanArg(LOG_ARG_NAME, logOnly);
}
@@ -187,6 +197,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setDebug(boolean debug) {
addBooleanArg(DEBUG_ARG_NAME, debug);
}
@@ -194,6 +205,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setCoverage(boolean coverage) {
addBooleanArg(COVERAGE_ARG_NAME, coverage);
}
@@ -201,6 +213,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setTestSize(TestSize size) {
addInstrumentationArg(SIZE_ARG_NAME, size.getRunnerValue());
}
@@ -208,6 +221,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setMaxtimeToOutputResponse(int maxTimeToOutputResponse) {
mMaxTimeToOutputResponse = maxTimeToOutputResponse;
}
@@ -215,6 +229,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void setRunName(String runName) {
mRunName = runName;
}
@@ -222,6 +237,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void run(ITestRunListener... listeners)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -231,6 +247,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void run(Collection<ITestRunListener> listeners)
throws TimeoutException, AdbCommandRejectedException, ShellCommandUnresponsiveException,
IOException {
@@ -276,6 +293,7 @@ public class RemoteAndroidTestRunner implements IRemoteAndroidTestRunner {
/**
* {@inheritDoc}
*/
+ @Override
public void cancel() {
if (mParser != null) {
mParser.cancel();