From c0441d171914e59941ec4f815ae0aabf56d6504f Mon Sep 17 00:00:00 2001 From: Doug Zongker Date: Wed, 31 Jul 2013 11:28:24 -0700 Subject: notify about pending long press Recovery changes: - add a method to the UI class that is called when a key is held down long enough to be a "long press" (but before it is released). Device-specific subclasses can override this to indicate a long press. - do color selection for ScreenRecoveryUI's menu-and-log drawing function. Subclasses can override this to customize the colors they use for various elements. - Include the value of ro.build.display.id in the menu headers, so you can see on the screen what version of recovery you are running. Change-Id: I426a6daf892b9011638e2035aebfa2831d4f596d --- screen_ui.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index fe0de46e8..0bd220f74 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -53,6 +53,11 @@ class ScreenRecoveryUI : public RecoveryUI { int SelectMenu(int sel); void EndMenu(); + void Redraw(); + + enum UIElement { HEADER, MENU, MENU_SEL_BG, MENU_SEL_FG, LOG, TEXT_FILL }; + virtual void SetColor(UIElement e); + private: Icon currentIcon; int installingFrame; -- cgit v1.2.3 From a2a1ce823b8c76451ee2b38155b347b0c2ced714 Mon Sep 17 00:00:00 2001 From: Michael Runge Date: Wed, 2 Oct 2013 16:17:37 -0700 Subject: Allow child classes to override the overlay location for the update image. b/10952479 Change-Id: I59bb834f271f702fb529054dab7926b816fa35cc --- screen_ui.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 0bd220f74..fc35d95b6 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -58,6 +58,9 @@ class ScreenRecoveryUI : public RecoveryUI { enum UIElement { HEADER, MENU, MENU_SEL_BG, MENU_SEL_FG, LOG, TEXT_FILL }; virtual void SetColor(UIElement e); + protected: + int install_overlay_offset_x, install_overlay_offset_y; + private: Icon currentIcon; int installingFrame; @@ -99,7 +102,6 @@ class ScreenRecoveryUI : public RecoveryUI { int animation_fps; int indeterminate_frames; int installing_frames; - int install_overlay_offset_x, install_overlay_offset_y; int overlay_offset_x, overlay_offset_y; void draw_install_overlay_locked(int frame); -- cgit v1.2.3