mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Call all lifecycle methods on snapshot mapView
This commit is contained in:
@@ -77,6 +77,7 @@ public class SignalMapView extends LinearLayout {
|
||||
public static ListenableFuture<Bitmap> snapshot(final LatLng place, @NonNull final MapView mapView) {
|
||||
final SettableFuture<Bitmap> future = new SettableFuture<>();
|
||||
mapView.onCreate(null);
|
||||
mapView.onStart();
|
||||
mapView.onResume();
|
||||
|
||||
mapView.setVisibility(View.VISIBLE);
|
||||
@@ -91,6 +92,7 @@ public class SignalMapView extends LinearLayout {
|
||||
future.set(bitmap);
|
||||
mapView.setVisibility(View.GONE);
|
||||
mapView.onPause();
|
||||
mapView.onStop();
|
||||
mapView.onDestroy();
|
||||
}));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user