summaryrefslogtreecommitdiffstats
path: root/recovery_ui/screen_ui.cpp
diff options
context:
space:
mode:
authorzhang sanshan <pete.zhang@nxp.com>2019-08-07 10:21:10 +0200
committerfang hui <hui.fang@nxp.com>2020-02-21 17:20:47 +0100
commit0d81b89472133b798f33d74a745abdbaef3b3d7d (patch)
treedb527a28f7136e3047a5c112ba1fe9f1bb747b45 /recovery_ui/screen_ui.cpp
parentMerge "recovery: add a way to enable metadata_csum for ext4" (diff)
downloadandroid_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar.gz
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar.bz2
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar.lz
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar.xz
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.tar.zst
android_bootable_recovery-0d81b89472133b798f33d74a745abdbaef3b3d7d.zip
Diffstat (limited to '')
-rw-r--r--recovery_ui/screen_ui.cpp4
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) {