mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01: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) {
|
public static ListenableFuture<Bitmap> snapshot(final LatLng place, @NonNull final MapView mapView) {
|
||||||
final SettableFuture<Bitmap> future = new SettableFuture<>();
|
final SettableFuture<Bitmap> future = new SettableFuture<>();
|
||||||
mapView.onCreate(null);
|
mapView.onCreate(null);
|
||||||
|
mapView.onStart();
|
||||||
mapView.onResume();
|
mapView.onResume();
|
||||||
|
|
||||||
mapView.setVisibility(View.VISIBLE);
|
mapView.setVisibility(View.VISIBLE);
|
||||||
@@ -91,6 +92,7 @@ public class SignalMapView extends LinearLayout {
|
|||||||
future.set(bitmap);
|
future.set(bitmap);
|
||||||
mapView.setVisibility(View.GONE);
|
mapView.setVisibility(View.GONE);
|
||||||
mapView.onPause();
|
mapView.onPause();
|
||||||
|
mapView.onStop();
|
||||||
mapView.onDestroy();
|
mapView.onDestroy();
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user