Commit graph

8 commits

Author SHA1 Message Date
Michael Runge
a2a1ce823b Allow child classes to override the overlay location for the
update image.

b/10952479

Change-Id: I59bb834f271f702fb529054dab7926b816fa35cc
2013-10-02 16:31:07 -07:00
Doug Zongker
c0441d1719 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
2013-07-31 11:35:12 -07:00
Doug Zongker
6fd59ac07d more font improvements and cleanup
Get rid of the notion of a font's "ascent"; the reference point for
drawing is the top-left corner of the character box rather than the
baseline.  Add some more space between the menu entries and make the
highlight bar around the text.

Replace the default font.png with two images; the build system will
include one or the other based on the resolutions of the device.

Restore the original compiled-in bitmap font, to fall back on when
font.png can't be found (eg, in the charger binary).

Add support for bold text (when a font.png image is used).

Change-Id: I6d211a486a3636f20208502b1cd2aeae8b9f5b02
2013-03-07 13:34:24 -08:00
Doug Zongker
5fa8c23911 localization for recovery messages
Add images of text for all locales we support.  Make the progress bar
fill the correct way for RTL languages.  (Flip the direction the
spinner turns, too, just for good measure.)

Bug: 7064142
Change-Id: I5dddb26e02ee5275c57c4dc4a03c6d68432ac7ba
2012-09-18 12:37:02 -07:00
Doug Zongker
02ec6b88ed add simple text to recovery UI
- recovery takes a --locale argument, which will be passed by the main
  system

- the locale is saved in cache, in case the --locale argument is
  missing (eg, when recovery is started from fastboot)

- we include images that have prerendered text for many locales

- we split the background states into four (installing update,
  erasing, no command, error) so that appropriate text can be shown.

Change-Id: I731b8108e83d5ccc09a4aacfc1dbf7e86b397aaf
2012-08-22 17:26:40 -07:00
Doug Zongker
32a0a47a59 move key processing to RecoveryUI
Move the key for handling keys from ScreenRecoveryUI to RecoveryUI, so
it can be used by devices without screens.  Remove the UIParameters
struct and replace it with some new member variables in
ScreenRecoveryUI.

Change-Id: I70094ecbc4acbf76ce44d5b5ec2036c36bdc3414
2011-11-04 14:09:48 -07:00
Doug Zongker
daefc1d442 C++ class for device-specific code
Replace the device-specific functions with a class.  Move some of the
key handling (for log visibility toggling and rebooting) into the UI
class.  Fix up the key handling so there is less crosstalk between the
immediate keys and the queued keys (an increasing annoyance on
button-limited devices).

Change-Id: I698f6fd21c67a1e55429312a0484b6c393cad46f
2011-10-31 15:51:07 -07:00
Doug Zongker
211aebc4e0 refactor ui functions into a class
Move all the functions in ui.c to be members of a ScreenRecoveryUI
class, which is a subclass of an abstract RecoveryUI class.  Recovery
then creates a global singleton instance of this class and then invoke
the methods to drive the UI.  We use this to allow substitution of a
different RecoveryUI implementation for devices with radically
different form factors (eg, that don't have a screen).

Change-Id: I76bdd34eca506149f4cc07685df6a4890473f3d9
2011-10-31 14:15:02 -07:00