summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-22 18:46:03 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-22 18:46:03 +0100
commitc9b0fe71721b78fa1c3c6163cca52329f950ed9a (patch)
tree5808799b9dc90f00facdcd42708bab571928de64
parentMerge "recovery: add a way to enable metadata_csum for ext4" am: 5ac6163822 (diff)
parentMerge "Recovery UI meet issue if image size is too large" (diff)
downloadandroid_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar.gz
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar.bz2
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar.lz
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar.xz
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.tar.zst
android_bootable_recovery-c9b0fe71721b78fa1c3c6163cca52329f950ed9a.zip
-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) {