diff options
author | Konstantin Lopyrev <klopyrev@google.com> | 2010-08-25 13:24:17 -0700 |
---|---|---|
committer | Konstantin Lopyrev <klopyrev@google.com> | 2010-08-27 09:09:02 -0700 |
commit | 030d7498fd1437aafa847fadfc7c686976bf6c20 (patch) | |
tree | c754508e7d83470143a94b47dfa8f9739089c3a8 /hierarchyviewer2 | |
parent | b0c49c6f495609f15a5df2b2d062ac0b4776f72b (diff) | |
download | sdk-030d7498fd1437aafa847fadfc7c686976bf6c20.zip sdk-030d7498fd1437aafa847fadfc7c686976bf6c20.tar.gz sdk-030d7498fd1437aafa847fadfc7c686976bf6c20.tar.bz2 |
Bug fixes and reducing timeout.
Change-Id: Ibfa23734679d0337aa7f6e250a621026b13a70f0
Diffstat (limited to 'hierarchyviewer2')
3 files changed, 5 insertions, 2 deletions
diff --git a/hierarchyviewer2/app/src/com/android/hierarchyviewer/HierarchyViewerApplication.java b/hierarchyviewer2/app/src/com/android/hierarchyviewer/HierarchyViewerApplication.java index 7de97f4..d66f8e1 100644 --- a/hierarchyviewer2/app/src/com/android/hierarchyviewer/HierarchyViewerApplication.java +++ b/hierarchyviewer2/app/src/com/android/hierarchyviewer/HierarchyViewerApplication.java @@ -1052,6 +1052,7 @@ public class HierarchyViewerApplication extends ApplicationWindow { int newValue = refreshSlider.getSelection(); if (oldValue != newValue) { refreshInterval = newValue; + refreshTimeLeft = Math.min(refreshTimeLeft, refreshInterval); oldValue = newValue; } } diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceConnection.java b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceConnection.java index 3080cc1..cda1a77 100644 --- a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceConnection.java +++ b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceConnection.java @@ -49,7 +49,7 @@ public class DeviceConnection { } socketChannel.connect(new InetSocketAddress("127.0.0.1", port)); - socketChannel.socket().setSoTimeout(120000); + socketChannel.socket().setSoTimeout(40000); } public BufferedReader getInputStream() throws IOException { diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/TreeView.java b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/TreeView.java index b7d9303..2c3a13e 100644 --- a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/TreeView.java +++ b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/TreeView.java @@ -96,6 +96,8 @@ public class TreeView extends Canvas implements TreeChangeListener { private static Image filteredSelectedImage; + private static Font systemFont; + private Color boxColor; private Color textBackgroundColor; @@ -178,6 +180,7 @@ public class TreeView extends Canvas implements TreeChangeListener { if (scaledSelectedImage != null) { scaledSelectedImage.dispose(); } + systemFont = Display.getDefault().getSystemFont(); } private DisposeListener disposeListener = new DisposeListener() { @@ -941,7 +944,6 @@ public class TreeView extends Canvas implements TreeChangeListener { } private static Font getFont(int size, boolean bold) { - Font systemFont = Display.getDefault().getSystemFont(); FontData[] fontData = systemFont.getFontData(); for (int i = 0; i < fontData.length; i++) { fontData[i].setHeight(size); |