kopia lustrzana https://github.com/ge0rg/aprsdroid
Scala: fix some warnings
rodzic
aafb3ec855
commit
9bc3ccf925
|
@ -164,8 +164,6 @@ class MessageActivity extends StationHelper(R.string.app_messages)
|
|||
view.getId match {
|
||||
case R.id.msgsend =>
|
||||
sendMessage()
|
||||
true
|
||||
case _ => false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Ładowanie…
Reference in New Issue