Merge change I236092a3

* changes:
  Fixes crash in HierarchyViewer when windows hash code exceed int capacity. Bug: 2321018
This commit is contained in:
Android (Google) Code Review
2009-12-14 17:57:43 -08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -702,7 +702,7 @@ public class ViewDebug {
if (parameter.indexOf('@') != -1) {
final String[] ids = parameter.split("@");
final String className = ids[0];
final int hashCode = Integer.parseInt(ids[1], 16);
final int hashCode = (int) Long.parseLong(ids[1], 16);
View view = root.getRootView();
if (view instanceof ViewGroup) {

View File

@@ -4642,7 +4642,7 @@ public class WindowManagerService extends IWindowManager.Stub
index = parameters.length();
}
final String code = parameters.substring(0, index);
int hashCode = "ffffffff".equals(code) ? -1 : Integer.parseInt(code, 16);
int hashCode = (int) Long.parseLong(code, 16);
// Extract the command's parameter after the window description
if (index < parameters.length()) {