# HG changeset patch # User Carl Byington # Date 1403568316 25200 # Node ID 2be5bca648ab9551279a34c5b6fe33e885b6acda # Parent f6a1aabf384fd8fb8a9025adc3588423c183cc35 switch to static functions diff -r f6a1aabf384f -r 2be5bca648ab src/com/five_ten_sg/connectbot/monitor/MonitorActivity.java --- a/src/com/five_ten_sg/connectbot/monitor/MonitorActivity.java Mon Jun 23 16:57:39 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/monitor/MonitorActivity.java Mon Jun 23 17:05:16 2014 -0700 @@ -68,7 +68,7 @@ private void printer(String msg) { if (count < LINES) count++; else start = (start+1) % LINES; - texts[(start+count-1) % LINES] = s + "\n"; + texts[(start+count-1) % LINES] = msg + "\n"; String c = ""; for (int i=0; i clients = new ConcurrentHashMap(); + public static int currentConnection = -1; private boolean speech = false; private TextToSpeech talker = null; public Handler handler = null; private ServerSocket serverSocket; private Thread serverThread = null; - private ConcurrentHashMap clients = new ConcurrentHashMap(); private WifiManager.WifiLock wifiLock; private PowerManager.WakeLock wakeLock; final private IBinder binder = new MonitorBinder(); @@ -333,7 +334,7 @@ //////////////////////////////////////// //// these functions are called from your monitoring code thread - public void teSetField(int connection, int l, int c, char[] buf) { + public static void teSetField(int connection, int l, int c, char[] buf) { int len = buf.length; Log.i(TAG, String.format("teSetField %d request line %d column %d len %d", connection, l, c, len)); CommunicationThread cm = clients.get(connection); @@ -347,7 +348,7 @@ } } - public char[] teGetField(int connection, int l, int c, int len) { + public static char[] teGetField(int connection, int l, int c, int len) { Log.i(TAG, String.format("teGetField %d request line %d column %d len %d", connection, l, c, len)); CommunicationThread cm = clients.get(connection); if (cm != null) { @@ -368,7 +369,7 @@ return new char[0]; } - public void teScreenWatch(int connection, int l, int c, int len) { + public static void teScreenWatch(int connection, int l, int c, int len) { Log.i(TAG, String.format("teScreenWatch %d request line %d column %d len %d", connection, l, c, len)); CommunicationThread cm = clients.get(connection); if (cm != null) { @@ -380,7 +381,7 @@ } } - public void teSpeak(int connection, String msg, boolean flush) { + public static void teSpeak(int connection, String msg, boolean flush) { if (speech) talker.speak(msg, (flush) ? TextToSpeech.QUEUE_FLUSH : TextToSpeech.QUEUE_ADD, null); }