Mercurial > 510ConnectbotMonitor
comparison app/src/main/java/com/five_ten_sg/connectbot/monitor/MonitorActivity.java @ 31:0bc0b4798d9e
fix saystring(12) command for proper unicode and document it
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 28 Apr 2019 14:45:56 -0700 |
parents | 807f7e4eaebe |
children |
comparison
equal
deleted
inserted
replaced
30:89b6389aa5b2 | 31:0bc0b4798d9e |
---|---|
22 import android.os.PowerManager; | 22 import android.os.PowerManager; |
23 import android.util.Log; | 23 import android.util.Log; |
24 import android.widget.TextView; | 24 import android.widget.TextView; |
25 | 25 |
26 public class MonitorActivity extends Activity { | 26 public class MonitorActivity extends Activity { |
27 public final static String TAG = "ConnectBot.MonitorActivity"; | 27 public static final String TAG = "ConnectBot.MonitorAct."; |
28 | |
29 public static final int MESSAGE_CODE_PRINT = 6000; | 28 public static final int MESSAGE_CODE_PRINT = 6000; |
30 private final int LINES = 20; | 29 private final int LINES = 20; |
31 private String[] texts = new String[LINES]; | 30 private String[] texts = new String[LINES]; |
32 private int start = 0; | 31 private int start = 0; |
33 private int count = 0; | 32 private int count = 0; |
65 printer(""); | 64 printer(""); |
66 printer(String.format("External directory is %s", external_dir)); | 65 printer(String.format("External directory is %s", external_dir)); |
67 printer(""); | 66 printer(""); |
68 Log.i(TAG, "binding to monitor service"); | 67 Log.i(TAG, "binding to monitor service"); |
69 Intent intent = new Intent ("com.five_ten_sg.connectbot.monitor.MonitorService"); | 68 Intent intent = new Intent ("com.five_ten_sg.connectbot.monitor.MonitorService"); |
69 intent.setPackage("com.five_ten_sg.connectbot.monitor"); | |
70 bindService(intent, connection, Context.BIND_AUTO_CREATE); | 70 bindService(intent, connection, Context.BIND_AUTO_CREATE); |
71 } | 71 } |
72 | 72 |
73 private void printer(String msg) { | 73 private void printer(String msg) { |
74 if (count < LINES) count++; | 74 if (count < LINES) count++; |