Mercurial > 510ConnectbotMonitor
comparison src/com/five_ten_sg/connectbot/monitor/MonitorService.java @ 24:4f1cc4f44c41
add mechanism to allow getfield from other threads
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 01 May 2015 12:00:38 -0700 |
parents | 2586a4f5c8c3 |
children |
comparison
equal
deleted
inserted
replaced
23:2586a4f5c8c3 | 24:4f1cc4f44c41 |
---|---|
378 break; | 378 break; |
379 case MONITOR_CMD_ACTIVATE: | 379 case MONITOR_CMD_ACTIVATE: |
380 abandonGetField(connection); | 380 abandonGetField(connection); |
381 buf = new char[plen-3]; | 381 buf = new char[plen-3]; |
382 System.arraycopy(packet, 3, buf, 0, plen-3); | 382 System.arraycopy(packet, 3, buf, 0, plen-3); |
383 teActivate(connection, packet[1], packet[2], buf); | 383 teActivate(connection, initString, packet[1], packet[2], buf); |
384 break; | 384 break; |
385 case MONITOR_CMD_KEYSTATE: | 385 case MONITOR_CMD_KEYSTATE: |
386 teKeyState(connection, (packet[1] == 1)); | 386 teKeyState(connection, (packet[1] == 1)); |
387 break; | 387 break; |
388 case MONITOR_CMD_CURSORMOVE: | 388 case MONITOR_CMD_CURSORMOVE: |
449 public void teClose(int connection) { | 449 public void teClose(int connection) { |
450 Log.i(TAG, String.format("teClose %d", connection)); | 450 Log.i(TAG, String.format("teClose %d", connection)); |
451 setCurrentConnection(-1); | 451 setCurrentConnection(-1); |
452 } | 452 } |
453 | 453 |
454 public void teActivate(int connection, int lines, int columns, char[] buf) { | 454 public void teActivate(int connection, String fn, int lines, int columns, char[] buf) { |
455 Log.i(TAG, String.format("teActivate %d", connection)); | 455 Log.i(TAG, String.format("teActivate %d", connection)); |
456 printer(String.format("activate %d lines %d columns %d b.len %d", connection, lines, columns, buf.length)); | 456 printer(String.format("activate %d lines %d columns %d b.len %d", connection, lines, columns, buf.length)); |
457 boolean sameinit = false; | 457 boolean sameinit = false; |
458 CommunicationThread cm = clients.get(currentConnection); | 458 CommunicationThread cm = clients.get(currentConnection); |
459 if (cm != null) { | 459 if (cm != null) { |