summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-08-22 20:40:35 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-08-22 20:40:35 +0200
commit0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9 (patch)
treef0fe99344f303243141b7cea9428421b2477b63e /screen_ui.cpp
parentMerge "Move Image/ImageChunk/PatchChunk declaration into header files" am: b4bc57ed39 am: b127fddf09 (diff)
parentMerge changes I5d7a6baa,Id0fb2d4e am: 89ad02206a (diff)
downloadandroid_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar.gz
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar.bz2
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar.lz
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar.xz
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.tar.zst
android_bootable_recovery-0d0b6a0d2ad2cfffcdb1084de733c22c5b8f97a9.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index a02550199..5c93b6672 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -53,6 +53,7 @@ static double now() {
ScreenRecoveryUI::ScreenRecoveryUI()
: kMarginWidth(RECOVERY_UI_MARGIN_WIDTH),
kMarginHeight(RECOVERY_UI_MARGIN_HEIGHT),
+ kAnimationFps(RECOVERY_UI_ANIMATION_FPS),
density_(static_cast<float>(android::base::GetIntProperty("ro.sf.lcd_density", 160)) / 160.f),
currentIcon(NONE),
progressBarType(EMPTY),
@@ -77,7 +78,6 @@ ScreenRecoveryUI::ScreenRecoveryUI()
loop_frames(0),
current_frame(0),
intro_done(false),
- animation_fps(30), // TODO: there's currently no way to infer this.
stage(-1),
max_stage(-1),
updateMutex(PTHREAD_MUTEX_INITIALIZER) {}
@@ -404,7 +404,7 @@ void* ScreenRecoveryUI::ProgressThreadStartRoutine(void* data) {
}
void ScreenRecoveryUI::ProgressThreadLoop() {
- double interval = 1.0 / animation_fps;
+ double interval = 1.0 / kAnimationFps;
while (true) {
double start = now();
pthread_mutex_lock(&updateMutex);