fix: crash on notification events

This commit is contained in:
hyb1996
2017-09-25 16:30:09 +08:00
parent b9f8f9bbd7
commit 7616634e40
7 changed files with 48 additions and 4 deletions

View File

@@ -213,10 +213,11 @@ public class Events extends EventEmitter implements OnKeyListener, TouchObserver
@Override
public void onNotification(final AccessibilityEvent event, final Notification notification) {
final NotificationInfo info = NotificationInfo.fromEvent(event);
mHandler.post(new Runnable() {
@Override
public void run() {
emit("notification", NotificationInfo.fromEvent(event), notification);
emit("notification", info, notification);
}
});