[android] don’t crash on map changed callback when OnMapChangedListener throws a runtime exception
This commit is contained in:
committed by
Ivo van Dongen
parent
a0da2fb5d1
commit
e3cc5ddfdd
@@ -945,7 +945,11 @@ final class NativeMapView {
|
||||
protected void onMapChanged(int rawChange) {
|
||||
if (onMapChangedListeners != null) {
|
||||
for (MapView.OnMapChangedListener onMapChangedListener : onMapChangedListeners) {
|
||||
onMapChangedListener.onMapChanged(rawChange);
|
||||
try {
|
||||
onMapChangedListener.onMapChanged(rawChange);
|
||||
} catch (RuntimeException err) {
|
||||
Timber.e("Exception (%s) in MapView.OnMapChangedListener: %s", err.getClass(), err.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user