diff options
author | Elliott Hughes <enh@google.com> | 2020-02-22 18:39:19 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-02-22 18:39:19 +0100 |
commit | f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb (patch) | |
tree | db527a28f7136e3047a5c112ba1fe9f1bb747b45 | |
parent | Merge "recovery: add a way to enable metadata_csum for ext4" (diff) | |
parent | Recovery UI meet issue if image size is too large (diff) | |
download | android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar.gz android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar.bz2 android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar.lz android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar.xz android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.tar.zst android_bootable_recovery-f5b94d6e9b0f9a5f3924dacbe0bfca038a8a32fb.zip |
Diffstat (limited to '')
-rw-r--r-- | recovery_ui/screen_ui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp index 087fc0e84..6dcb161fa 100644 --- a/recovery_ui/screen_ui.cpp +++ b/recovery_ui/screen_ui.cpp @@ -448,7 +448,9 @@ void ScreenRecoveryUI::draw_foreground_locked() { int frame_height = gr_get_height(frame); int frame_x = (ScreenWidth() - frame_width) / 2; int frame_y = GetAnimationBaseline(); - DrawSurface(frame, 0, 0, frame_width, frame_height, frame_x, frame_y); + if (frame_x >= 0 && frame_y >= 0 && (frame_x + frame_width) < ScreenWidth() && + (frame_y + frame_height) < ScreenHeight()) + DrawSurface(frame, 0, 0, frame_width, frame_height, frame_x, frame_y); } if (progressBarType != EMPTY) { |