mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix autobug - location callback might come after activty is dead
https://console.firebase.google.com/u/0/project/meshutil/crashlytics/app/android:com.geeksville.mesh/issues/714e0b9e232289ddc9162fd3aebc1510?time=last-seven-days&sessionId=5F1C562E03E2000142C73D26354B80BF_DNE_0_v2
This commit is contained in:
parent
3bcbff2f0f
commit
384bb3759e
1 changed files with 9 additions and 5 deletions
|
|
@ -810,11 +810,15 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
||||||
// exception.startResolutionForResult(this@MainActivity, REQUEST_CHECK_SETTINGS)
|
// exception.startResolutionForResult(this@MainActivity, REQUEST_CHECK_SETTINGS)
|
||||||
|
|
||||||
// For now just punt and show a dialog
|
// For now just punt and show a dialog
|
||||||
Toast.makeText(
|
|
||||||
requireContext(),
|
// The context might be gone (if activity is going away) by the time this handler is called
|
||||||
getString(R.string.location_disabled_warning),
|
context?.let { c ->
|
||||||
Toast.LENGTH_SHORT
|
Toast.makeText(
|
||||||
).show()
|
c,
|
||||||
|
getString(R.string.location_disabled_warning),
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
|
|
||||||
//} else
|
//} else
|
||||||
// Exceptions.report(exception)
|
// Exceptions.report(exception)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue