summaryrefslogtreecommitdiffstats
path: root/wear_ui.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* wear_ui: Expose menu_unusable_rows via Makefile var.Tao Bao2017-08-131-1/+1
| | | | | | | | | | | | | This variable is useful on small screens (e.g. on watches) to handle long menus. We should have better way to handle this value smartly. Prior to that, expose the value to be overridable by using the generic wearable UI module (librecovery_ui_wear). Bug: 64307776 Test: Define the variable, build and boot into recovery image and check the UI menu. Change-Id: I5d7a6baa8bb4cc852bfcc2a7b3cc9686c1c8817e (cherry picked from commit eea3af3f911d36ac1a82a9fb95d24912cc07e3b1)
* Allow customizing WearRecoveryUI via Makefile variables.Tao Bao2017-08-131-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the following Makefile variables, we can reduce the work of writing (copy/pasting) device-specific WearRecoveryUI classes. The list of Makefile variables (the ones useful for Wear devices): - TARGET_RECOVERY_UI_MARGIN_HEIGHT (default: 0) - TARGET_RECOVERY_UI_MARGIN_WIDTH (default: 0) Specify the margin space that we don't want to display texts. They replace the former outer_width and outer_height. - TARGET_RECOVERY_UI_TOUCH_LOW_THRESHOLD (default: 50) - TARGET_RECOVERY_UI_TOUCH_HIGH_THRESHOLD (default: 90) Specify the sensitivity of recognizing a swipe. Devices give absolute positions, so for some devices we need to adjust the thresholds. - TARGET_RECOVERY_UI_PROGRESS_BAR_BASELINE Specify the progress bar vertical position, which should be adjusted to the actual height of a device. It replaces the former progress_bar_y. - TARGET_RECOVERY_UI_ANIMATION_FPS (default: 30) Specify the animation FPS if using device-specific animation images. It replaces the former animation_fps. Devices can specify "TARGET_RECOVERY_UI_LIB := librecovery_ui_wear", with optionally defined Makefile vars above, in BoardConfig.mk to customize their WearRecoveryUI. Also remove the obsolete wear_touch.{cpp,h}, which has been merged into ui.cpp in commit 5f8dd9951d986b65d98d6a9ea38003427e9e46df. Bug: 64307776 Test: Change the device BoardConfig.mk and test recovery image. Change-Id: Id0fb2d4e3977ab5ddd31e71f9535470cab70e41b (cherry picked from commit 0470ceea381775b09eee931858c3320be88cc637)
* wear_ui: Remove dead/duplicate codes.Tao Bao2017-06-291-2/+0
| | | | | | | | | | | | | WearRecoveryUI::draw_progress_locked() has declaration only, where the definition was deleted in commit 5e7cfb9af64d5f6bf616d9b6fa40bd0ae82e781a. WearRecoveryUI::ClearText() is a duplicates of ScreenRecoveryUI::ClearText(). Test: Build swordfish recovery image. 'Run graphics test' and 'View recovery logs'. Change-Id: Ib66955d1d496f04359b4d6487160218e8f954478
* Add override specifier and member constness to RecoveryUI classes.Tao Bao2017-06-241-4/+3
| | | | | Test: mmma bootable/recovery Change-Id: I66e328614423488a4027d7878f4569fbf3a3721e
* Formatting RecoveryUI related files.Tao Bao2017-06-241-40/+40
| | | | | | | All cosmetic changes about indentation reformatting in this CL. Test: mmma bootable/recovery Change-Id: I4539e6244697d1f356b7eb10b961b52d7db561f7
* recovery: Fix the broken UI text.Tao Bao2017-01-041-1/+3
| | | | | | | | | | | | | | | UI text is broken (doesn't show any text during FDR) due to commit d530449e54bd327e9c26209ffa0490c6508afe6c, which reordered the calls to RecoveryUI::SetLocale() and RecoveryUI::Init(). Because Init() uses the locale info to load the localized texts (from images), the locale must be set prior to that via SetLocale(). This CL refactors Init() to take the locale parameter, and removes the odd SetLocale() API. Bug: 34029338 Test: 'Run graphics test' under recovery. Change-Id: I620394a3d4e3705e9af5a1f6299285d143ae1b01
* Add a stub recovery UI.Sen Jiang2016-12-131-2/+2
| | | | | | | | | | | This allows recovery to work on devices without screen. The stub recovery UI does nothing except print to stdout. Test: write 'recovery\n--wipe_data\n--reason=wipe_data_from_ota\n' to misc and boot to recovery on a device without screen. Bug: 33175036 Change-Id: Icde698aa2e2e29f4b3d0532dfd3c6a939ac2bc63
* Remove duplicate thread loopDamien Bargiacchi2016-09-091-2/+2
| | | | | | Fixes animation running at 2x speed Change-Id: Ieec353097b6eee1cf40530e6f4f1e69927d2bc98
* Remove duplicate methods and variables from WearRecoveryUIDamien Bargiacchi2016-09-071-57/+15
| | | | | | | | Copy pasta is never as delicious as ones hopes. Also fix the Pike not rendering recovery bug. Change-Id: I903da7da436e3347a22ff51633e8a0f28fea2c46
* recovery: Remove SetColor, and other refactoring for WearUIPrashant Malani2016-03-121-5/+0
| | | | | | | | | | | | | | The only difference from SetColor in ScreenRecoveryUI is the that the LOG messages have slightly different colors. That's not enough to warrant a duplicate function. So this patch removes SetColor and uses the parent class version. This patch also moves the DrawTextLine* functions into ScreenRecoveryUI since they're mostly the same. It also moves char_width and char_height into the class instead of keeping them as static variables. Bug: 27407422 Change-Id: I30428c9433baab8410cf710a01c9b1c44c217bf1
* recovery: Remove duplicate variables and functionsPrashant Malani2016-03-111-4/+0
| | | | | | | | | | | | | | | | | The function that modifies rtl_locale exists only in the base class, and so the variable should not have a duplicate in the derived class, otherwise there may be incosistent values when it is read by the derived class (the thinking being that invoking the function will modify the base class version of the variable, and not the derived class version). Remove the updateMutex variable, and instead re-use the one in the base class. Also remove LoadBitmap from WearUI since it is identical to the one in ScreenRecoveryUI. Bug: 27407422 Change-Id: Idd823fa93dfa16d7b2c9c7160f8d0c2559d28731
* Revert "recovery: More refactoring of WearUI"Prashant Malani2016-03-101-0/+12
| | | | | | | | | This reverts commit 1c7b2230d8aac9f064f68c48b6aa26aca000cc9d. This change can lead to the derived class indirectly (and incorrectly) calling some functions from the base class, which can lead to unpredictable behavior. Bug: 27407422 Change-Id: I126a7489b0787dc195e942e2ceea6769de20d70c
* recovery: More refactoring of WearUIPrashant Malani2016-03-091-12/+0
| | | | | | | | | | This patch performs the following modifications: - Remove setBackground function, and currentIcon member variable. - Remove common Progress*, Redraw and EndMenu functions. Bug: 27407422 Change-Id: Ic3c0e16b67941484c3bc1d04c9b61288e8896808 Signed-off-by: Prashant Malani <pmalani@google.com>
* recovery: Begin refactor of WearUI to use ScreenRecoveryUIPrashant Malani2016-03-081-8/+2
| | | | | | | | | | | | | | This is the first of a series of changes which move WearUI to subclass ScreenRecoveryUI, to take advantage of several functions which are common between the two recovery UI implementations, and already defined in ScreenRecoveryUI. This patch changes the base class of WearUI, removes redundant header includes, and also removes a common function. Bug: 27407422 Change-Id: I8fd90826900f69272a82e23bd099790e8004d511
* Fixes to wear recovery for NPrashant Malani2016-02-271-0/+2
| | | | | | Bug: 27336841 Change-Id: If4632e9791cce2c39590a4012687271f59a60af1
* res: Embed FPS into icon_installing.png.Tao Bao2015-12-161-2/+3
| | | | | | | | | | | | | | We allow vendor-specific icon installing image but have defined private animation_fps that can't be overridden. This CL changes the image generator to optionally embed FPS (otherwise use the default value of 20) into the generated image. For wear devices, they are using individual images instead of the interlaced one. Change the animation_fps from private to protected so that it can be customized. Bug: 26009230 Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e
* recovery: Factor out wear_ui.{cpp,h} into bootable/recovery.Tao Bao2015-08-251-0/+137
Every watch has a (mostly identical) copy of the wear_ui. Factor them out into a single copy for easier maintenance. Device-specific settings should be defined in recovery_ui.cpp that inherits WearRecoveryUI class. Bug: 22451422 Change-Id: Id07efca37d1b1d330e6327506c7b73ccf6ae9241