Commit Graph

7307 Commits

Author SHA1 Message Date
Tianjie Xu e633849dc9 Merge "ImageGenerator: ignore the duplicate locales" am: 7846823125 am: af36438170
am: f502a8c979

Change-Id: I9768e7f3ced5464feea8cfac6f2e16d646de0a31
2018-11-30 20:29:20 -08:00
Tianjie Xu f502a8c979 Merge "ImageGenerator: ignore the duplicate locales" am: 7846823125
am: af36438170

Change-Id: Idc119188727a1e261d8238db994389597c25635e
2018-11-30 20:19:45 -08:00
Tianjie Xu af36438170 Merge "ImageGenerator: ignore the duplicate locales"
am: 7846823125

Change-Id: I8a50e53fa5da77f264bc45fcbe51f9f0308b3e3d
2018-11-30 20:15:13 -08:00
Tianjie Xu 7846823125 Merge "ImageGenerator: ignore the duplicate locales" 2018-12-01 03:56:10 +00:00
Yifan Hong 07add44f94 Merge "SYSTEM_ROOT -> get_system_root" am: cbfeb7f6af am: fe00ae099c
am: 0a53c37bce

Change-Id: If663408b4bcae5113403cbf06fe0d076bbc510f3
2018-11-30 14:45:09 -08:00
Yifan Hong 0a53c37bce Merge "SYSTEM_ROOT -> get_system_root" am: cbfeb7f6af
am: fe00ae099c

Change-Id: I2def1cab9b23061e62c263dd14c5f1061b0d74d8
2018-11-30 14:38:41 -08:00
Yifan Hong fe00ae099c Merge "SYSTEM_ROOT -> get_system_root"
am: cbfeb7f6af

Change-Id: I3ac20643f620bcf469509241b17a02f9343efa20
2018-11-30 14:31:35 -08:00
Yifan Hong cbfeb7f6af Merge "SYSTEM_ROOT -> get_system_root" 2018-11-30 22:07:24 +00:00
Tom Cherry 319a6fe190 Merge "Update for long long -> off64_t for fstab.length" am: 1f66578d6f am: 21197a7f2b
am: 80dbb1d979

Change-Id: Ibcd8149344937845e3a43a301f72fc44643910a6
2018-11-30 09:05:42 -08:00
Tom Cherry 80dbb1d979 Merge "Update for long long -> off64_t for fstab.length" am: 1f66578d6f
am: 21197a7f2b

Change-Id: I70bc51263711a1bd810c7347c5817d0cd1695b18
2018-11-30 09:01:41 -08:00
Tom Cherry 21197a7f2b Merge "Update for long long -> off64_t for fstab.length"
am: 1f66578d6f

Change-Id: I0f9f5ba577a129b9c31f9cb409d95282638227db
2018-11-30 08:57:37 -08:00
Tom Cherry 1f66578d6f Merge "Update for long long -> off64_t for fstab.length" 2018-11-30 16:33:54 +00:00
Tom Cherry 45e505a4e9 Update for long long -> off64_t for fstab.length
Test: boot
Change-Id: I755a5dd48f1d5be2cbd8e494b9c405674b12cebb
2018-11-29 13:33:07 -08:00
xunchang a48f00a5e8 ImageGenerator: ignore the duplicate locales
Some language variants have the duplicated translations. Therefore,
we can compare the translated string for each locale to the default
text string for that language. And the duplicated ones will be skipped
to save some space.

Bug: 74397117
Test: generate and check the image
Change-Id: If51fa8fe700350c06f084f0e74d3698b82d6f177
2018-11-29 12:13:02 -08:00
Tianjie Xu b1cba43877 Merge "ImageGenerator: Handle special characters in xml files" am: 697003dbce am: f2099b7872
am: 2a0f71627e

Change-Id: I27f54dd877eab5be5ea8170e2923cf8de7fe97a4
2018-11-29 11:00:37 -08:00
Tianjie Xu 2a0f71627e Merge "ImageGenerator: Handle special characters in xml files" am: 697003dbce
am: f2099b7872

Change-Id: Ia0b812f6441a712bde8441c742b7777948366042
2018-11-29 10:51:16 -08:00
Tianjie Xu f2099b7872 Merge "ImageGenerator: Handle special characters in xml files"
am: 697003dbce

Change-Id: Iee0eecaa259235f9546db3ca34e557b945ee3c5b
2018-11-29 10:46:08 -08:00
Tianjie Xu 697003dbce Merge "ImageGenerator: Handle special characters in xml files" 2018-11-29 18:28:44 +00:00
xunchang 1eeee45a7d ImageGenerator: Handle special characters in xml files
In specific, the apostrophe appears as "\'"; and a new line appears as
"\n\n". We need to handle these two cases accordingly.

Bug: 74397117
Test: generate and check the image
Change-Id: I67b1ebce7494e4a685a0c7334da58dc6df2ccb29
2018-11-29 18:28:13 +00:00
Tianjie Xu 10f1a2fd59 Merge "ImageGenerator: switch to BreakIterator from icu library" am: 86936c46a8 am: 49ba6fc534
am: 64cedfe780

Change-Id: Ic060275927516ce6df2902e6bd88c659376274cc
2018-11-28 10:53:57 -08:00
Tianjie Xu 64cedfe780 Merge "ImageGenerator: switch to BreakIterator from icu library" am: 86936c46a8
am: 49ba6fc534

Change-Id: I0c1e4302815e271d2262ca2d1807f3fb57c3a589
2018-11-28 10:50:35 -08:00
Tianjie Xu 49ba6fc534 Merge "ImageGenerator: switch to BreakIterator from icu library"
am: 86936c46a8

Change-Id: Ic21c9505c8a8a4509fecc2a96635e9f5014e134a
2018-11-28 10:46:18 -08:00
Tianjie Xu 86936c46a8 Merge "ImageGenerator: switch to BreakIterator from icu library" 2018-11-28 18:27:58 +00:00
Jaegeuk Kim 349d7052b8 Merge "make_f2fs: use -g android by default" am: 4cd38430d7 am: f8c230a072
am: 6d43d2be43

Change-Id: Ieb3dc4d30c279ea835f8b18f058dbf118b24fb80
2018-11-27 17:26:01 -08:00
Tao Bao a2193c31c5 Merge "Update README.md." am: c075d688fd am: 096d3205b4
am: 0658beb8f7

Change-Id: Iad775f04b26a8a88ceb5b5048d54a75ef263d76c
2018-11-27 17:25:37 -08:00
Jaegeuk Kim 6d43d2be43 Merge "make_f2fs: use -g android by default" am: 4cd38430d7
am: f8c230a072

Change-Id: I8b973ffc6a10ab47dc8135d809af79c5419fe52b
2018-11-27 17:17:45 -08:00
Tao Bao 0658beb8f7 Merge "Update README.md." am: c075d688fd
am: 096d3205b4

Change-Id: I1c3af2cb2a368037b82fb2f92f3c9caa262ce464
2018-11-27 17:14:35 -08:00
Jaegeuk Kim f8c230a072 Merge "make_f2fs: use -g android by default"
am: 4cd38430d7

Change-Id: Id85e7c286e88c4b543df91df95a19d69fb66835a
2018-11-27 17:13:59 -08:00
Tao Bao 096d3205b4 Merge "Update README.md."
am: c075d688fd

Change-Id: Ic0b46e5337e759d02b7251b36e5cf5e05437c433
2018-11-27 17:10:35 -08:00
Jaegeuk Kim 4cd38430d7 Merge "make_f2fs: use -g android by default" 2018-11-28 00:57:25 +00:00
Treehugger Robot c075d688fd Merge "Update README.md." 2018-11-28 00:50:44 +00:00
Yifan Hong 4932780606 SYSTEM_ROOT -> get_system_root
Add a get_system_root() function in roots.cpp
which returns / or /system based on fstab.
This factors out the 'if' check from recovery.cpp
and fsck_unshare_blocks.cpp.

Test: boot recovery, mount system
Bug: 118634720
Change-Id: If4947cba3a3f08dbe695fd2b50a9354cd302ee03
2018-11-27 15:57:47 -08:00
Tao Bao 8440d02d6d Merge "minui: GRSurface::Create() computes data_size on its own." am: a54b883607 am: 67a57dbed0
am: 942d09a99e

Change-Id: Ia2e74dfb7c188a384d3449320ce9c9ba36f539c0
2018-11-27 15:47:50 -08:00
Tao Bao 942d09a99e Merge "minui: GRSurface::Create() computes data_size on its own." am: a54b883607
am: 67a57dbed0

Change-Id: I0bb4b560e5ea746f1dc7f747eb9031429d2313c2
2018-11-27 15:43:46 -08:00
Tao Bao 67a57dbed0 Merge "minui: GRSurface::Create() computes data_size on its own."
am: a54b883607

Change-Id: Ied588a37611a94ea3ea76da7fc1284078fd97845
2018-11-27 15:39:44 -08:00
Tao Bao a54b883607 Merge "minui: GRSurface::Create() computes data_size on its own." 2018-11-27 23:21:50 +00:00
xunchang acacc9d30f ImageGenerator: switch to BreakIterator from icu library
The icu library takes care of the line boundary, so that we don't need
to worry about if the given language is logogram.

Bug: 74397117
Test: Generate and check the image
Change-Id: I1447f51b178c0fca83c5497d2f5b8e4009ca7f64
2018-11-27 15:11:04 -08:00
Tao Bao 2abb9fdc54 Update README.md.
The `ResourceTest` mentioned in the doc has been moved into
recovery_component_test in commit
6b28f05c5b.

Since Q, `/sbin/adbd` has been relocated to `/system/bin/adbd`. And `adb
shell` no longer requires mounting /system first, because
`/system/bin/sh` has been included in recovery image.

Test: N/A
Change-Id: I72029a6c8bfaac7a17c0a526a3c511de19356baa
2018-11-27 13:47:13 -08:00
Tao Bao dd78982d58 minui: GRSurface::Create() computes data_size on its own.
GRSurface::Create() doesn't need to rely on caller specifying the buffer
size, as it can compute that info based on the given args.

This CL also uses `size_t` for all the parameters in
GRSurface::Create().

Test: Run recovery_unit_test on marlin.
Test: Build and boot into blueline recovery. `Run graphics test`.
Test: Build and boot into blueline charger mode.
Change-Id: Idec9381079196abf13553a475006fefcfca10950
2018-11-26 22:46:19 -08:00
Tao Bao b5c278a86e Merge "minui: Fix a wrong arg in calling GRSurface::Create()." am: ea4ec3149b am: 1166fd1855
am: 16c681c129

Change-Id: I3a1bad9878cb0b318eb963734e11223511273526
2018-11-26 21:21:09 -08:00
Tao Bao 16c681c129 Merge "minui: Fix a wrong arg in calling GRSurface::Create()." am: ea4ec3149b
am: 1166fd1855

Change-Id: I1e92463de46d3bd337c9f5a42b3f205a485b31e0
2018-11-26 21:14:02 -08:00
Tao Bao 1166fd1855 Merge "minui: Fix a wrong arg in calling GRSurface::Create()."
am: ea4ec3149b

Change-Id: Ic593ecc63dd840ae2927420d60158f0dbf0ecbb2
2018-11-26 21:05:55 -08:00
Tao Bao ea4ec3149b Merge "minui: Fix a wrong arg in calling GRSurface::Create()." 2018-11-27 04:52:56 +00:00
Tao Bao 2201d08f8d minui: Fix a wrong arg in calling GRSurface::Create().
This is a bug introduced while refactoring init_display_surface(), in
[1]. As a result, user of res_create_multi_display_surface(), which is
effectively `charger` right now, crashes due to buffer overrun.

This CL fixes the wrong arg and adds a sanity test for
res_create_multi_display_surface(). The testdata (battery_scale.png) is
copied from system/core/healthd/images/battery_scale.png.

[1] commit 44820ac1e3.

Bug: 119122296
Test: Run recovery_unit_test on marlin.
Test: Build and boot into charger mode on blueline. Verify that
      `charger` no longer crashes.
Change-Id: Ib6d083e1512a9c3c6eb63874d26d22658921d693
2018-11-26 17:06:53 -08:00
Tianjie Xu e4f1dd1063 Merge changes I7b7cee68,I07d22c0d am: fb8a636a2d am: 5e789287d4
am: f07a897bf2

Change-Id: I7168187a3fd9555def54b2278af27ac55360d8c1
2018-11-26 14:24:06 -08:00
Tianjie Xu f07a897bf2 Merge changes I7b7cee68,I07d22c0d am: fb8a636a2d
am: 5e789287d4

Change-Id: Ibf6bf05090a70fa49636c5d517df309736f1f3d1
2018-11-26 14:20:05 -08:00
Tianjie Xu 5e789287d4 Merge changes I7b7cee68,I07d22c0d
am: fb8a636a2d

Change-Id: I859acad650b34e6038034ecd8dd42d899eb40281
2018-11-26 14:15:08 -08:00
Tianjie Xu fb8a636a2d Merge changes I7b7cee68,I07d22c0d
* changes:
  ImageGenerator: add an option to specify the supported locales
  Handle rendering problem for the word "Android" and punctuations
2018-11-26 22:03:29 +00:00
Tianjie Xu 7b636b64a1 ImageGenerator: add an option to specify the supported locales
A smaller list of locales helps to reduce the size of the generated
images; and mitigate the additional space requirement on the tight boot
image for some devices. The caller of the program will be responsible
for providing the locale list.

Also add a verbose option and switch to logger.

Bug: 74397117
Test: generate and check the image
Change-Id: I7b7cee681ccdc6e13fdd0575cf02f8add2ad9a2d
2018-11-26 10:44:24 -08:00
Tianjie Xu 542c617883 Handle rendering problem for the word "Android" and punctuations
The word "Android" is not translated. As a result, some locales fail to
render this word and some punctuations, leading to holes in the middle
of the text. In these cases, we will need to fall back to the default font
and re-measure the text width.

For now, we haven't handled the mix of latin and logogram languages; and
we can blacklist the problematic ones first.

Bug: 74397117
Test: generate and inspect the image
Change-Id: I07d22c0dae2e31eb74f2954e354cd39a42c22f14
2018-11-26 10:44:24 -08:00