diff options
author | Peng Liu <peng.liu@mapbox.com> | 2019-09-12 18:17:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 18:17:45 +0300 |
commit | 69bc5244eaaecb708e8a492f7017a451245d92bb (patch) | |
tree | eb2fa3497f03ae332272786d16133c49756f238f /platform/android/src/map/camera_position.cpp | |
parent | 1b35d39cc1ea5b89545f79f5d917fab5c35fa493 (diff) | |
download | qtlocation-mapboxgl-69bc5244eaaecb708e8a492f7017a451245d92bb.tar.gz |
[android] Fix MapSnapshotter regression and add activity sanity tests (#15580)
* [android] Include more generated sanity tests for Android test app.
* [android] Add null check for camera position padding.
* [android] Skip map load tests if no mapView is found, include more generated sanity tests for Android test app.
* [android] Set mapboxMap to null during the mapView destroy process, fix failed sanity tests.
* [android] Add file source related activities to the sanity test exclude list.
* [android] Fixes according to @tobrun's review.
* [android] Add more activities to exclude list, keep MapSnapshotterActivity for regression test.
Diffstat (limited to 'platform/android/src/map/camera_position.cpp')
-rw-r--r-- | platform/android/src/map/camera_position.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/android/src/map/camera_position.cpp b/platform/android/src/map/camera_position.cpp index 03aca79bda..cbf5f2e408 100644 --- a/platform/android/src/map/camera_position.cpp +++ b/platform/android/src/map/camera_position.cpp @@ -50,8 +50,8 @@ mbgl::CameraOptions CameraPosition::getCameraOptions(jni::JNIEnv& env, const jni return mbgl::CameraOptions { center, - EdgeInsets {padding.Get(env, 1) * pixelRatio, padding.Get(env, 0) * pixelRatio, - padding.Get(env, 3) * pixelRatio, padding.Get(env, 2) * pixelRatio}, + padding ? EdgeInsets {padding.Get(env, 1) * pixelRatio, padding.Get(env, 0) * pixelRatio, + padding.Get(env, 3) * pixelRatio, padding.Get(env, 2) * pixelRatio} : (EdgeInsets) {}, {}, position.Get(env, zoom), position.Get(env, bearing), |