mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
Do not guard code that can not throw the caught exception
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
af514b142a
commit
ac4be52b84
@ -320,8 +320,14 @@ public class PeerConnectionWrapper {
|
|||||||
String strData = new String(bytes);
|
String strData = new String(bytes);
|
||||||
Log.d(TAG, "Got msg: " + strData + " over " + TAG + " " + sessionId);
|
Log.d(TAG, "Got msg: " + strData + " over " + TAG + " " + sessionId);
|
||||||
|
|
||||||
|
DataChannelMessage dataChannelMessage;
|
||||||
try {
|
try {
|
||||||
DataChannelMessage dataChannelMessage = LoganSquare.parse(strData, DataChannelMessage.class);
|
dataChannelMessage = LoganSquare.parse(strData, DataChannelMessage.class);
|
||||||
|
} catch (IOException e) {
|
||||||
|
Log.d(TAG, "Failed to parse data channel message");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ("nickChanged".equals(dataChannelMessage.getType())) {
|
if ("nickChanged".equals(dataChannelMessage.getType())) {
|
||||||
String nick = null;
|
String nick = null;
|
||||||
@ -349,9 +355,6 @@ public class PeerConnectionWrapper {
|
|||||||
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType
|
||||||
.VIDEO_CHANGE, sessionId, null, FALSE, videoStreamType));
|
.VIDEO_CHANGE, sessionId, null, FALSE, videoStreamType));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
|
||||||
Log.d(TAG, "Failed to parse data channel message");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user