aboutsummaryrefslogtreecommitdiffstats
path: root/ddms
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2010-10-07 08:56:12 -0700
committerTor Norbye <tnorbye@google.com>2010-10-07 14:26:31 -0700
commit0ac3325cdb4593b324ddd1e7863e8fedf8c3f09f (patch)
tree4266ed5fc5f1b3ede9c24d518a65a76b5be1865f /ddms
parent69b73d4b186ad4074a746bafcc425512e050e385 (diff)
downloadsdk-0ac3325cdb4593b324ddd1e7863e8fedf8c3f09f.zip
sdk-0ac3325cdb4593b324ddd1e7863e8fedf8c3f09f.tar.gz
sdk-0ac3325cdb4593b324ddd1e7863e8fedf8c3f09f.tar.bz2
Fix various warnings
Change-Id: I4864b89347ed8756b1eae83d97990555144fb93a
Diffstat (limited to 'ddms')
-rw-r--r--ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java1
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySync.java11
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java6
-rw-r--r--ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncPerf.java13
4 files changed, 23 insertions, 8 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java b/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
index 01cdf0a..30bbada 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java
@@ -620,6 +620,7 @@ public final class AndroidDebugBridge {
* @param line The line to scan.
* @return True if a version number was found (whether it is acceptable or not).
*/
+ @SuppressWarnings("all") // With Eclipse 3.6, replace by @SuppressWarnings("unused")
private boolean scanVersionLine(String line) {
if (line != null) {
Matcher matcher = sAdbVersion.matcher(line);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySync.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySync.java
index 1c006bc..6122513 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySync.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySync.java
@@ -19,6 +19,7 @@ package com.android.ddmuilib.log.event;
import com.android.ddmlib.log.EventContainer;
import com.android.ddmlib.log.EventLogParser;
import com.android.ddmlib.log.InvalidTypeException;
+
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.jfree.chart.labels.CustomXYToolTipGenerator;
@@ -78,7 +79,11 @@ public class DisplaySync extends SyncCommon {
XYBarRenderer br = new XYBarRenderer();
mDatasetsSync = new TimePeriodValues[NUM_AUTHS];
- mTooltipsSync = new List[NUM_AUTHS];
+
+ @SuppressWarnings("unchecked")
+ List<String> mTooltipsSyncTmp[] = new List[NUM_AUTHS];
+ mTooltipsSync = mTooltipsSyncTmp;
+
mTooltipGenerators = new CustomXYToolTipGenerator[NUM_AUTHS];
TimePeriodValuesCollection tpvc = new TimePeriodValuesCollection();
@@ -129,7 +134,7 @@ public class DisplaySync extends SyncCommon {
if (event.mTag == EVENT_TICKLE) {
int auth = getAuth(event.getValueAsString(0));
if (auth >= 0) {
- long msec = (long)event.sec * 1000L + (event.nsec / 1000000L);
+ long msec = event.sec * 1000L + (event.nsec / 1000000L);
mDatasetsSyncTickle[auth].addOrUpdate(new FixedMillisecond(msec), -1);
}
}
@@ -282,7 +287,7 @@ public class DisplaySync extends SyncCommon {
mTooltipsSync[auth].add(getTextFromDetails(auth, details, syncSource));
mTooltipGenerators[auth].addToolTipSeries(mTooltipsSync[auth]);
if (details.indexOf('x') >= 0 || details.indexOf('X') >= 0) {
- long msec = (long)event.sec * 1000L + (event.nsec / 1000000L);
+ long msec = event.sec * 1000L + (event.nsec / 1000000L);
mDatasetError.addOrUpdate(new FixedMillisecond(msec), -1);
}
}
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java
index 36d90ce..5bfc039 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java
@@ -18,6 +18,7 @@ package com.android.ddmuilib.log.event;
import com.android.ddmlib.log.EventContainer;
import com.android.ddmlib.log.EventLogParser;
+
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.jfree.chart.plot.XYPlot;
@@ -69,7 +70,10 @@ public class DisplaySyncHistogram extends SyncCommon {
AbstractXYItemRenderer br = new XYBarRenderer();
mDatasetsSyncHist = new TimePeriodValues[NUM_AUTHS+1];
- mTimePeriodMap = new HashMap[NUM_AUTHS + 1];
+
+ @SuppressWarnings("unchecked")
+ Map<SimpleTimePeriod, Integer> mTimePeriodMapTmp[] = new HashMap[NUM_AUTHS + 1];
+ mTimePeriodMap = mTimePeriodMapTmp;
TimePeriodValuesCollection tpvc = new TimePeriodValuesCollection();
xyPlot.setDataset(tpvc);
diff --git a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncPerf.java b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncPerf.java
index b484f26..10176e3 100644
--- a/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncPerf.java
+++ b/ddms/libs/ddmuilib/src/com/android/ddmuilib/log/event/DisplaySyncPerf.java
@@ -19,6 +19,7 @@ package com.android.ddmuilib.log.event;
import com.android.ddmlib.log.EventContainer;
import com.android.ddmlib.log.EventLogParser;
import com.android.ddmlib.log.InvalidTypeException;
+
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.jfree.chart.labels.CustomXYToolTipGenerator;
@@ -35,7 +36,8 @@ import java.util.List;
public class DisplaySyncPerf extends SyncCommon {
CustomXYToolTipGenerator mTooltipGenerator;
- List mTooltips[];
+
+ List<String> mTooltips[];
// The series number for each graphed item.
// sync authorities are 0-3
@@ -125,7 +127,10 @@ public class DisplaySyncPerf extends SyncCommon {
XYPlot xyPlot = mChart.getXYPlot();
xyPlot.getRangeAxis().setVisible(false);
mTooltipGenerator = new CustomXYToolTipGenerator();
- mTooltips = new List[NUM_SERIES];
+
+ @SuppressWarnings("unchecked")
+ List<String>[] mTooltipsTmp = new List[NUM_SERIES];
+ mTooltips = mTooltipsTmp;
XYBarRenderer br = new XYBarRenderer();
br.setUseYInterval(true);
@@ -158,7 +163,7 @@ public class DisplaySyncPerf extends SyncCommon {
if (event.mTag == EVENT_DB_OPERATION) {
// 52000 db_operation (name|3),(op_type|1|5),(time|2|3)
String tip = event.getValueAsString(0);
- long endTime = (long) event.sec * 1000L + (event.nsec / 1000000L);
+ long endTime = event.sec * 1000L + (event.nsec / 1000000L);
int opType = Integer.parseInt(event.getValueAsString(1));
long duration = Long.parseLong(event.getValueAsString(2));
@@ -175,7 +180,7 @@ public class DisplaySyncPerf extends SyncCommon {
// 52001 http_stats (useragent|3),(response|2|3),(processing|2|3),(tx|1|2),(rx|1|2)
String tip = event.getValueAsString(0) + ", tx:" + event.getValueAsString(3) +
", rx: " + event.getValueAsString(4);
- long endTime = (long) event.sec * 1000L + (event.nsec / 1000000L);
+ long endTime = event.sec * 1000L + (event.nsec / 1000000L);
long netEndTime = endTime - Long.parseLong(event.getValueAsString(2));
long netStartTime = netEndTime - Long.parseLong(event.getValueAsString(1));
mDatasets[HTTP_NETWORK].add(new SimpleTimePeriod(netStartTime, netEndTime),