summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* recovery: Fix the broken UI text.Tao Bao2017-01-041-131/+103
| | | | | | | | | | | | | | | 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-4/+11
| | | | | | | | | | | 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
* resolve merge conflicts of d5c7d6b to nyc-mr1-dev-plus-aospElliott Hughes2016-09-261-4/+4
|\ | | | | | | Change-Id: Ia041044547351a3e65b647bb9913aa18c7d2c97c
| * Switch to <android-base/properties.h>.Elliott Hughes2016-09-261-4/+4
| | | | | | | | | | | | | | Bug: http://b/23102347 Test: boot into recovery. Change-Id: Ib2ca560f1312961c21fbaa294bb068de19cb883e Merged-In: Ib2ca560f1312961c21fbaa294bb068de19cb883e
| * Switch recovery to libbase loggingTianjie Xu2016-09-011-2/+3
| | | | | | | | | | | | | | | | Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35
| * resolve merge conflicts of 5823dd4 to nyc-dev-plus-aospTianjie Xu2016-05-021-1/+14
| |\ | | | | | | | | | Change-Id: I4ec33904a6af38d81b422c7be6f40b828fbc7525
| * \ Merge "Improve the layout-related comments." into nyc-devElliott Hughes2016-04-281-8/+10
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 343eb72 * commit '343eb722ddd0146e5c752419b3ff9537cfa2d31d': Improve the layout-related comments. Change-Id: Ib4ff24016ae056a61e755cd953739418035cd8e9
| * \ \ Merge "Update recovery UI." into nyc-devElliott Hughes2016-04-281-47/+69
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 2f1eedd * commit '2f1eedded83eea1956ee8b4d391000584588f094': Update recovery UI. Change-Id: Ib43b37f60902b13d1fc4110ad5b394c3c3b39332
* | \ \ \ Remove debug log statement; fix buildDamien Bargiacchi2016-09-081-2/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 43d186021a Change-Id: Iae1fedc578f243eddb9fa8ad9e86fd82f009a958
| * | | | | Remove debug log statement; fix buildDamien Bargiacchi2016-09-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ief92ec99d902ed58a48be9c2486cb99fdb184d7b
* | | | | | Remove duplicate methods and variables from WearRecoveryUIDamien Bargiacchi2016-09-081-20/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 5e7cfb9af6 Change-Id: I0f4dda0f92dcb6b3a230d2ad5d26f9855acb8c82
| * | | | | Remove duplicate methods and variables from WearRecoveryUIDamien Bargiacchi2016-09-071-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copy pasta is never as delicious as ones hopes. Also fix the Pike not rendering recovery bug. Change-Id: I903da7da436e3347a22ff51633e8a0f28fea2c46
* | | | | | Switch recovery to libbase loggingTianjie Xu2016-09-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 (cherry picked from commit 747781433fb01f745529c7e9dd97c5599070ad0d)
* | | | | | Support use of custom fonts in miniuiDamien Bargiacchi2016-08-241-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 35fff61b1c Change-Id: Iac50e95c15c0b4337435d47d3666c2aaf5eb203d
| * | | | | Support use of custom fonts in miniuiDamien Bargiacchi2016-08-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 29547343 Change-Id: I398160c85daac90ffab2fa9bb2e96795b9e9885a
* | | | | | Support landscape layouts.Elliott Hughes2016-07-091-13/+29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 6d089a955f Change-Id: Iebdce4fe859984257cef027ec6de1aeae51b8d69
| * | | | | Support landscape layouts.Elliott Hughes2016-07-091-13/+29
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for landscape layouts to the existing portrait support. Bug: http://b/29418855 Test: tested manually with "Run graphics test" on flounder/fugu/ryu. Change-Id: Ib4a62bf5f2b8a1cef6028a01f05145104660560a
* | | | | resolve merge conflicts of 23c7af7 to nyc-mr1-dev-plus-aospTianjie Xu2016-05-021-1/+14
|\| | | | | | | | | | | | | | | | | | | Change-Id: I04a73db90ddb059dbb5b44fafd8e82d03ea90ca5
| * | | | Add ability to show "installing security update"Tianjie Xu2016-04-291-1/+14
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new command "--security" to boot commands. If this command is observed as part of BCB, choose a different background text picture for installing stage in recovery UI. As a result, users will see "installing security update" instead of "installing system update" when applying a security update package. Bug: 27837319 Change-Id: I2e2253a124993ecc24804fa1ee0b918ac96837c5
* | | | Merge "Improve the layout-related comments." into nyc-dev am: 343eb72TreeHugger Robot2016-04-281-8/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a7f7e70 * commit 'a7f7e7093ea67c3ddda03f52edb440c780d69b0d': Improve the layout-related comments. Change-Id: I957cc75b064b1d0be5cee54af7b27f008a7a22a1
| * | | Improve the layout-related comments.Elliott Hughes2016-04-281-8/+10
| | |/ | |/| | | | | | | | | | Bug: http://b/26548285 Change-Id: I20ae75c4ec2dc64b982a047dba498ebda029c90d
* | | Merge "Update recovery UI." into nyc-dev am: 2f1eeddElliott Hughes2016-04-281-47/+69
|\| | | |/ |/| | | | | | | | | | | | | am: 75191f3 * commit '75191f32a56db352722ab9ac1acf9ceb08485a04': Update recovery UI. Change-Id: I190b15530558a9d18fbe7202893bb7a76c5d3ff5
| * Update recovery UI.Elliott Hughes2016-04-271-47/+69
| | | | | | | | | | | | | | | | | | * Use new animation. * Use new non-holo progress bars. * Use recommended spacing for recovery UI. Bug: http://b/26548285 Change-Id: I8411e89d6a6a9ce638b8645e19e5082d0d968cee
* | Go back to the old ear-wiggling Android animation.Elliott Hughes2016-04-221-1/+0
|\| | | | | | | | | | | | | | | | | am: 692941be79 * commit '692941be79fd765f8873d810ae627a917dfd791b': Go back to the old ear-wiggling Android animation. Change-Id: Ifddb21173e55f9c690dbc0661308575d885f4e76
| * Go back to the old ear-wiggling Android animation.Elliott Hughes2016-04-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | But keep the new code so we can easily test new animations when we have them. This change includes tbao's de-interlace script, plus a one-liner that's necessary to play the animation at the correct speed when there's no progress bar showing. (This was always a bug, it's just way more noticeable when your animation only has 7 frames.) Bug: http://b/28316654 Bug: http://b/26548285 Change-Id: I32c601c352d6be235d1b44f14fca7e125defd77d
* | Merge "Fix google-runtime-int warnings." am: a1f4a1eChih-hung Hsieh2016-04-191-5/+5
|\ \ | |/ |/| | | | | | | | | | | | | am: bcad1d1 * commit 'bcad1d1ced730478c94f951034d252e777661332': Fix google-runtime-int warnings. Change-Id: Ifad31026502e3375f4833899056662da540319b5
| * Fix google-runtime-int warnings.Chih-Hung Hsieh2016-04-181-5/+5
| | | | | | | | | | Bug: 28220065 Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
* | Update the system update animation.Elliott Hughes2016-04-151-51/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to a Wear-like intro/loop system. We don't have an intro yet, but hopefully this will let Wear delete more code when they move to N. Unlike them, we don't hard-code the number of frames: we just look to see what we have available. We do hard-code the fps though. Also add a graphics test mode so you can see a demo of the UI components without having to actually apply an OTA. Also fix a bug where default locale is null rather than en-US: it's more useful to show _some_ text if we don't have a locale (which should only be during development anyway). Bug: http://b/26548285 Change-Id: I63422e3fef3c41109f924d96fb5ded0b3ae7815d
* | recovery: Remove SetColor, and other refactoring for WearUIPrashant Malani2016-03-121-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | | | 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-2/+2
|/ | | | | | | | | | 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>
* res: Embed FPS into icon_installing.png.Tao Bao2015-12-161-4/+5
| | | | | | | | | | | | | | 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
* Track rename from base/ to android-base/.Elliott Hughes2015-12-051-2/+2
| | | | Change-Id: I354a8c424d340a9abe21fd716a4ee0d3b177d86f
* recovery: Remove redirect_stdio() when calling ShowFile().Tao Bao2015-09-101-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-06-031-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-071-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
* 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-141-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-111-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-091-33/+86
| | | | | | This fixes the N9 performance problem. Change-Id: I00c10d4162ff266a6243285e5a5e768217f6f799
* Remove the fixed screen size assumptions.Elliott Hughes2015-04-091-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-181-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 klp-modular-dev-plus-aospDoug Zongker2014-03-181-5/+9
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '80c1a386d3f614919708b37986919ecaf74ee738': refactor image resource loading code in minui
| * \ \ \ \ \ resolved conflicts for merge of d90da130 to klp-modular-dev-plus-aospDoug Zongker2014-03-181-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-121-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
* | | | 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
* | | | change how recovery animation is implementedDoug Zongker2014-03-071-91/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am d327c63a: am c87bab10: add the functions for multi-stage packages to updaterDoug Zongker2013-12-031-4/+32
|\| | | | | | | | | | | | | | | | | | | * commit 'd327c63af691a36fbf53866a3ae7ad27a43ebe3b': add the functions for multi-stage packages to updater
| * | | add the functions for multi-stage packages to updaterDoug Zongker2013-11-271-4/+32
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / Fix rare crash seen when dereferencing backgroundIcon[NONE].Alistair Strachan2013-11-181-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | Because backgroundIcon[] is not initialized by the ScreenRecoveryUI constructor, it should be initialized explicitly to NULL in Init(). If it is not initialized, ScreenRecoveryUI::SetBackground() can fail for the NONE icon because the NULL test can fail and junk will be dereferenced. Change-Id: I4e3738d2e241ed90df43c984fb41e0072933f50a
* | recovery: install packages in a known mount environmentDoug Zongker2013-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | When installing a package, we should have /tmp and /cache mounted and nothing else. Ensure this is true by explicitly mounting them and unmounting everything else as the first step of every install. Also fix an error in the progress bar that crops up when you do multiple package installs in one instance of recovery. Change-Id: I4837ed707cb419ddd3d9f6188b6355ba1bcfe2b2
* | notify about pending long pressDoug Zongker2013-07-311-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | recovery: init backgroundIcon properly to avoid recovery mode crashyetta_wu2013-07-021-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>
* more font improvements and cleanupDoug Zongker2013-03-071-17/+31
| | | | | | | | | | | | | | | | | 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
* recovery: change font for menus to be an imageDoug Zongker2013-03-051-9/+11
| | | | | | | | Instead of representing the font used for menus and log messages in the recovery binary, load it from a resource PNG image. This allows different devices to substitute their own font images. Change-Id: Ib36b86db3d01298aa7ae2b62a26ca29e6ef18014
* revert to tacky 3D recovery animationDoug Zongker2012-10-081-4/+4
| | | | | Bug: 7204420 Change-Id: I16d3346ce54b1aa5a0e6a02839ae9fbd4718fffa
* tweak recovery text imagesDoug Zongker2012-09-181-1/+2
| | | | | | | | Center and fix the extents for those locales that have multiple lines of text. Add Urdu as an RTL language. Bug: 7064142 Change-Id: I4c1aa1198be29cab01129dabf2c4a026b93719a6
* localization for recovery messagesDoug Zongker2012-09-181-6/+46
| | | | | | | | | 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
* minor recovery fixesDoug Zongker2012-09-041-4/+7
| | | | | | | | | | | - protect against missing/malformed bitmaps: fail to display them but don't crash. - don't draw animation overlays until the overlay offset is computed. - logging cleanup Change-Id: Ieb1c155cfbb11e643000bdb5d1a57900c8757739
* change recovery images to android with spinnerDoug Zongker2012-08-231-4/+4
| | | | | | Also make writing the locale a bit more robust. Change-Id: I803dd0aa0b9d6661fad74ea13fb085682402323c
* add simple text to recovery UIDoug Zongker2012-08-231-15/+46
| | | | | | | | | | | | | | | - 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
* fix timed progress bars in recoveryDoug Zongker2012-04-261-4/+8
| | | | | | | They're completely broken and have been for months because this code makes no sense. Change-Id: Ibabcd3dbe5a004a45b341e4a5215aa3df77e1861
* move key processing to RecoveryUIDoug Zongker2011-11-041-214/+40
| | | | | | | | | 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-38/+67
| | | | | | | | | | 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-0/+633
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