Bluetooth: improve error message. Fix #150

mediatek_nojit
Georg Lukas 2017-05-10 13:30:31 +02:00
rodzic 09c49acaee
commit 5f846e5dd5
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -361,6 +361,7 @@
<string name="bt_error_unsupported">Bluetooth is not supported!</string>
<string name="bt_error_disabled">Please enable Bluetooth!</string>
<string name="bt_error_no_tnc">Please configure a Bluetooth TNC!</string>
<string name="bt_error_connect">Could not connect to %s! Please turn on the device and close other Bluetooth connections.</string>
<string name="afsk_info_sco_req">Requesting bluetooth SCO link...</string>
<string name="afsk_info_sco_est">Bluetooth SCO link established.</string>

Wyświetl plik

@ -107,7 +107,12 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBack
init_socket()
service.postPosterStarted()
} catch {
case e : Exception => e.printStackTrace(); service.postAbort(e.toString()); running = false;
case e : Exception => {
e.printStackTrace();
service.postAbort(service.getString(R.string.bt_error_connect,
tnc.getName()));
running = false;
}
}
while (running) {
try {