From c40f64b1f3210fa70c2c66045f6aa03622217d05 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Mon, 6 May 2019 13:12:57 +0300 Subject: [PATCH] [vulkan] Vulkan is available since Android 8.0 --- android/jni/com/mapswithme/maps/Framework.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index 5a773d66a6..5402eeaeb9 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -175,7 +175,12 @@ bool Framework::DestroySurfaceOnDetach() bool Framework::CreateDrapeEngine(JNIEnv * env, jobject jSurface, int densityDpi, bool firstLaunch, bool launchByDeepLink, int appVersionCode) { - auto const vulkanForbidden = dp::SupportManager::Instance().IsVulkanForbidden(); + // Vulkan is supported only since Android 8.0, because some Android devices with Android 7.x + // have fatal driver issue, which can lead to process termination and whole OS destabilization. + int constexpr kMinSdkVersionForVulkan = 26; + int const sdkVersion = GetAndroidSdkVersion(); + auto const vulkanForbidden = sdkVersion < kMinSdkVersionForVulkan || + dp::SupportManager::Instance().IsVulkanForbidden(); if (vulkanForbidden) LOG(LWARNING, ("Vulkan API is forbidden on this device."));