Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/TerminalView.java @ 417:4dcc071e1feb
monitor failure should not kill the TE
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 29 Oct 2014 12:12:48 -0700 |
parents | e3b83c4f02f1 |
children | 9045b1af94e5 |
comparison
equal
deleted
inserted
replaced
416:07c1da90deab | 417:4dcc071e1feb |
---|---|
70 private Path ctrlCursor, altCursor, shiftCursor; | 70 private Path ctrlCursor, altCursor, shiftCursor; |
71 private RectF tempSrc, tempDst; | 71 private RectF tempSrc, tempDst; |
72 private Matrix scaleMatrix; | 72 private Matrix scaleMatrix; |
73 private static final Matrix.ScaleToFit scaleType = Matrix.ScaleToFit.FILL; | 73 private static final Matrix.ScaleToFit scaleType = Matrix.ScaleToFit.FILL; |
74 | 74 |
75 private Toast notification = null; | |
76 private String lastNotification = null; | 75 private String lastNotification = null; |
77 private volatile boolean notifications = true; | 76 private volatile boolean notifications = true; |
78 | 77 |
79 // Related to Accessibility Features | 78 // Related to Accessibility Features |
80 private boolean mAccessibilityInitialized = false; | 79 private boolean mAccessibilityInitialized = false; |
240 } | 239 } |
241 } | 240 } |
242 } | 241 } |
243 | 242 |
244 public void notifyUser(String message) { | 243 public void notifyUser(String message) { |
245 if (!notifications) | 244 if (!notifications) return; |
246 return; | 245 // Don't keep telling the user the same thing. |
247 | 246 if (lastNotification != null && lastNotification.equals(message)) return; |
248 if (notification != null) { | 247 Toast notification = Toast.makeText(context, message, Toast.LENGTH_SHORT); |
249 // Don't keep telling the user the same thing. | 248 notification.show(); |
250 if (lastNotification != null && lastNotification.equals(message)) | |
251 return; | |
252 | |
253 notification.setText(message); | |
254 notification.show(); | |
255 } | |
256 else { | |
257 notification = Toast.makeText(context, message, Toast.LENGTH_SHORT); | |
258 notification.show(); | |
259 } | |
260 | |
261 lastNotification = message; | 249 lastNotification = message; |
262 } | 250 } |
263 | 251 |
264 /** | 252 /** |
265 * Ask the {@link TerminalBridge} we're connected to to resize to a specific size. | 253 * Ask the {@link TerminalBridge} we're connected to to resize to a specific size. |