[Android] Add missing API level check for hcpp (#162901)
Requires API 34
This commit is contained in:
parent
6e631c5a46
commit
ec7cdbd126
@ -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.";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user