diff options
author | Artur Dryomov <artur.dryomov@gmail.com> | 2013-07-12 01:22:18 +0300 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-07-25 18:01:52 +0100 |
commit | 82f5b8200f84127d55a9b3aac9b8ec6aea5dc426 (patch) | |
tree | b766f43bfca5c5c1b0500c79554eb3f2e9b8c459 /android/sdremote | |
parent | 77ba1b25d1b31cc38af5b7f40d846aef03a455f9 (diff) |
Fix messages receiver possible errors related to thread usage.
Change-Id: I403cee3815a4e2cd70468032dd9c50742262bee3
Diffstat (limited to 'android/sdremote')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java b/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java index b187e2494a4c..ab65dd498da2 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java +++ b/android/sdremote/src/org/libreoffice/impressremote/communication/MessagesReceiver.java @@ -24,14 +24,12 @@ public class MessagesReceiver implements Runnable { private final MessagesListener mMessagesListener; - private final Thread mMessagesListenerThread; - public MessagesReceiver(ServerConnection aServerConnection, MessagesListener aMessagesListener) { mMessagesReader = buildMessagesReader(aServerConnection); mMessagesListener = aMessagesListener; - mMessagesListenerThread = new Thread(this); + Thread mMessagesListenerThread = new Thread(this); mMessagesListenerThread.start(); } @@ -89,7 +87,7 @@ public class MessagesReceiver implements Runnable { try { return mMessagesReader.readLine(); } catch (IOException e) { - throw new RuntimeException("Unable to read message parameter."); + return null; } } |