fix another autobug - don't crash if firmware update can't start

1.2-legacy
Kevin Hester 2021-02-14 16:11:55 +08:00
rodzic 50dc26b36d
commit 6eaec63df9
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -44,6 +44,7 @@ import com.geeksville.mesh.service.SoftwareUpdateService.Companion.ProgressNotSt
import com.geeksville.mesh.service.SoftwareUpdateService.Companion.ProgressSuccess
import com.geeksville.util.anonymize
import com.geeksville.util.exceptionReporter
import com.geeksville.util.exceptionToSnackbar
import com.google.android.gms.location.LocationRequest
import com.google.android.gms.location.LocationServices
import com.google.android.gms.location.LocationSettingsRequest
@ -504,8 +505,10 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
binding.updateProgressBar.visibility = View.VISIBLE
binding.updateProgressBar.progress = 0 // start from scratch
// We rely on our broadcast receiver to show progress as this progresses
service.startFirmwareUpdate()
exceptionToSnackbar(requireView()) {
// We rely on our broadcast receiver to show progress as this progresses
service.startFirmwareUpdate()
}
}
}