From ad44b356c4b3e295a8527ec2d2a20b0f1417a5a1 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sun, 27 Aug 2017 15:29:25 +0200 Subject: [PATCH] Revert "Try building against ruffy stable, 8dae0c0fedd5e371e85da3433a07aaab27b05db0" This reverts commit 8720c08cdd4a7f89b77816d849da9c585fb8f1ef. --- .../aidl/org/monkey/d/ruffy/ruffy/driver/IRuffyService.aidl | 6 +----- .../main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 4 +++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/aidl/org/monkey/d/ruffy/ruffy/driver/IRuffyService.aidl b/app/src/main/aidl/org/monkey/d/ruffy/ruffy/driver/IRuffyService.aidl index ded119c7b4..6c988aa038 100644 --- a/app/src/main/aidl/org/monkey/d/ruffy/ruffy/driver/IRuffyService.aidl +++ b/app/src/main/aidl/org/monkey/d/ruffy/ruffy/driver/IRuffyService.aidl @@ -6,8 +6,7 @@ import org.monkey.d.ruffy.ruffy.driver.IRTHandler; interface IRuffyService { - void addHandler(IRTHandler handler); - void removeHandler(IRTHandler handler); + void setHandler(IRTHandler handler); /** Connect to the pump * @@ -18,10 +17,7 @@ interface IRuffyService { /** Disconnect from the pump */ void doRTDisconnect(); - /*What's the meaning of 'changed'? - * changed means if a button state has been changed, like btton pressed is a change and button release another*/ void rtSendKey(byte keyCode, boolean changed); void resetPairing(); boolean isConnected(); - boolean isBoundToPump(); } diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 17f17d8534..7630907160 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -48,6 +48,7 @@ public class RuffyScripter { public void start(IRuffyService newService) { try { +/* if (ruffyService != null) { try { ruffyService.removeHandler(mHandler); @@ -55,6 +56,7 @@ public class RuffyScripter { // ignore } } +*/ if (newService != null) { this.ruffyService = newService; // TODO this'll be done better in v2 via ConnectionManager @@ -62,7 +64,7 @@ public class RuffyScripter { idleDisconnectMonitorThread.start(); } started = true; - newService.addHandler(mHandler); + newService.setHandler(mHandler); } } catch (Exception e) { log.error("Unhandled exception starting RuffyScripter", e);