fix warnings

This commit is contained in:
geeksville 2020-05-29 13:58:38 -07:00
parent 85033d5d83
commit 05776c2593
5 changed files with 5 additions and 6 deletions

View file

@ -4,6 +4,7 @@ import android.graphics.Bitmap
import android.net.Uri
import android.util.Base64
import com.geeksville.mesh.MeshProtos
import com.geeksville.mesh.R
import com.google.zxing.BarcodeFormat
import com.google.zxing.MultiFormatWriter
import com.journeyapps.barcodescanner.BarcodeEncoder
@ -16,7 +17,7 @@ data class Channel(
companion object {
// Placeholder when emulating
val emulated = Channel(
MeshProtos.ChannelSettings.newBuilder().setName("Default")
MeshProtos.ChannelSettings.newBuilder().setName(context.getString(R.string.default))
.setModemConfig(MeshProtos.ChannelSettings.ModemConfig.Bw125Cr45Sf128).build()
)

View file

@ -1098,8 +1098,6 @@ class MeshService : Service(), Logging {
* Convert a protobuf NodeInfo into our model objects and update our node DB
*/
private fun installNodeInfo(info: MeshProtos.NodeInfo) {
val mi = myNodeInfo!! // It better be set by now
// Just replace/add any entry
updateNodeInfo(info.num) {
if (info.hasUser())

View file

@ -78,8 +78,7 @@ class MapFragment : ScreenFragment("Map"), Logging {
)
)
node.user?.let {
if (it.longName != null)
f.addStringProperty("name", it.longName)
f.addStringProperty("name", it.longName)
}
f
}

View file

@ -535,7 +535,7 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
.setSingleDevice(false)
.build()
val mainActivity = requireActivity() as MainActivity
//val mainActivity = requireActivity() as MainActivity
// When the app tries to pair with the Bluetooth device, show the
// appropriate pairing request dialog to the user.

View file

@ -59,4 +59,5 @@
<string name="not_connected">Not connected, select radio below</string>
<string name="connected_sleeping">Connected to radio, but it is sleeping</string>
<string name="update_to">Update to %s</string>
<string name="default">Default</string>
</resources>