Skip to content

Commit

Permalink
Fix a wierd bug #11 in bugly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhongyi Tong committed Feb 4, 2016
1 parent 3bb9254 commit 9053f3b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ private void setCurrentActivityName(AccessibilityEvent event) {
}

private boolean watchList(AccessibilityEvent event) {
AccessibilityNodeInfo eventSource = event.getSource();
// Not a message
if (event.getEventType() != AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED || event.getSource() == null)
if (event.getEventType() != AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED || eventSource == null)
return false;

List<AccessibilityNodeInfo> nodes = event.getSource().findAccessibilityNodeInfosByText(WECHAT_NOTIFICATION_TIP);
List<AccessibilityNodeInfo> nodes = eventSource.findAccessibilityNodeInfosByText(WECHAT_NOTIFICATION_TIP);
if (!nodes.isEmpty()) {
AccessibilityNodeInfo nodeToClick = nodes.get(0);
CharSequence contentDescription = nodeToClick.getContentDescription();
Expand Down

0 comments on commit 9053f3b

Please sign in to comment.