summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2018-01-05 13:47:13 +0100
committerTobrun <tobrun@mapbox.com>2018-01-10 13:14:04 +0100
commit0b0f481e7079784e4877e3a279db346031d1bd08 (patch)
tree8b5849f81a51abfbb4764f558420dfbf9c2b78b1 /platform/android
parentc66c8e3de19fde03df9dbea36a2a2ced9bc69f35 (diff)
downloadqtlocation-mapboxgl-0b0f481e7079784e4877e3a279db346031d1bd08.tar.gz
[android] - detect genymotion virtual machines when determening attributes for eglConfig
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/egl/EGLConfigChooser.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/egl/EGLConfigChooser.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/egl/EGLConfigChooser.java
index b6f467708f..247ffea906 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/egl/EGLConfigChooser.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/egl/EGLConfigChooser.java
@@ -1,6 +1,7 @@
package com.mapbox.mapboxsdk.maps.renderer.egl;
import android.opengl.GLSurfaceView;
+import android.os.Build;
import android.support.annotation.NonNull;
import java.util.ArrayList;
@@ -261,9 +262,8 @@ public class EGLConfigChooser implements GLSurfaceView.EGLConfigChooser {
return attributevalue[0];
}
-
private int[] getConfigAttributes() {
- boolean emulator = inEmulator();
+ boolean emulator = inEmulator() || inGenymotion();
Timber.i("In emulator: %s", emulator);
// Get all configs at least RGB 565 with 16 depth and 8 stencil
@@ -290,4 +290,12 @@ public class EGLConfigChooser implements GLSurfaceView.EGLConfigChooser {
private boolean inEmulator() {
return System.getProperty("ro.kernel.qemu") != null;
}
+
+ /**
+ * Detect if we are in genymotion
+ */
+ private boolean inGenymotion() {
+ return Build.MANUFACTURER.contains("Genymotion");
+ }
+
}