aboutsummaryrefslogtreecommitdiffstats
path: root/ui.h
Commit message (Collapse)AuthorAgeFilesLines
* recovery: Implement sysbarTom Marshall2016-03-071-0/+9
| | | | | | | | | | | | Add a system bar (navigation bar) similar to the main Android system with back and home buttons. This makes it easier for users to figure out how to go back on devices that lack hardware buttons, and also provides a quick way to get back to the main menu. Note only buttons that do not have a hardware equivalent are shown, in order to prevent redundancy and confusion. Change-Id: I7538749978837571a8c250c3c8e54ac127b39d84
* recovery: Headless modeTom Marshall2015-11-251-1/+2
| | | | Change-Id: I6b54bde65264aee99cb51a19436e82054b31fe74
* recovery: New icon type VIEWING_LOGTom Marshall2015-11-251-1/+1
| | | | | | | | * Fixes "View recovery logs" This is probably not the best solution, perhaps find a different way? Change-Id: Ibd901ce7f69ec05c4d26cdb027e51b7e5b826034
* sr: Touch UITom Marshall2015-11-251-3/+90
| | | | Change-Id: I4ee87f3474aec0496c47bb561ddecc74e151cbbf
* recovery: Initial dialog implementationTom Marshall2015-11-251-1/+10
| | | | | | | | | | | | | | | | | Implement two types of dialogs: info and error. Info dialogs are intended to show that an operation is in progress and cannot be interrupted. Error dialogs are intended to show that an error occurred. The user must respond by dismissing the dialog with any input (a swipe or keypress). Dialogs may be initiated internally within the UI code or externally via a named local socket. Dialogs created via socket are presumed to be info and may not be dismissed. When the client socket is closed, the dialog automatically dismisses. Initial implementation shows dialogs for adb backup and restore. Future work will show dialogs for all errors and lengthy operations. Change-Id: Icefea12ec0fd70fb487d54aa2eb1cae9dd451355
* recovery: Provide sideload cancellationTom Marshall2015-11-251-0/+3
| | | | Change-Id: I13f0c9ae5444652a2141442ef24258679a78d320
* recovery: Awakening of MiniVoldTom Marshall2015-11-251-0/+8
| | | | | | A minimal vold client for recovery. Change-Id: Id25d955dc1861a910e5f5fc27d9a19e245d66833
* Log update outputs in orderTao Bao2015-11-071-1/+3
| | | | | | | | | | | | | | Although stdout and stderr are both redirected to log file with no buffering, we are seeing some outputs are mixed in random order. This is because ui_print commands from the updater are passed to the recovery binary via a pipe, which may interleave with other outputs that go to stderr directly. In recovery, adding ui::PrintOnScreenOnly() function to handle ui_print command, which skips printing to stdout. Meanwhile, updater prints the contents to stderr in addition to piping them to recovery. Change-Id: Idda93ea940d2e23a0276bb8ead4aa70a3cb97700
* Remove unnecessary globals.Elliott Hughes2015-04-131-5/+6
| | | | Change-Id: I76a042432aede08ceaf250319cf5eeb25d601150
* Auto-detect whether to use the long-press UI.Elliott Hughes2015-04-101-0/+4
| | | | Change-Id: Ie77a5584e301467c6a5e164d2c62d6f036b2c0c0
* Fix ScreenRecoveryUI to handle devices without power/up/down.Elliott Hughes2015-04-101-13/+16
| | | | | | | | Currently fugu has a custom subclass to handle this. The default code supports devices with trackballs but not all shipping Nexus devices? That's just silly. Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
* Move "Mount /system" to the main menu.Elliott Hughes2015-04-101-2/+1
| | | | | | | Everyone's adding secret key combinations for this anyway, and it's very useful when debugging. Change-Id: Iad549452b872a7af963dd649f283ebcd3ea24234
* Move file paging into ScreenRecoveryUI.Elliott Hughes2015-04-081-2/+4
| | | | | | This fixes the N9 performance problem. Change-Id: I00c10d4162ff266a6243285e5a5e768217f6f799
* Enable printf format argument checking.Elliott Hughes2015-04-081-1/+1
| | | | | | | The original attempt missed the fact that Print is a member function, so the first argument is the implicit 'this'. Change-Id: I963b668c5432804c767f0a2e3ef7dea5978a1218
* disable async reboot during package installationDoug Zongker2014-05-231-0/+8
| | | | | | | | | | The default recovery UI will reboot the device when the power key is pressed 7 times in a row, regardless of what recovery is doing. Disable this feature during package installation, to minimize the chance of corrupting the device due to a mid-install reboot. (Debug packages can explicitly request that the feature be reenabled.) Change-Id: I20f3ec240ecd344615d452005ff26d8dd7775acf
* am d327c63a: am c87bab10: add the functions for multi-stage packages to updaterDoug Zongker2013-12-021-0/+2
|\ | | | | | | | | * commit 'd327c63af691a36fbf53866a3ae7ad27a43ebe3b': add the functions for multi-stage packages to updater
| * add the functions for multi-stage packages to updaterDoug Zongker2013-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support multi-stage recovery packages, we add the set_stage() and get_stage() functions, which store a short string somewhere it can be accessed across invocations of recovery. We also add reboot_now() which updater can invoke to immediately reboot the device, without doing normal recovery cleanup. (It can also choose whether to boot off the boot or recovery partition.) If the stage string is of the form "#/#", recovery's UI will be augmented with a simple indicator of what stage you're in, so it doesn't look like a reboot loop. Change-Id: I62f7ff0bc802b549c9bcf3cc154a6bad99f94603
* | recovery: fix epoll events type to uint32_tTodd Poynor2013-09-171-1/+1
| | | | | | | | Change-Id: I5db9987102201c18821acb45d1f824e9865a1451
* | recovery: ui changes for ev_*() switch to epollTodd Poynor2013-09-121-1/+1
| | | | | | | | | | | | Convert callback events parameter to unsigned int. Change-Id: Ife0e983f307c07bf4aca807d70574aeb20c460cd
* | allow CheckKey to request mounting /systemDoug Zongker2013-09-041-1/+5
|/ | | | | | | Also provide a default implementation of CheckKey that's reasonable for many devices (those that have power and volume keys). Change-Id: Icf6c7746ebd866152d402059dbd27fd16bd51ff8
* notify about pending long pressDoug Zongker2013-07-311-1/+20
| | | | | | | | | | | | | | | | | | 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
* add NextCheckKeyIsLong() and EnqueueKey() methodsDoug Zongker2012-12-171-0/+7
| | | | | | | | | | | | | NextCheckKeyIsLong() is called right before each call to CheckKey() to tell the implementation if the key is a long-press or not. (To be used on devices with few buttons.) It's done as a separate method (rather than a parameter to CheckKey) to not break existing recovery UI implementations. EnqueueKey() can be called from CheckKey() to put arbitrary code codes in the synchronous queue (to be processed by HandleMenuKey). Change-Id: If8a83d66efe0bbc9e2dc178e5ebe12acd216324b
* localization for recovery messagesDoug Zongker2012-09-181-0/+3
| | | | | | | | | 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
* add simple text to recovery UIDoug Zongker2012-08-221-1/+1
| | | | | | | | | | | | | | | - 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
* allow recovery UI to ignore certain keypressesDoug Zongker2012-01-181-1/+1
| | | | Change-Id: Id182bb95ffcc475c5acabb29b413e422302ae7f2
* move key processing to RecoveryUIDoug Zongker2011-11-041-5/+26
| | | | | | | | | 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
* C++ class for device-specific codeDoug Zongker2011-10-311-0/+7
| | | | | | | | | | 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
* refactor ui functions into a classDoug Zongker2011-10-311-50/+59
| | | | | | | | | | | 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
* turn recovery into a C++ binaryDoug Zongker2011-10-311-0/+75
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555