aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Astone <ales.astone@gmail.com>2020-03-29 16:03:15 +0200
committerAlessandro Astone <ales.astone@gmail.com>2020-03-30 13:31:09 +0200
commit43371a25e0b4ea9d2ea2f1b6681cb47c5fd3db18 (patch)
treec75c8a33796bcac81d8fa184f781d5ec6b22c5f0
parent645801f0494a15d5be866c35fef4e6532c1eb1b1 (diff)
downloadandroid_bootable_recovery-43371a25e0b4ea9d2ea2f1b6681cb47c5fd3db18.tar.gz
android_bootable_recovery-43371a25e0b4ea9d2ea2f1b6681cb47c5fd3db18.tar.bz2
android_bootable_recovery-43371a25e0b4ea9d2ea2f1b6681cb47c5fd3db18.zip
recovery: discard touches below last menu item
Change-Id: I0d6bd6587b72c5aee6c1108d5ee67a0c7e86bc07
-rw-r--r--recovery_ui/screen_ui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/recovery_ui/screen_ui.cpp b/recovery_ui/screen_ui.cpp
index 70f2ef3d..c3273db1 100644
--- a/recovery_ui/screen_ui.cpp
+++ b/recovery_ui/screen_ui.cpp
@@ -1336,7 +1336,8 @@ int ScreenRecoveryUI::SelectMenu(const Point& point) {
}
}
- if (point.y() >= menu_start_y_) {
+ if (point.y() >= menu_start_y_ &&
+ point.y() < menu_start_y_ + menu_->ItemsCount() * MenuItemHeight()) {
int old_sel = menu_->selection();
int relative_sel = (point.y() - menu_start_y_) / MenuItemHeight();
new_sel = menu_->SelectVisible(relative_sel);