diff --git a/engine/src/flutter/shell/platform/android/platform_view_android.cc b/engine/src/flutter/shell/platform/android/platform_view_android.cc index 7248a60d0e..39e91658e5 100644 --- a/engine/src/flutter/shell/platform/android/platform_view_android.cc +++ b/engine/src/flutter/shell/platform/android/platform_view_android.cc @@ -41,6 +41,9 @@ namespace flutter { namespace { + +static constexpr int kMinAPILevelHCPP = 34; + AndroidContext::ContextSettings CreateContextSettings( const Settings& p_settings) { AndroidContext::ContextSettings settings; @@ -138,9 +141,11 @@ PlatformViewAndroid::PlatformViewAndroid( android_use_new_platform_view_ = android_context->RenderingApi() == AndroidRenderingAPI::kImpellerVulkan && + (android_get_device_api_level() >= kMinAPILevelHCPP) && delegate.OnPlatformViewGetSettings().enable_surface_control; FML_CHECK(android_surface_ && android_surface_->IsValid()) - << "Could not create an OpenGL, Vulkan or Software surface to set up " + << "Could not create an OpenGL, Vulkan or Software surface to set " + "up " "rendering."; } }