From 5b00110e3d6c4af97cd7699a5c61fab2f973107e Mon Sep 17 00:00:00 2001 From: Alain Vongsouvanh Date: Tue, 7 Jun 2016 10:05:29 -0700 Subject: recovery: Make wear recovery more customizable. Making animation_fps protected and adding support for 0 frames intro. BUG: 29085786 Change-Id: I07b44570022bad89661973178d453592c01f3f10 --- wear_ui.cpp | 2 +- wear_ui.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wear_ui.cpp b/wear_ui.cpp index 55b7afc8f..ebe0dfe37 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -288,7 +288,7 @@ void WearRecoveryUI::progress_loop() { if ((currentIcon == INSTALLING_UPDATE || currentIcon == ERASING) && !show_text) { if (!intro_done) { - if (current_frame == intro_frames - 1) { + if (current_frame >= intro_frames - 1) { intro_done = true; current_frame = 0; } else { diff --git a/wear_ui.h b/wear_ui.h index 839a26438..259a63ee7 100644 --- a/wear_ui.h +++ b/wear_ui.h @@ -79,6 +79,9 @@ class WearRecoveryUI : public RecoveryUI { int intro_frames; int loop_frames; + // animation's fps (default: 30) + int animation_fps; + private: Icon currentIcon; @@ -86,8 +89,6 @@ class WearRecoveryUI : public RecoveryUI { int current_frame; - int animation_fps; - bool rtl_locale; pthread_mutex_t updateMutex; -- cgit v1.2.3