summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-03-18 00:33:14 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-18 00:33:14 +0100
commita68c517c628acdcfd0107536f34c3fd882ce0629 (patch)
treebf08d4b39df094d50b0b671297b2fb807f5f40f8 /screen_ui.cpp
parentminzip: 64 bit build issue (diff)
parentresolved conflicts for merge of d90da130 to klp-modular-dev-plus-aosp (diff)
downloadandroid_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar.gz
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar.bz2
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar.lz
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar.xz
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.tar.zst
android_bootable_recovery-a68c517c628acdcfd0107536f34c3fd882ce0629.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index c87c00ce5..af58643dc 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -52,6 +52,7 @@ static double now() {
ScreenRecoveryUI::ScreenRecoveryUI() :
currentIcon(NONE),
installingFrame(0),
+ locale(NULL),
rtl_locale(false),
progressBarType(EMPTY),
progressScopeStart(0),
@@ -322,21 +323,21 @@ void ScreenRecoveryUI::progress_loop() {
}
void ScreenRecoveryUI::LoadBitmap(const char* filename, gr_surface* surface) {
- int result = res_create_surface(filename, surface);
+ int result = res_create_display_surface(filename, surface);
if (result < 0) {
LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
}
}
void ScreenRecoveryUI::LoadBitmapArray(const char* filename, int* frames, gr_surface** surface) {
- int result = res_create_multi_surface(filename, frames, surface);
+ int result = res_create_multi_display_surface(filename, frames, surface);
if (result < 0) {
LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
}
}
void ScreenRecoveryUI::LoadLocalizedBitmap(const char* filename, gr_surface* surface) {
- int result = res_create_localized_surface(filename, surface);
+ int result = res_create_localized_alpha_surface(filename, locale, surface);
if (result < 0) {
LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
}
@@ -378,8 +379,9 @@ void ScreenRecoveryUI::Init()
RecoveryUI::Init();
}
-void ScreenRecoveryUI::SetLocale(const char* locale) {
- if (locale) {
+void ScreenRecoveryUI::SetLocale(const char* new_locale) {
+ if (new_locale) {
+ this->locale = new_locale;
char* lang = strdup(locale);
for (char* p = lang; *p; ++p) {
if (*p == '_') {
@@ -398,6 +400,8 @@ void ScreenRecoveryUI::SetLocale(const char* locale) {
rtl_locale = true;
}
free(lang);
+ } else {
+ new_locale = NULL;
}
}