From 307913304a7636d69fe6847a13c20aa7d9729e01 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 13 Feb 2013 02:10:34 +0200 Subject: [PATCH] Do display the computer name in the dialog when connection failed The latestInstance lifecycle and mName initialisation was borked. Change-Id: If7ef8a15fdc297e0fe6e401399a3b94dcd8d08c5 --- .../src/org/libreoffice/impressremote/communication/Client.java | 2 +- .../libreoffice/impressremote/communication/NetworkClient.java | 1 - 2 files changed, 1 insertion(+), 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,