[android] - add paused state to map renderer, don't render snapshot when paused (#11358)

This commit is contained in:
Tobrun
2018-04-10 11:10:14 +02:00
parent f55a324917
commit 88d21e17dc
5 changed files with 33 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ import com.mapbox.mapboxsdk.testapp.R;
import java.util.Locale;
import timber.log.Timber;
/**
* Test activity showcasing the Snapshot API to create and display a bitmap of the current shown Map.
*/
@@ -79,6 +81,12 @@ public class SnapshotActivity extends AppCompatActivity implements OnMapReadyCal
@Override
protected void onPause() {
super.onPause();
mapboxMap.snapshot(new MapboxMap.SnapshotReadyCallback() {
@Override
public void onSnapshotReady(Bitmap snapshot) {
Timber.e("Regression test for https://github.com/mapbox/mapbox-gl-native/pull/11358");
}
});
mapView.onPause();
}