summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-02-13 02:10:34 +0200
committerMichael Meeks <michael.meeks@suse.com>2013-02-13 11:40:05 +0000
commitfa66259a2b3cf5454650ee388d7e93b67f5a69d5 (patch)
tree6d9610e7b7bdbb5c79c395139aab49b3b6b4a9d8 /android
parentf08c9e322b8fe6cbdeff125a0c73b29188dcad31 (diff)
Do display the computer name in the dialog when connection failed
The latestInstance lifecycle and mName initialisation was borked. Change-Id: If7ef8a15fdc297e0fe6e401399a3b94dcd8d08c5 Signed-off-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/Client.java2
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java1
2 files changed, 1 insertions, 2 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java b/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
index 1c3dce8bc2db..ce5e3ad0e946 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/Client.java
@@ -47,6 +47,7 @@ public abstract class Client {
CommunicationService aCommunicationService,
Receiver aReceiver) {
mServer = aServer;
+ mName = aServer.getName();
mCommunicationService = aCommunicationService;
mReceiver = aReceiver;
latestInstance = this;
@@ -92,7 +93,6 @@ public abstract class Client {
// TODO stream couldn't be opened.
e1.printStackTrace();
} finally {
- latestInstance = null;
onDisconnect();
}
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java b/android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java
index 778f9c3bfaf0..2e88a171a8a5 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java
@@ -37,7 +37,6 @@ public class NetworkClient extends Client {
Receiver aReceiver) throws UnknownHostException,
IOException {
super(aServer, aCommunicationService, aReceiver);
- mName = aServer.getName();
mSocket = new Socket(aServer.getAddress(), PORT);
mInputStream = mSocket.getInputStream();
mReader = new BufferedReader(new InputStreamReader(mInputStream,