diff --git a/src/MessageActivity.scala b/src/MessageActivity.scala index fe1e119..da7d7e0 100644 --- a/src/MessageActivity.scala +++ b/src/MessageActivity.scala @@ -164,8 +164,6 @@ class MessageActivity extends StationHelper(R.string.app_messages) view.getId match { case R.id.msgsend => sendMessage() - true - case _ => false } } diff --git a/src/ServiceNotifier.scala b/src/ServiceNotifier.scala index 9beed6c..1dbd233 100644 --- a/src/ServiceNotifier.scala +++ b/src/ServiceNotifier.scala @@ -9,7 +9,7 @@ import _root_.android.graphics.Color object ServiceNotifier { - val instance = if (Build.VERSION.SDK.toInt < 5) new DonutNotifier() else new EclairNotifier() + val instance = if (Build.VERSION.SDK_INT < 5) new DonutNotifier() else new EclairNotifier() } abstract class ServiceNotifier { diff --git a/src/backend/BluetoothTnc.scala b/src/backend/BluetoothTnc.scala index 93ff658..ed87674 100644 --- a/src/backend/BluetoothTnc.scala +++ b/src/backend/BluetoothTnc.scala @@ -121,7 +121,7 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBack log("Reconnecting in 3s...") try { Thread.sleep(3*1000) - } catch { case _ => } + } catch { case _ : InterruptedException => } init_socket() need_reconnect = false service.postLinkOn(R.string.p_link_bt) @@ -143,7 +143,7 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBack service.postAddPost(StorageDatabase.Post.TYPE_INFO, R.string.post_error, e.toString()) e.printStackTrace() - } catch { case _ => Log.d(TAG, "Yo dawg! I got an exception while getting an exception!") + } catch { case _ : Exception => Log.d(TAG, "Yo dawg! I got an exception while getting an exception!") } } } @@ -154,7 +154,7 @@ class BluetoothTnc(service : AprsService, prefs : PrefsWrapper) extends AprsBack try { proto.writePacket(packet) "Bluetooth OK" - } catch { case e => e.printStackTrace(); conn.socket.close(); "Bluetooth disconnected" } + } catch { case e : Exception => e.printStackTrace(); conn.socket.close(); "Bluetooth disconnected" } } def catchLog(tag : String, fun : ()=>Unit) { diff --git a/src/tncproto/KissProto.scala b/src/tncproto/KissProto.scala index ccd8611..7cc4df9 100644 --- a/src/tncproto/KissProto.scala +++ b/src/tncproto/KissProto.scala @@ -50,7 +50,7 @@ class KissProto(service : AprsService, is : InputStream, os : OutputStream) exte try { return Parser.parseAX25(buf.toArray).toString().trim() } catch { - case e => buf.clear() + case e : Exception => buf.clear() } } case FESC => is.read() match {