aboutsummaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
Commit message (Collapse)AuthorAgeFilesLines
* increase button sizeWolfgang Wiedmeyer2017-06-141-0/+3
| | | | Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* Replicant brandingWolfgang Wiedmeyer2017-02-131-2/+2
| | | | Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* Fix log text placement.Danny Baumann2016-11-081-2/+2
| | | | | | | | | Commit I4b56db78d13931fdd79580b801260bdfca0e9726 intended to constrain the log to the lower quarter of the screen, but miscalculated the respective limit value. Also make sure to display the log starting from the last line. Change-Id: I87fb2f311ff312faeca8777559d46c1569f6b95f
* recovery: Initialize menu_show_start_ to avoid crashnadlabak2016-06-201-0/+1
| | | | | | | When left uninitialized, wrong pointer to text may be passed from draw_screen_locked to draw_menu_item, causing segfault in gr_text. Change-Id: I932dd8c4d3d28afe82decc46f1f0af20586d88df
* recovery: Only set relevant sysbar state flagsTom Marshall2016-03-141-0/+12
| | | | Change-Id: I9fc0fa29299610865f622dc296bdadff59d74447
* recovery: Implement sysbarTom Marshall2016-03-071-11/+64
| | | | | | | | | | | | 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
* sr: Deep rainbow integrationSteve Kondik2016-02-081-0/+2
| | | | | | | * Some devices may want to react in new and innovative ways to the invocation of rainbow mode. Allow for this deep integration. Change-Id: I088487e42b71ebfa80ca3976be328f0336ec0805
* recovery: Show menu headersTom Marshall2016-02-081-7/+34
| | | | | | | | Most headers in recovery aren't very useful and so have historically not been shown in the touch UI. But certain headers, such as those shown by yes_no(), should be shown. Change-Id: I8536c528d3b4b4fd6d506ecef25378149b4e9746
* recovery: Fix size of text arrayTom Marshall2015-12-031-3/+3
| | | | | | text_ is rendered using the log font, so alloc appropriately. Change-Id: If6306512978aff2f32bcee072a24cd6bdd042016
* Improve placement of progress bar.Danny Baumann2015-11-251-5/+10
| | | | | | | Limit text output to 1/4 of screen height during installation, and center icon and progress bar inside the remaining space. Change-Id: I4b56db78d13931fdd79580b801260bdfca0e9726
* sr: Fix all the graphics issuesSteve Kondik2015-11-251-49/+44
| | | | | | | | | * Get rid of all the jank and flicker. * Fix preserved backbuffer * Simplify the code, all drawing happens on a single thread now. Change-Id: I36e1deee0663defd8aea1eba985e3ecbd408eac0
* recovery: Headless modeTom Marshall2015-11-251-0/+15
| | | | Change-Id: I6b54bde65264aee99cb51a19436e82054b31fe74
* sr: Fix menu wrappingTom Marshall2015-11-251-0/+4
| | | | | | | | Reset menu_show_start_ if the selected item won't be visible. This fixes the display after selecting an item from the second page in the file list. Change-Id: Iff2bef39ec294c47bcaadce4128adb6d14d9e4db
* recovery: New icon type VIEWING_LOGTom Marshall2015-11-251-1/+3
| | | | | | | | * Fixes "View recovery logs" This is probably not the best solution, perhaps find a different way? Change-Id: Ibd901ce7f69ec05c4d26cdb027e51b7e5b826034
* sr: Dejank the menus, fix colorsTom Marshall2015-11-251-4/+3
| | | | | | | * Remove extraneous menu update causing jank * Use official colors Change-Id: I5ca3faf54a51853fde8270edeee0fba778906659
* sr: Fix the progress barSteve Kondik2015-11-251-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * The progress thread is running all the time, which causes the device to heat up while in recovery. Start this thread only when the progress mode is set to something other than EMPTY, and add a terminating condition so that it exits when finished. * Incorporate Tom's patch to keep it updated when visible, since both are needed to get working progress indications without killing batteries. * Clear buffer in draw_progress_locked() and always call this in update_progress_locked(). This is necessary to ensure that all backing frames in the graphics implementation get updated because we aren't guaranteed to have any particular number of backing frames. * Remove dialogs on wipe operations since we are using the progress animation now. * Set progress indicator after showing "Formatting" text to avoid momentary flicker. Change-Id: Ib70d2cb25f01d9920ffb698b5b5b47af827ef483
* sr: Touch UITom Marshall2015-11-251-73/+147
| | | | Change-Id: I4ee87f3474aec0496c47bb561ddecc74e151cbbf
* recovery: Initial dialog implementationTom Marshall2015-11-251-1/+79
| | | | | | | | | | | | | | | | | 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
* OMGRainbowsCEnnis912015-11-201-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer will we get bad reviews on CWM recovery for its lack of rainbows! Originally design by gweedo767, this patch brings back the wrap count mechanism from v2.0.2.4 to toggle Rainbow Mode for the user. In the original design, every character has a different color, but that method requires modifying graphics.c which will cause breakage in devices with custom graphics.c. This Rainbow Mode has a different color for each line, instead. The wrap_count has been set to 5 instead of the previous 3 so the toggle won't occur as often, if on accident. (port to CM12.1 by cyanogen) Change-Id: Ie9f6f1b6ed94ee69d4d8d9fe27f9a5417cc3f212 improve Rainbow Mode * Require 5 consecutive menu "wraps" in the same direction to help prevent accidental toggling * Align colors into stripes (i.e. columns) a) less prone to induce dizziness in some people when they change b) better resembles a rainbow * Move the stripes to the right when the selection moves up and move the stripes to the left when the selection moves down Change-Id: I3feae173b22f5703c554ca33e634881749ff54cf
* recovery: Remove redirect_stdio() when calling ShowFile().Tao Bao2015-11-071-1/+1
| | | | | | | | | When calling ScreenRecoveryUI::ShowFile(), the only thing that gets inadequately logged is the progress bar. Replace the call to ScreenRecoveryUI::Print() with ScreenRecoveryUI::PrintOnScreenOnly() for the progress bar, so we can avoid calling redirect_stdio(). Change-Id: I4d7c5d5b39bebe0d5880a99d7a72cee4f0b8f325
* Log update outputs in orderTao Bao2015-11-071-10/+25
| | | | | | | | | | | | | | 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
* Add an alternate screen for viewing recovery logs.Elliott Hughes2015-05-061-46/+64
| | | | | | | | | | This makes it easier to go back and forth without losing current output. Also make the display more like regular more(1). Bug: http://b/20834540 Change-Id: Icc5703e9c8a378cc7072d8ebb79e34451267ee1b (cherry picked from commit c049163234003ef463bca018920622bc8269c69b)
* Don't use typedefs that hide *s.Elliott Hughes2015-04-151-6/+6
| | | | | | gr_surface was causing confusion for no good reason. Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6
* Move the menu header out of the menu.Elliott Hughes2015-04-131-28/+58
| | | | | | | | | | | This makes it easier for us to deal with arbitrary information at the top, and means that headers added by specific commands don't overwrite the default ones. Add the fingerprint back, but broken up so it fits even on sprout's display. Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c
* Merge "Remove unnecessary globals."Elliott Hughes2015-04-131-11/+5
|\
| * Remove unnecessary globals.Elliott Hughes2015-04-131-11/+5
| | | | | | | | Change-Id: I76a042432aede08ceaf250319cf5eeb25d601150
* | Treat KEY_ENTER the same as KEY_POWER in the pager.Elliott Hughes2015-04-131-1/+1
|/ | | | | | | | Our long-press UI sends KEY_ENTER for long presses, which the long-press UI treats as equivalent to KEY_POWER in the regular UI. So anywhere we accept KEY_POWER we should accept KEY_ENTER too. Change-Id: I99d376c961887043cf02037c26d000c8ba4d66f9
* Rewritten file pager.Elliott Hughes2015-04-101-64/+82
| | | | | | Most importantly, this one no longer skips lines because of wrapping. Change-Id: Ic1c1944682ab8cbf3d542418ee86d29819173fc9
* Fix ScreenRecoveryUI to handle devices without power/up/down.Elliott Hughes2015-04-101-1/+10
| | | | | | | | 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 file paging into ScreenRecoveryUI.Elliott Hughes2015-04-081-33/+86
| | | | | | This fixes the N9 performance problem. Change-Id: I00c10d4162ff266a6243285e5a5e768217f6f799
* Remove the fixed screen size assumptions.Elliott Hughes2015-04-081-23/+33
| | | | | | Dynamically allocate the text and menu arrays instead. Change-Id: Idbfc3fe4e4b50db4fee62ac2b6a7323cad369749
* Fix recovery image text rendering.Elliott Hughes2015-03-241-7/+3
| | | | | | | | | | | | | | Previously most devices would lose the character before a line wrap. The log's text rendering was starting at offset 4 but none of the arithmetic was taking this into account. It just happened to work on the Nexus 9's 1536-pixel wide display (1536/18=85.3) but not on a device such as the Nexus 5 (1080/18=60). The only active part of this change is the change from 4 to 0 in the gr_text call. The rest is just a few bits of trivial cleanup while I was working out what was going on. Change-Id: I9279ae323c77bc8b6ea87dc0fe009aaaec6bfa0e
* Make the recovery menus wrap.Elliott Hughes2015-03-231-2/+5
| | | | | | | | The real problem is that the recovery UI is sluggish. But being able to wrap off the top to the bottom halves the maximum distance you'll have to go. Change-Id: Ifebe5b818f9c9a1c4187d4ac609422da1f38537f
* restore holo UI in recoveryDoug Zongker2014-06-061-13/+16
| | | | | | | Return to the recovery to the holo appearance. Bug: 15424396 Change-Id: Id4d3f23e0a6251a12aa42f3793cff347f38b4243
* am 48abd574: am 34ff5fe3: am 74b90b30: Merge "screen_ui: Initialize text buffer"Doug Zongker2014-05-131-0/+2
|\ | | | | | | | | * commit '48abd574cb1b7b0adbe1de36224fb974182aaa2d': screen_ui: Initialize text buffer
| * am 74b90b30: Merge "screen_ui: Initialize text buffer"Doug Zongker2014-05-131-0/+2
| |\ | | | | | | | | | | | | * commit '74b90b309f67dc3b8bb74e47c4eddf7ce511bc35': screen_ui: Initialize text buffer
| | * Merge "screen_ui: Initialize text buffer"Doug Zongker2014-05-131-0/+2
| | |\
| | | * screen_ui: Initialize text bufferBjorn Andersson2013-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Zero initialize the text buffer to make recovery not render garbage when showing the menu or messages. Change-Id: I0dd0d357757f6b0fd52ad3b3617d42bb1b835245
| | | * recovery: init backgroundIcon properly to avoid recovery mode crashyetta_wu2013-06-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We met factory issue that some devices would crash in recovery mode because the backgroundIcon array did not reset to NULL when initializing. Bug: 9568624 Change-Id: I13c7a7cc1053a7ffdbadd71740c1a2b4a2af6bba Signed-off-by: yetta_wu <yetta_wu@asus.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
| * | | resolved conflicts for merge of d90da130 to klp-dev-plus-aospDoug Zongker2014-03-171-5/+9
| |\| | | | | | | | | | | | | | Change-Id: I19f9f460145fdcf5cdc58ee4fa25ff3c9ba398f0
| * | | am c91612d4: Merge "remove pixelflinger from recovery"Doug Zongker2014-03-131-7/+7
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit 'c91612d4668688c5d7bf76c258c11010697a03d2': remove pixelflinger from recovery
| * \ \ \ Merge commit 'ea868b38' into manualmergeDoug Zongker2014-03-131-92/+20
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: screen_ui.cpp screen_ui.h Change-Id: Iefe7dde04cc76639f56730a19238436073f18ffb
* | | | | | make density-specific recovery assetsDoug Zongker2014-04-041-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide different recovery UI resources for different display densities. Right now only the text images and the progress bars are rescaled; the main icon will get scaled when it's updated for QP. Lightly quantum-ify the rest of the recovery interface. (Light background, progress bars, etc.) Change-Id: Ia639c4ce8534b01bc843524efbc4b040c1cf38b3
* | | | | | am 80c1a386: resolved conflicts for merge of d90da130 to ↵Doug Zongker2014-03-171-5/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | klp-modular-dev-plus-aosp * commit '80c1a386d3f614919708b37986919ecaf74ee738': refactor image resource loading code in minui
| * \ \ \ \ \ resolved conflicts for merge of d90da130 to klp-modular-dev-plus-aospDoug Zongker2014-03-171-5/+9
| |\ \ \ \ \ \ | | | |_|_|/ / | | |/| | | | | | | | | | | Change-Id: Ib95b5bcd8d24014e1f2a956d2f31c99a471d3e30
| | * | | | | refactor image resource loading code in minuiDoug Zongker2014-03-171-5/+9
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the number of copies of libpng boilerplate. Rename res_create_* functions to be more clear. Make explicit the use of the framebuffer pixel format for images, and handle more combinations of input and output (eg, loading a grayscale image for display rather than use as a text alpha channel). Change-Id: I3d41c800a8f4c22b2f0167967ce6ee4d6b2b8846
| * | | | | am c91612d4: Merge "remove pixelflinger from recovery"Doug Zongker2014-03-121-7/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c91612d4668688c5d7bf76c258c11010697a03d2': remove pixelflinger from recovery
| | * | | | remove pixelflinger from recoveryDoug Zongker2014-03-111-7/+7
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recovery now draws directly to the framebuffer by rolling its own graphics code, rather than depending on libpixelflinger. The recovery UI is modified slightly to eliminate operations that are slow with the software implementation: when the text display / menu is turned on, it now appears on a black background instead of a dimmed version of the recovery icon. There's probably substantial room for optimization of the graphics operations. Bug: 12131110 Change-Id: Iab6520e0a7aaec39e2ce39377c10aef82ae0c595 Conflicts: minui/resources.c
| * | | | resolved conflicts for merge of ea868b38 to klp-modular-dev-plus-aospDoug Zongker2014-03-111-92/+20
| |\| | | | | |/ / | |/| | | | | | Change-Id: I8cc3b8101bccf7fd697f9a7b73732d1000dc27a1
| | * | change how recovery animation is implementedDoug Zongker2014-03-111-88/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of one 'base' installing image and a number of overlay images that are drawn on top of it, we represent the installing animation with one PNG that contains all the animation frames, interlaced by row. The PNG is expected to have a text chunk with the keyword 'Frames' and a value that's the number of frames (as an ascii string). This representation provides better compression, removes the need to subclass ScreenRecoveryUI just to change the position of the overlay or number of frames, and doesn't require gr_blit() to support an alpha channel. We also remove the 'indeterminate' progress bar used when wiping data and/or cache. The main animation serves the same purpose (showing that the device is still alive); the spinning progress bar has been redundant for a while. This changes the default recovery animation to include the antenna-wiggling and gear-turning that's used in the Nexus 5 recovery animation. Change-Id: I51930a76035ac09969a25472f4e572b289418729 Conflicts: screen_ui.cpp screen_ui.h