summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-12-18 23:32:36 +0100
committerandroid-build-merger <android-build-merger@google.com>2015-12-18 23:32:36 +0100
commit2538b952b8d71178b4fb7151730525ca5b2aa668 (patch)
tree1677a4e8ff40de32760dc5b098752c6d82404f00 /screen_ui.cpp
parentMerge "updater: Use O_SYNC and fsync() for package_extract_file()." am: 4e72d1a81e (diff)
parentMerge "res: Embed FPS into icon_installing.png." (diff)
downloadandroid_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar.gz
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar.bz2
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar.lz
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar.xz
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.tar.zst
android_bootable_recovery-2538b952b8d71178b4fb7151730525ca5b2aa668.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 23fc90154..522aa6b23 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -73,7 +73,7 @@ ScreenRecoveryUI::ScreenRecoveryUI() :
menu_items(0),
menu_sel(0),
file_viewer_text_(nullptr),
- animation_fps(20),
+ animation_fps(-1),
installing_frames(-1),
stage(-1),
max_stage(-1) {
@@ -367,8 +367,9 @@ void ScreenRecoveryUI::LoadBitmap(const char* filename, GRSurface** surface) {
}
}
-void ScreenRecoveryUI::LoadBitmapArray(const char* filename, int* frames, GRSurface*** surface) {
- int result = res_create_multi_display_surface(filename, frames, surface);
+void ScreenRecoveryUI::LoadBitmapArray(const char* filename, int* frames, int* fps,
+ GRSurface*** surface) {
+ int result = res_create_multi_display_surface(filename, frames, fps, surface);
if (result < 0) {
LOGE("missing bitmap %s\n(Code %d)\n", filename, result);
}
@@ -405,7 +406,7 @@ void ScreenRecoveryUI::Init() {
text_top_ = 1;
backgroundIcon[NONE] = nullptr;
- LoadBitmapArray("icon_installing", &installing_frames, &installation);
+ LoadBitmapArray("icon_installing", &installing_frames, &animation_fps, &installation);
backgroundIcon[INSTALLING_UPDATE] = installing_frames ? installation[0] : nullptr;
backgroundIcon[ERASING] = backgroundIcon[INSTALLING_UPDATE];
LoadBitmap("icon_error", &backgroundIcon[ERROR]);