summaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-20 17:10:46 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-08-20 17:11:50 +0200
commit2e44e8134b077032341849886e2aad465cee1fd9 (patch)
tree989767d94fb0fdf7dbe5eea6c164fd07538a2bd0 /android
parentInclude winsock2 instead of winsock for discovery. (diff)
downloadcore-2e44e8134b077032341849886e2aad465cee1fd9.tar.gz
core-2e44e8134b077032341849886e2aad465cee1fd9.zip
Fixed formatting of Network Servers in selection screen.
Change-Id: Ia2e0612588b1bad4971b73852f9cbededb233c7e
Diffstat (limited to 'android')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java1
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java8
2 files changed, 6 insertions, 3 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
index f6f9514de9af..267636fa606f 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java
@@ -101,6 +101,7 @@ public class SelectorActivity extends Activity {
void doUnbindService() {
unbindService(mConnection);
+ mCommunicationService = null;
}
private ServiceConnection mConnection = new ServiceConnection() {
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
index c88d018bcabe..4734ff457e32 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/ServerFinder.java
@@ -53,9 +53,10 @@ public class ServerFinder {
if (i == aBuffer.length || !aCommand.equals("LOREMOTE_ADVERTISE")) {
return;
}
- for (int j = i; j < aBuffer.length; j++) {
- if (aPacket.getData()[i] == '\n') {
- aName = new String(aPacket.getData(), i + 1, j, CHARSET);
+ for (int j = i + 1; j < aBuffer.length; j++) {
+ if (aPacket.getData()[j] == '\n') {
+ aName = new String(aPacket.getData(), i + 1, j - (i + 1),
+ CHARSET);
break;
}
}
@@ -66,6 +67,7 @@ public class ServerFinder {
.getAddress().getHostAddress(), aName,
System.currentTimeMillis());
mServerList.put(aServer.getAddress(), aServer);
+ System.out.println("Contains:<<" + aName + ">>");
Intent aIntent = new Intent(
CommunicationService.MSG_SERVERLIST_CHANGED);