summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2012-09-04 23:28:25 +0200
committerDoug Zongker <dougz@google.com>2012-09-04 23:28:25 +0200
commit52eeea4fa59c15ecb09c32b8e05653f4e55f5188 (patch)
treed26dc6dc861c69c8f80ae9aac9a13b14bee3381b /screen_ui.cpp
parentfix format of installing_text (diff)
downloadandroid_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar.gz
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar.bz2
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar.lz
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar.xz
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.tar.zst
android_bootable_recovery-52eeea4fa59c15ecb09c32b8e05653f4e55f5188.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 1f2471ade..0b3437547 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -78,7 +78,9 @@ ScreenRecoveryUI::ScreenRecoveryUI() :
indeterminate_frames(16),
installing_frames(48),
install_overlay_offset_x(65),
- install_overlay_offset_y(106) {
+ install_overlay_offset_y(106),
+ overlay_offset_x(-1),
+ overlay_offset_y(-1) {
pthread_mutex_init(&updateMutex, NULL);
self = this;
}
@@ -89,7 +91,7 @@ ScreenRecoveryUI::ScreenRecoveryUI() :
// animation. Does nothing if no overlay animation is defined.
// Should only be called with updateMutex locked.
void ScreenRecoveryUI::draw_install_overlay_locked(int frame) {
- if (installationOverlay == NULL) return;
+ if (installationOverlay == NULL || overlay_offset_x < 0) return;
gr_surface surface = installationOverlay[frame];
int iconWidth = gr_get_width(surface);
int iconHeight = gr_get_height(surface);
@@ -361,8 +363,6 @@ void ScreenRecoveryUI::Init()
void ScreenRecoveryUI::SetBackground(Icon icon)
{
pthread_mutex_lock(&updateMutex);
- currentIcon = icon;
- update_screen_locked();
// Adjust the offset to account for the positioning of the
// base image on the screen.
@@ -374,6 +374,9 @@ void ScreenRecoveryUI::SetBackground(Icon icon)
(gr_fb_height() - (gr_get_height(bg) + gr_get_height(text) + 40)) / 2;
}
+ currentIcon = icon;
+ update_screen_locked();
+
pthread_mutex_unlock(&updateMutex);
}