mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-02-04 12:52:22 -05: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:
@@ -810,11 +810,15 @@ class SettingsFragment : ScreenFragment("Settings"), Logging {
|
||||
// exception.startResolutionForResult(this@MainActivity, REQUEST_CHECK_SETTINGS)
|
||||
|
||||
// For now just punt and show a dialog
|
||||
Toast.makeText(
|
||||
requireContext(),
|
||||
getString(R.string.location_disabled_warning),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
|
||||
// The context might be gone (if activity is going away) by the time this handler is called
|
||||
context?.let { c ->
|
||||
Toast.makeText(
|
||||
c,
|
||||
getString(R.string.location_disabled_warning),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
|
||||
//} else
|
||||
// Exceptions.report(exception)
|
||||
|
||||
Reference in New Issue
Block a user