Commit graph

155 commits

Author SHA1 Message Date
Tao Bao
edc96fdc44 Merge "Add the missing #include of <functional>." am: dd553d280f am: 965021ab8d
am: 26d00e87f9

Change-Id: Ib707f1282c3280374a014fadd7f27580f8bedaf0
2017-03-17 15:55:49 +00:00
Tao Bao
9468fc0429 Add the missing #include of <functional>.
For the use of std::function and std::bind. They were relying on the
transitive inclusion from <minui/minui.h>.

Test: mmma bootable/recovery
Change-Id: Ia138e1cbdd035b11d6cdca9e16c5591303b6ee13
2017-03-17 01:00:25 -07:00
Elliott Hughes
1de1c7124e Merge "Add a missing #include for openat(2)." am: 3ac0dd2a56 am: cdfe2895b4
am: a82df97dd8

Change-Id: Ie157634ac0e83d168a980fe1b3c72664179551ce
2017-02-24 17:03:37 +00:00
Elliott Hughes
25a29d452e Add a missing #include for openat(2).
Bug: https://code.google.com/p/android/issues/detail?id=64374
Test: builds
Change-Id: I7d7650463197710657820a1adce51f71c1b01415
2017-02-23 10:45:42 -08:00
Tao Bao
16b509535b Merge "minui: Move graphics_{adf,drm,fbdev} into classes." am: 0d14cc279c am: 6585a3c368 am: b8997adc20
am: 1cb8964aac

Change-Id: I8b1fb8ba115f7313f7382b7669e35184eaea3a79
2017-02-13 18:42:16 +00:00
Tao Bao
557fa1f45e minui: Move graphics_{adf,drm,fbdev} into classes.
This CL defines minui_backend as an interface, and expresses the three
backends (adf, drm and fbdev) as subclasses to the interface.

Test: 'Run graphics test' on N9, Pixel C and N5X.
Change-Id: I0e23951c7b2e2ff918957a8d9fc8b0085b6e5952
2017-02-10 17:05:15 -08:00
Tao Bao
70cbe1d2e7 Merge "minui: Save errno before calling close()." am: df464dbe79 am: 8075089ca1 am: 30c164411f
am: 0b4641724b

Change-Id: I494ad8c5749290645f9850410789247e35d3bd41
2017-02-10 00:31:29 +00:00
Tao Bao
f04592ba23 minui: Save errno before calling close().
Otherwise errno would be overwritten when calling close(2).

Test: mmma bootable/recovery
Change-Id: I661e46b1b040f550639a728aa2683e91621b4307
2017-02-09 12:59:19 -08:00
Tao Bao
6812a80433 Merge "minui: Clean up graphics_fbdev.cpp." am: 5121961421 am: e91a2d23ca am: c441edd1c3
am: e799840d8d

Change-Id: I4d9b1ddb2819b59234a32cca15009adf018c91e6
2017-02-09 20:43:49 +00:00
Treehugger Robot
5121961421 Merge "minui: Clean up graphics_fbdev.cpp." 2017-02-09 20:31:02 +00:00
Tao Bao
3a683a0272 Merge "minui: Clean up graphics_adf.cpp." am: d592e1d5e1 am: 46829c326e am: ffd5c03711
am: ff7a320971

Change-Id: I5d6139d8ffd8f65f19caf24d3c17b090fe59bb4b
2017-02-09 20:18:47 +00:00
Tao Bao
d592e1d5e1 Merge "minui: Clean up graphics_adf.cpp." 2017-02-09 20:07:09 +00:00
Tao Bao
a40303bafc Merge "minui: Clean up graphics_drm.cpp." am: 648f252c71 am: f6b6b75916 am: ed5ee5292c
am: 0f38c6da12

Change-Id: I20e3c6b46345df5035d7077dbd3aaf0a2be58670
2017-02-09 20:01:17 +00:00
Tao Bao
76be34cb34 minui: Clean up graphics_drm.cpp.
Remove unneeded header includes. Switch a few memset() to '= {}'
style. Otherwise mostly cosmetic changes like reformatting.

Test: 'Run graphics test' on ryu (which is a DRM device).

Change-Id: I4b0ab2dc0da69a690f09e4f0674b8377de662962
2017-02-07 14:47:59 -08:00
Tao Bao
acf4dd157a minui: Clean up graphics_fbdev.cpp.
Remove unneeded header includes. Otherwise mostly cosmetic changes like
reformatting.

Test: 'Run graphics test' on bullhead (which uses fbdev).

Change-Id: I9b92c96128fa332ac940f73764f9c5fc93ff6c8c
2017-02-07 14:46:31 -08:00
Tao Bao
8f0e21b271 minui: Clean up graphics_adf.cpp.
Remove unneeded header includes. Switch a few memset() to '= {}' style.
Otherwise mostly cosmetic changes like reformatting.

Test: 'Run graphics test' on N9 (which is an ADF device).

Change-Id: If008af18ddae9521f53216b581d882d5eed76d41
2017-02-07 13:20:55 -08:00
Tao Bao
89c56ce014 Merge "minui: Minor clean up to graphics.cpp." am: b04bc0540d am: ec8d74580d am: 7d8e13a535
am: cdd7b47545

Change-Id: Ib8e921d63f067bdf3547419e072cdb1a7ad9f0fc
2017-02-03 21:04:16 +00:00
Tao Bao
e8020f4fa3 minui: Minor clean up to graphics.cpp.
Remove unneeded header includes.

Remove the dead code in gr_test() (already commented out). Similar tests
have been covered by the "Run graphics test" from recovery menu.

Test: mmma -j32 bootable/recovery
Change-Id: If977c1b780602f5c5054469a3dae4fd85f34ab1a
2017-02-03 09:33:36 -08:00
Tao Bao
a7915380bb Merge "minui: Move callback functions to std::function." am: a476312714 am: 343987b2a1 am: 19856bcb2e
am: 6b26798b3a

Change-Id: I8fb3757de81e2d15e72df61951590653752df20c
2017-01-25 00:59:04 +00:00
Tao Bao
a476312714 Merge "minui: Move callback functions to std::function." 2017-01-25 00:49:48 +00:00
Tao Bao
0b1118d6b9 minui: Move callback functions to std::function.
Also make minor clean up to the header includes.

Test: mmma bootable/recovery system/core/healthd system/extra/slideshow
Change-Id: I3bfcf2c0e203c26a98ee08f1f8036c68356a69fd
2017-01-23 16:59:56 +00:00
Tianjie Xu
444732f7a0 Merge "Add checkers and tests for empty locale in PNG file" am: 69e73ab7a9 am: a38224eadb am: 18098b7de3
am: 98cf72d3aa

Change-Id: I1fb6b0898d347ca1187241e495fe28b260c6d905
2017-01-19 19:28:37 +00:00
Tianjie Xu
d17a688525 Add checkers and tests for empty locale in PNG file
match_locale() will return false for empty locale string in the PNG
file. Also add a manual test to validate if a PNG file is qualified to
use under recovery.

Bug: 34054052
Test: recovery_manual_test catches invalid PNG files successfully & Locale_test passed

Change-Id: Id7e2136e1d8abf20da15825aa7901effbced8b03
2017-01-18 19:37:06 -08:00
Tao Bao
274e065782 Merge "minui: Export minui/minui.h." am: 13d15af08f am: ad20b76397 am: 54890af615
am: 397c6c5382

Change-Id: Ib72aea7ad125286d1d347ff3b25fb5f90c408bd3
2017-01-17 19:27:31 +00:00
Tao Bao
0ecbd76b22 minui: Export minui/minui.h.
For libminui static and shared libraries.

Test: build
Change-Id: Ib30dc5e2ef4a3c8b3ca3a0cec68cb65e229a0c16
2017-01-16 21:28:18 -08:00
Rahul Chaudhry
eca28fb8c0 Merge "Remove unnecessary uses of reinterpret_cast." am: c470dc8681 am: 849a911dee am: 6a6e54da04
am: 8ef4c38abe

Change-Id: I795ab2874d6fc8c6087c89df72e7a2341e97e387
2016-11-16 21:59:56 +00:00
Rahul Chaudhry
1cf93f5f74 Remove unnecessary uses of reinterpret_cast.
Discovered while looking at compiler warnings (b/26936282).

Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mma
Change-Id: I66f8f6026ed732a504504ade93ff196dc8b727ca
2016-11-15 23:25:57 -08:00
Rahul Chaudhry
b29f23f7e7 Use static_cast to cast pointers returned by malloc/calloc/realloc/mmap.
static_cast is preferable to reinterpret_cast when casting from void*
pointers returned by malloc/calloc/realloc/mmap calls.

Discovered while looking at compiler warnings (b/26936282).

Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mma
Change-Id: Iaffd537784aa857108f6981fdfd82d0496eb5592
Merged-In: I151642d5a60c94f312d0611576ad0143c249ba3d
2016-11-15 23:24:54 -08:00
Damien Bargiacchi
97eda9db70 Have gr_init_font alloc memory for the font
Change-Id: I8ccf369d52011bc5d07d8e041fe558ce734a78fc
(cherry picked from commit d00f5eb63a)
2016-11-15 16:40:32 -08:00
Damien Bargiacchi
d5d34d70a5 Support use of custom fonts in miniui
Bug: 29547343
Change-Id: I398160c85daac90ffab2fa9bb2e96795b9e9885a
(cherry picked from commit 35fff61b1c)
2016-11-15 14:24:06 -08:00
Tao Bao
b99b9099e8 Merge "Fix "ordered comparison between pointer and zero"." am: a844bc9649 am: 08c4130493 am: 0f81984970
am: c6bed0ab3f

Change-Id: I95702aa4777ac1a8b85b8458c7ab4d1f3a1d365d
2016-11-14 18:49:55 +00:00
Tao Bao
08c4130493 Merge "Fix "ordered comparison between pointer and zero"."
am: a844bc9649

Change-Id: If12e825a23c17730a35a2875c14d1d25d9d41038
2016-11-14 18:28:18 +00:00
MinSeong Kim
126cf8cda8 Fix "ordered comparison between pointer and zero".
From Clang 4.x releases, DR583 and DR1512 will be addressed.
This patch, in advance, fixes the error(s).

Test: `mmma bootable/recovery`
Change-Id: I29dc85ae681307c322ab3a698c3f3bbad1c784ee
Signed-off-by: MinSeong Kim <minseong.kim@linaro.org>
2016-11-11 07:00:57 +00:00
Rahul Chaudhry
4f7faac8d7 Use static_cast to cast pointers returned by malloc/calloc/realloc/mmap.
static_cast is preferable to reinterpret_cast when casting from void*
pointers returned by malloc/calloc/realloc/mmap calls.

Discovered while looking at compiler warnings (b/26936282).

Test: WITH_TIDY=1 WITH_STATIC_ANALYZER=1 mma
Change-Id: I151642d5a60c94f312d0611576ad0143c249ba3d
2016-11-08 16:34:01 -08:00
Tianjie Xu
17e316cce0 Turn on -Werror for recovery
Also remove the 0xff comparison when validating the bootloader
message fields. As the fields won't be erased to 0xff after we
remove the MTD support.

Bug: 28202046
Test: The recovery folder compiles for aosp_x86-eng
Change-Id: Ibb30ea1b2b28676fb08c7e92a1e5f7b6ef3247ab
(cherry picked from commit 7aa88748f6)
2016-09-30 11:18:01 -07:00
Tianjie Xu
7aa88748f6 Turn on -Werror for recovery
Also remove the 0xff comparison when validating the bootloader
message fields. As the fields won't be erased to 0xff after we
remove the MTD support.

Bug: 28202046
Test: The recovery folder compiles for aosp_x86-eng
Change-Id: Ibb30ea1b2b28676fb08c7e92a1e5f7b6ef3247ab
2016-09-29 19:21:24 -07:00
Damien Bargiacchi
8568d7e558 Have gr_init_font alloc memory for the font
am: d00f5eb63a

Change-Id: Ic5394da1aff31adb7dda5160414a4831204fddc2
2016-09-13 15:50:25 +00:00
Damien Bargiacchi
d00f5eb63a Have gr_init_font alloc memory for the font
Change-Id: I8ccf369d52011bc5d07d8e041fe558ce734a78fc
2016-09-09 08:32:21 -07:00
Damien Bargiacchi
e3c7184911 Support use of custom fonts in miniui
am: 35fff61b1c

Change-Id: Iac50e95c15c0b4337435d47d3666c2aaf5eb203d
2016-08-24 20:45:14 +00:00
Damien Bargiacchi
35fff61b1c Support use of custom fonts in miniui
Bug: 29547343
Change-Id: I398160c85daac90ffab2fa9bb2e96795b9e9885a
2016-08-18 19:51:45 -07:00
xinglong.zhu
a5734c2ad8 Merge "Recovery mode UI flicker"
am: 629bde8c6c

Change-Id: I2d9c2a88e8df9d5a096aa70a4a420754c668de26
2016-08-08 18:01:42 +00:00
Treehugger Robot
629bde8c6c Merge "Recovery mode UI flicker" 2016-08-08 17:55:15 +00:00
xinglong.zhu
c4fa2c2c40 Recovery mode UI flicker
[root cause  ] miniui has no mechanism to protect
               the buffer which is displaying
[changes     ] recovery
[side effects] ui show
[self test   ] sc9850-2 general operation has not display abnormal
[reviewers   ] xinglong.zhu

Signed-off-by: xinglong.zhu <xinglong.zhu@spreadtrum.com>
[change_type ] AOB --> google_original
[tag_product ] common

Change-Id: I989a0b2943ff6070a0e98718cfbe95144510d3a2
2016-08-05 22:30:14 +00:00
Tianjie Xu
b02a58740e Merge \"Add docs on regeneration background text image\"
am: 5aa2e104c0

Change-Id: I565fa63de18e0c806f2452c009d97c5ad4ebebc3
2016-07-29 00:09:45 +00:00
Tianjie Xu
9a259772cc Add docs on regeneration background text image
Also add a missing string in the recovery_l10n APP.

Bug: 30415666
Change-Id: Ice2a9f7cad4ebe332b427bc0c7a9adccb6cf3af3
2016-07-28 23:45:45 +00:00
Chih-Hung Hsieh
977903da49 Merge \"Fix clang-tidy performance warnings.\"
am: 2a3b695168

Change-Id: I55cadf517ec612f1b03de71ce7ca5cff69bc80d0
2016-07-27 20:49:34 +00:00
Chih-Hung Hsieh
23abfd37a5 Fix clang-tidy performance warnings.
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.

Bug: 30407689
Bug: 30411878
Change-Id: Iefab05c077367f272abf545036b853e8a295c8cd
Test: build with WITH_TIDY=1
2016-07-27 10:19:47 -07:00
Jonathan Hamilton
0cc7e28ffd Merge "Keep ADF device alive for the lifetime of the minui backend" am: 14352497f0
am: 32c2e78726

* commit '32c2e78726fe9c7cdc927c8435352b2f8e824735':
  Keep ADF device alive for the lifetime of the minui backend

Change-Id: If28a4b4c7098f1a5fcf8e46e03d0df575fc68fce
2016-05-12 17:36:44 +00:00
Jonathan Hamilton
bab6e492ef Keep ADF device alive for the lifetime of the minui backend
Some ADF drivers do some amount of state cleanup when the ADF device
node is closed, making and attempts to draw using it fail.

This changes the minui ADF backend to keep the adf_device open until it
is exited, fixing issues on such devices.
2016-05-05 15:30:57 -07:00
Tianjie Xu
45609d37ef Merge "Fix matches_locale function" into nyc-dev
am: 8b86373

* commit '8b86373fd954276b18a6fba81afbe42c9caa49d3':
  Fix matches_locale function

Change-Id: If7726c2f381ba0e4ab0519b77c167e75a9d46104
2016-04-20 22:12:11 +00:00