OSDN Git Service

Fixes crash in HierarchyViewer when windows hash code exceed int capacity.
authorRomain Guy <romainguy@android.com>
Mon, 14 Dec 2009 23:32:31 +0000 (15:32 -0800)
committerRomain Guy <romainguy@android.com>
Mon, 14 Dec 2009 23:32:31 +0000 (15:32 -0800)
Bug: 2321018

hierarchyviewer/src/com/android/hierarchyviewer/scene/WindowsLoader.java

index ef93707..d06aca6 100644 (file)
@@ -58,7 +58,7 @@ public class WindowsLoader {
                 int index = line.indexOf(' ');
                 if (index != -1) {
                     Window w = new Window(line.substring(index + 1),
-                            Integer.parseInt(line.substring(0, index), 16));
+                            (int) Long.parseLong(line.substring(0, index), 16));
                     windows.add(w);
                 }
             }