comparison src/com/five_ten_sg/connectbot/monitor/MonitorService.java @ 5:d1f095e4f8f0

allow async tts
author Carl Byington <carl@five-ten-sg.com>
date Mon, 23 Jun 2014 17:11:52 -0700
parents 46a9cdf018a1
children 31979440706a
comparison
equal deleted inserted replaced
4:46a9cdf018a1 5:d1f095e4f8f0
3 import java.io.IOException; 3 import java.io.IOException;
4 import java.io.InputStream; 4 import java.io.InputStream;
5 import java.io.OutputStream; 5 import java.io.OutputStream;
6 import java.net.ServerSocket; 6 import java.net.ServerSocket;
7 import java.net.Socket; 7 import java.net.Socket;
8 import java.util.HashMap;
8 import java.util.concurrent.ArrayBlockingQueue; 9 import java.util.concurrent.ArrayBlockingQueue;
9 import java.util.concurrent.BlockingQueue; 10 import java.util.concurrent.BlockingQueue;
10 import java.util.concurrent.ConcurrentHashMap; 11 import java.util.concurrent.ConcurrentHashMap;
11 import java.util.Locale; 12 import java.util.Locale;
12 13
46 public static ConcurrentHashMap<Integer,CommunicationThread> clients = new ConcurrentHashMap<Integer,CommunicationThread>(); 47 public static ConcurrentHashMap<Integer,CommunicationThread> clients = new ConcurrentHashMap<Integer,CommunicationThread>();
47 public static int currentConnection = -1; 48 public static int currentConnection = -1;
48 49
49 private boolean speech = false; 50 private boolean speech = false;
50 private TextToSpeech talker = null; 51 private TextToSpeech talker = null;
52 private BlockingQueue<String> talkerQueue = null;
51 public Handler handler = null; 53 public Handler handler = null;
52 private ServerSocket serverSocket; 54 private ServerSocket serverSocket;
53 private Thread serverThread = null; 55 private Thread serverThread = null;
54 private WifiManager.WifiLock wifiLock; 56 private WifiManager.WifiLock wifiLock;
55 private PowerManager.WakeLock wakeLock; 57 private PowerManager.WakeLock wakeLock;