diff options
author | Tao Bao <tbao@google.com> | 2017-09-12 00:13:40 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-09-12 00:13:40 +0200 |
commit | 3644617e3d297a29d6cb4c3d56953206533f6fbc (patch) | |
tree | 20e787156857b7723e3f76cec6d43b479934c217 /ui.cpp | |
parent | Merge "ui: Remove text_top_." am: 568644197f am: d96ce15139 (diff) | |
parent | Merge "ui: Move locale and friends into ScreenRecoveryUI class." am: fc570c317b (diff) | |
download | android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar.gz android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar.bz2 android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar.lz android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar.xz android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.tar.zst android_bootable_recovery-3644617e3d297a29d6cb4c3d56953206533f6fbc.zip |
Diffstat (limited to '')
-rw-r--r-- | ui.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
@@ -50,9 +50,7 @@ static constexpr const char* BRIGHTNESS_FILE = "/sys/class/leds/lcd-backlight/br static constexpr const char* MAX_BRIGHTNESS_FILE = "/sys/class/leds/lcd-backlight/max_brightness"; RecoveryUI::RecoveryUI() - : locale_(""), - rtl_locale_(false), - brightness_normal_(50), + : brightness_normal_(50), brightness_dimmed_(25), touch_screen_allowed_(false), kTouchLowThreshold(RECOVERY_UI_TOUCH_LOW_THRESHOLD), @@ -132,10 +130,7 @@ bool RecoveryUI::InitScreensaver() { return true; } -bool RecoveryUI::Init(const std::string& locale) { - // Set up the locale info. - SetLocale(locale); - +bool RecoveryUI::Init(const std::string& /* locale */) { ev_init(std::bind(&RecoveryUI::OnInputEvent, this, std::placeholders::_1, std::placeholders::_2), touch_screen_allowed_); @@ -574,23 +569,3 @@ void RecoveryUI::SetEnableReboot(bool enabled) { enable_reboot = enabled; pthread_mutex_unlock(&key_queue_mutex); } - -void RecoveryUI::SetLocale(const std::string& new_locale) { - this->locale_ = new_locale; - this->rtl_locale_ = false; - - if (!new_locale.empty()) { - size_t underscore = new_locale.find('_'); - // lang has the language prefix prior to '_', or full string if '_' doesn't exist. - std::string lang = new_locale.substr(0, underscore); - - // A bit cheesy: keep an explicit list of supported RTL languages. - if (lang == "ar" || // Arabic - lang == "fa" || // Persian (Farsi) - lang == "he" || // Hebrew (new language code) - lang == "iw" || // Hebrew (old language code) - lang == "ur") { // Urdu - rtl_locale_ = true; - } - } -} |