aboutsummaryrefslogtreecommitdiffstats
path: root/hierarchyviewer2
diff options
context:
space:
mode:
Diffstat (limited to 'hierarchyviewer2')
-rw-r--r--hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceBridge.java1
-rw-r--r--hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/ViewNode.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceBridge.java b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceBridge.java
index 07bb807..10308a3 100644
--- a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceBridge.java
+++ b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/DeviceBridge.java
@@ -468,6 +468,7 @@ public class DeviceBridge {
} catch (Exception e) {
Log.e(TAG, "Unable to load window data for window " + window.getTitle() + " on device "
+ window.getDevice());
+ Log.e(TAG, e.getMessage());
} finally {
if (connection != null) {
connection.close();
diff --git a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/ViewNode.java b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/ViewNode.java
index 76eaa10..4ab4fc6 100644
--- a/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/ViewNode.java
+++ b/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/device/ViewNode.java
@@ -125,6 +125,9 @@ public class ViewNode {
this.parent.children.add(this);
}
int delimIndex = data.indexOf('@');
+ if (delimIndex < 0) {
+ throw new IllegalArgumentException("Invalid format for ViewNode, missing @: " + data);
+ }
name = data.substring(0, delimIndex);
data = data.substring(delimIndex + 1);
delimIndex = data.indexOf(' ');