summaryrefslogtreecommitdiff
path: root/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java')
-rw-r--r--android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java
index 07a626f3803e..c2e7a61dbc16 100644
--- a/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java
+++ b/android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothClient.java
@@ -58,6 +58,27 @@ public class BluetoothClient extends Client {
mSocket.connect();
Log.i(Globals.TAG, "BluetoothClient: connected");
+ }
+
+ @Override
+ public void closeConnection() {
+ try {
+ if (mSocket != null)
+ mSocket.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void onDisconnect() {
+ if (!mBluetoothWasEnabled) {
+ mAdapter.disable();
+ }
+ }
+
+ @Override
+ public void validating() throws IOException {
+ // TODO Auto-generated method stub
mInputStream = mSocket.getInputStream();
mReader = new BufferedReader(new InputStreamReader(mInputStream,
@@ -80,22 +101,6 @@ public class BluetoothClient extends Client {
}
- @Override
- public void closeConnection() {
- try {
- if (mSocket != null)
- mSocket.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- protected void onDisconnect() {
- if (!mBluetoothWasEnabled) {
- mAdapter.disable();
- }
- }
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */