From 76a8903f01ebc8048108fff0ca1b7120b5c809b0 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 22 Dec 2017 10:09:02 -0800 Subject: [PATCH] Ensure language and country codes are not empty (flutter/engine#4492) --- engine/src/flutter/runtime/runtime_controller.h | 4 ++-- engine/src/flutter/shell/common/engine.cc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/runtime/runtime_controller.h b/engine/src/flutter/runtime/runtime_controller.h index d70bb177c8..c337c724b8 100644 --- a/engine/src/flutter/runtime/runtime_controller.h +++ b/engine/src/flutter/runtime/runtime_controller.h @@ -66,8 +66,8 @@ class RuntimeController : public WindowClient, public IsolateClient { void DidShutdownMainIsolate() override; RuntimeDelegate* client_; - std::string language_code_; - std::string country_code_; + std::string language_code_ = "en"; + std::string country_code_ = "US"; std::string user_settings_data_ = "{}"; bool semantics_enabled_ = false; std::unique_ptr dart_controller_; diff --git a/engine/src/flutter/shell/common/engine.cc b/engine/src/flutter/shell/common/engine.cc index 9f63afdf0e..f779143df4 100644 --- a/engine/src/flutter/shell/common/engine.cc +++ b/engine/src/flutter/shell/common/engine.cc @@ -118,6 +118,8 @@ Engine::Engine(PlatformView* platform_view) platform_view->GetVsyncWaiter(), this)), load_script_error_(tonic::kNoError), + language_code_("en"), + country_code_("US"), user_settings_data_("{}"), activity_running_(false), have_surface_(false),