diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-02-13 02:10:34 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-02-13 02:14:58 +0200 |
commit | 307913304a7636d69fe6847a13c20aa7d9729e01 (patch) | |
tree | 568ee0c1035b15b10d340d341de0efd065ab89fe | |
parent | 2244bb1467454614140bc71af7395d0129e27bc3 (diff) |
Do display the computer name in the dialog when connection failed
The latestInstance lifecycle and mName initialisation was borked.
Change-Id: If7ef8a15fdc297e0fe6e401399a3b94dcd8d08c5
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/communication/Client.java | 2 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/communication/NetworkClient.java | 1 |
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, |