diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-09-17 19:21:24 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-09-17 19:21:24 +0200 |
commit | 58a4b628a6d21195ffc5a2b1e924dc1d3d90a225 (patch) | |
tree | 68bfdcc8194fe669251368ccf51d8014f19667b7 /src/main/java/de/pixart | |
parent | fb69e05412453dfe91b8690119225c5ccf12835a (diff) |
additional null checks around 'read by' intent
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 19e619739..fd431798c 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -652,7 +652,8 @@ public class XmppConnectionService extends Service { String pushedAccountHash = null; boolean interactive = false; if (action != null) { - final Conversation c = findConversationByUuid(intent.getStringExtra("uuid")); + final String uuid = intent.getStringExtra("uuid"); + final Conversation c = findConversationByUuid(uuid); switch (action) { case ConnectivityManager.CONNECTIVITY_ACTION: if (hasInternetConnection() && Config.RESET_ATTEMPT_COUNT_ON_NETWORK_CHANGE) { @@ -691,7 +692,11 @@ public class XmppConnectionService extends Service { } break; case ACTION_MARK_AS_READ: - sendReadMarker(c); + if (c != null) { + sendReadMarker(c); + } else { + Log.d(Config.LOGTAG, "received mark read intent for unknown conversation (" + uuid + ")"); + } break; case AudioManager.RINGER_MODE_CHANGED_ACTION: if (dndOnSilentMode()) { |