From 51aceadfb171a851bfe0425f543101f867ac12e8 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 18 Oct 2017 23:18:46 +0200 Subject: [PATCH] Source relevan upstream changes till 02ac5137. --- .../java/org/monkey/d/ruffy/ruffy/driver/Ruffy.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ruffyscripter/src/main/java/org/monkey/d/ruffy/ruffy/driver/Ruffy.java b/ruffyscripter/src/main/java/org/monkey/d/ruffy/ruffy/driver/Ruffy.java index fdff0ff6ae..83cc345d25 100644 --- a/ruffyscripter/src/main/java/org/monkey/d/ruffy/ruffy/driver/Ruffy.java +++ b/ruffyscripter/src/main/java/org/monkey/d/ruffy/ruffy/driver/Ruffy.java @@ -57,6 +57,10 @@ public class Ruffy extends Service { @Override public int doRTConnect() throws RemoteException { + if(isConnected()) { + rtHandler.rtStarted(); + return 0; + } step= 0; if(Ruffy.this.rtHandler==null) { @@ -77,8 +81,10 @@ public class Ruffy extends Service { public void doRTDisconnect() { step = 200; - stopRT(); - btConn.disconnect(); + if(btConn!=null) { + stopRT(); + btConn.disconnect(); + } } public void rtSendKey(byte keyCode, boolean changed)