Commit graph

177 commits

Author SHA1 Message Date
Tianjie
6450acf032 Add doc for image_generator
Bug: 143630837
Test: check preview
Change-Id: I3b7ca52e2a13685a523901092df79b039e2ad96c
2020-12-20 20:00:30 -08:00
Marek Z Jeziorek
b84e81b253 Update Indic scripts
Bug: 175510263

Test: Manual
Test: https://en.wikipedia.org/wiki/Bengali_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Devanagari_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Gujarati_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Gurmukhi_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Kannada_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Malayalam_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Sinhala_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Tamil_(Unicode_block)
Test: https://en.wikipedia.org/wiki/Telugu_(Unicode_block)
Test: http://www.unicode.org/udhr/d/udhr_ben.html
Test: http://www.unicode.org/udhr/d/udhr_hin.html
Test: http://www.unicode.org/udhr/d/udhr_guj.html
Test: http://unicode.org/udhr/d/udhr_pan.html
Test: http://www.unicode.org/udhr/d/udhr_kan.html
Test: http://www.unicode.org/udhr/d/udhr_mal.html
Test: https://www.unicode.org/udhr/d/udhr_sin.html
Test: http://www.unicode.org/udhr/d/udhr_tam.html
Test: http://www.unicode.org/udhr/d/udhr_tel.html
Change-Id: I60c435f5c45595ed73df2ac4a9f688725f7aad07
2020-12-14 02:44:28 +00:00
Bill Yi
b1b27d1113 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic32d018d3999147ef0a9ef625006cf069e46bc74
2020-12-03 19:27:57 -08:00
Bill Yi
a501d0b39a Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I01a663c6f8cb274551e120936bce5ae19866d24b
2020-11-10 13:45:48 +00:00
Marek Z Jeziorek
16f267d632 Update Ethiopic fonts to a variable format am: 29f1fba107
Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/12678535

Change-Id: Ic3e7ae2cc7c944ac6aaf5d0a7f7215eb5f579a4f
2020-09-25 21:23:32 +00:00
Marek Z Jeziorek
29f1fba107 Update Ethiopic fonts to a variable format
Bug: 169374341

Test: All tests below are manual.
Test: 0. Open a reference device with an existing set of fonts
Test: 1. Upload new fonts.xml and the new fonts to a test device
Test: 2. Change language to Ethiopic on both devices
Test: 3. Open settings on both devices and visually compare them (they
should be the same)
Test: 4. Open the following pages on the test device (and on a reference
device):
Test:  https://en.wikipedia.org/wiki/Ethiopic_(Unicode_block)
Test:  https://unicode.org/udhr/d/udhr_amh.html
Test:  https://www.wordproject.org/bibles/verses/amharic/26_peace.htm
Test:  ... and visually compare them (they should be the same)
Test: to look at recovery `adb reboot recovery`, then use the button to select graphic test.

Change-Id: I1a7e92cfd580bdb122c1038538afb007bfcf780f
2020-09-25 01:52:07 +00:00
TreeHugger Robot
e147f93df6 Merge "Update Armenian fonts to a variable format" am: e6c342aad5
Original change: https://googleplex-android-review.googlesource.com/c/platform/bootable/recovery/+/12602470

Change-Id: I80fb17c79fefa6b36eac82170d1b65e341c2fbcf
2020-09-19 02:26:44 +00:00
Marek Z Jeziorek
c6820e1c20 Update Armenian fonts to a variable format
Bug: 168657713

Test: All tests below are manual.
Test: 0. Open a reference device with an existing set of fonts
Test: 1. Upload new fonts.xml and the new fonts to a test device
Test: 2. Change language to Armenian on both devices (look for Հայերեն
or similar)
Test: 3. Open settings on both devices and visually compare them (they
should be the same)
Test: 4. Open the following pages on the test device (and on a reference
device):
Test:  https://en.wikipedia.org/wiki/Armenian_(Unicode_block)
Test:  https://unicode.org/udhr/d/udhr_hye.html
Test:
https://hy.wikipedia.org/wiki/%D5%80%D5%A1%D5%B5%D5%A5%D6%80%D5%A5%D5%B6
Test:  ... and visually compare them (they should be the same)

Change-Id: If95a0f26fb46c030a7f50bd001474bd9a1a103bc
2020-09-16 00:01:32 +00:00
Bill Yi
345b9ccd20 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Idd40506426de42081a35dd176b4861426ee1e8c0
2020-07-16 23:38:38 -07:00
Bill Yi
37304af78d Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: Ibe3f73243852bfbf10bcdfea4f8dcca4a10233dc
2020-03-03 05:43:38 -08:00
Marek Z Jeziorek
cbb0b54b12 New priority scripts + critical updates to fonts.
Author: Marek Z. Jeziorek <marekj@google.com>

Needs to be submitted with
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/10280447

BUGANIZER BUGS Addressed
========================
BUG: 149257053

CHANGES
=======
Remove font files no longer required
deleted:    other/NotoSansAdlam-Regular.ttf
deleted:    other/NotoSansGeorgian-Bold.otf
deleted:    other/NotoSansGeorgian-Medium.otf
deleted:    other/NotoSansGeorgian-Regular.otf
deleted:    other/NotoSansJavanese-Regular.ttf
deleted:    other/NotoSansTifinagh-Regular.ttf
deleted:    other/NotoSerifGeorgian-Bold.otf
deleted:    other/NotoSerifGeorgian-Regular.otf

modified:   fonts.mk
modified:   other/Android.bp

Replacements for the above deleted files:
new file:   other/NotoSansAdlam-VF.ttf
new file:   other/NotoSansGeorgian-VF.ttf
new file:   other/NotoSansJavanese-Regular.otf
new file:   other/NotoSansTifinagh-Regular.otf
new file:   other/NotoSerifGeorgian-VF.ttf

New additions to Android fonts (living/revival languages):
new file:   other/NotoSansGunjalaGondi-Regular.otf
new file:   other/NotoSansHanifiRohingya-Regular.otf
new file:   other/NotoSansKhojki-Regular.otf
new file:   other/NotoSansMasaramGondi-Regular.otf
new file:   other/NotoSansWancho-Regular.otf
new file:   other/NotoSansWarangCiti-Regular.otf

Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi
https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya
https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi
https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi
https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED

Change-Id: I41e030b63f83ec243ae6f174c061faa5298bd6dc
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
(cherry picked from commit f165b9c886)
2020-02-28 14:33:58 +00:00
Marek Jeziorek
8845e4d701 Revert^2 "New priority scripts + critical updates to fonts."
After https://googleplex-android-review.git.corp.google.com/q/I403a72608ad3a1034e52a51b73871e08cf6283a4
merger this change should be fine.

d7e0920489

Change-Id: Ifa8fcc16ed5f3c10c0f9a6605e02f1ff9bddcf31
2020-02-26 16:56:00 +00:00
Yi-Ling Chuang
d7e0920489 Revert "New priority scripts + critical updates to fonts."
Revert "New priority scripts + critical updates to fonts."

Revert submission 10387937-system_fonts_update

Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=sdk_phone_armv7-sdk&lkgb=6229266&lkbb=6230292&fkbb=6229328, bug b/150095308
Reverted Changes:
I41e030b63:New priority scripts + critical updates to fonts.
I030e650b8:New priority scripts + critical updates to fonts.
I86d46f4b6:New priority scripts + critical updates to fonts.

Change-Id: I1ea1fd8314fae95ad7ec07d41b3ff55ef2e0333e
2020-02-24 01:43:09 +00:00
Marek Z Jeziorek
f165b9c886 New priority scripts + critical updates to fonts.
Author: Marek Z. Jeziorek <marekj@google.com>

Needs to be submitted with
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/10280447

BUGANIZER BUGS Addressed
========================
BUG: 111550750
BUG: 139104208
BUG: 148752969
BUG: 148752946

CHANGES
=======
Remove font files no longer required
deleted:    other/NotoSansAdlam-Regular.ttf
deleted:    other/NotoSansGeorgian-Bold.otf
deleted:    other/NotoSansGeorgian-Medium.otf
deleted:    other/NotoSansGeorgian-Regular.otf
deleted:    other/NotoSansJavanese-Regular.ttf
deleted:    other/NotoSansTifinagh-Regular.ttf
deleted:    other/NotoSerifGeorgian-Bold.otf
deleted:    other/NotoSerifGeorgian-Regular.otf

modified:   fonts.mk
modified:   other/Android.bp

Replacements for the above deleted files:
new file:   other/NotoSansAdlam-VF.ttf
new file:   other/NotoSansGeorgian-VF.ttf
new file:   other/NotoSansJavanese-Regular.otf
new file:   other/NotoSansTifinagh-Regular.otf
new file:   other/NotoSerifGeorgian-VF.ttf

New additions to Android fonts (living/revival languages):
new file:   other/NotoSansGunjalaGondi-Regular.otf
new file:   other/NotoSansHanifiRohingya-Regular.otf
new file:   other/NotoSansKhojki-Regular.otf
new file:   other/NotoSansMasaramGondi-Regular.otf
new file:   other/NotoSansWancho-Regular.otf
new file:   other/NotoSansWarangCiti-Regular.otf

Test: ===================================================
Test: on Android (click on a link within a browser):
Test: Adlam https://en.wikipedia.org/wiki/Adlam_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_(Unicode_block)
Test: Georgian https://en.wikipedia.org/wiki/Georgian_Extended
Test: Gunjala Gondi
https://en.wikipedia.org/wiki/Gunjala_Gondi_(Unicode_block)
Test: Hanifi Rohingya
https://en.wikipedia.org/wiki/Hanifi_Rohingya_(Unicode_block)
Test: Javanese https://en.wikipedia.org/wiki/Javanese_(Unicode_block)
Test: Khojki https://en.wikipedia.org/wiki/Khojki_(Unicode_block)
Test: Masaram Gondi
https://en.wikipedia.org/wiki/Masaram_Gondi_(Unicode_block)
Test: Tifinagh https://en.wikipedia.org/wiki/Tifinagh_(Unicode_block)
Test: Wancho https://en.wikipedia.org/wiki/Wancho_(Unicode_block)
Test: Warang Citi
https://en.wikipedia.org/wiki/Warang_Citi_(Unicode_block)
Test: ===================================================
Test: on Android (click on a link within a browser):
Test: udhr Adlam https://unicode.org/udhr/d/udhr_fuf_adlm.html
Test: udhr Georgian https://unicode.org/udhr/d/udhr_kat.html
Test: udhr Gunjala Gondi NA (Not Available)
Test: udhr Hanifi Rohingya NA (Not Available)
Test: udhr Javanese https://unicode.org/udhr/d/udhr_jav_java.html
Test: udhr Khojki NA (Not Available)
Test: udhr Masaram Gondi NA (Not Available)
Test: udhr Tifinagh https://unicode.org/udhr/d/udhr_tzm_tfng.html
Test: udhr Wancho NA (Not Available)
Test: udhr Warang Citi NA (Not Available)
Test: ===================================
Test: on Android (comparing two systems - before/after)
Test: Georgian: Systems settings menus compared side by side
Test: ===================================
Test: on Mac (comparing the existing Android fonts with the new font
Test: using diffenator - https://github.com/googlefonts/fontdiffenator)
Test: ===================================
Test: SansAdlam-VF: VALIDATED
Test: SansGeorgian-VF: VALIDATED
Test: SansGunjalaGondi: NEW (No Applicable)
Test: SansHanifiRohingya: NEW (No Applicable)
Test: SansJavanese: VALIDATED
Test: SansKhojki: NEW (No Applicable)
Test: SansMasaramGondi: NEW (No Applicable)
Test: SansTifinagh: VALIDATED
Test: SansWancho: NEW (No Applicable)
Test: SansWarangCiti: NEW (No Applicable)
Test: SerifGeorgian-VF: VALIDATED

Change-Id: I41e030b63f83ec243ae6f174c061faa5298bd6dc
Signed-off-by: Marek Z Jeziorek <marekj@google.com>
2020-02-22 21:43:12 +00:00
Bill Yi
f5fab11115 Import translations. DO NOT MERGE
Change-Id: I6b85744c59986965ca016e613974661568b0d182
Auto-generated-cl: translation import
2020-02-18 06:57:16 -08:00
Bill Yi
2b9be1f4e3 Import translations. DO NOT MERGE
Change-Id: Id8dd55dd5f36191402ba7f6b44e107f205fbf484
Auto-generated-cl: translation import
2020-01-29 15:36:57 -08:00
Bill Yi
23f15ec2f2 Import translations. DO NOT MERGE
Change-Id: Ie0e80dec4c698c6c6fbf5edd7a434bdcad975951
Auto-generated-cl: translation import
2020-01-21 09:03:54 -08:00
Paul Duffin
334fd5f2b1 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" am: 14bc5e1feb am: af4d1dda03 am: 2f8626c3f7
am: 8b733c3e84

Change-Id: I2377549c690dd10572f828457f44522b3951f77b
2019-06-04 03:02:00 -07:00
Paul Duffin
2f8626c3f7 Merge "Use icu4j instead of its deprecated legacy alias icu4j-host" am: 14bc5e1feb
am: af4d1dda03

Change-Id: I4e11f19fa992ea7b8cc23437a041edf709356d39
2019-06-04 02:44:46 -07:00
Paul Duffin
eb586b7baf Use icu4j instead of its deprecated legacy alias icu4j-host
Bug: 134379140
Test: m droid
Change-Id: I71c2ac392361b3c6dfa693194c05116422335e55
2019-06-03 16:14:35 +01:00
Bill Yi
84efc1ba7d Import translations. DO NOT MERGE
Change-Id: Ia35cdac295a1ce6f8b53638c908c0caf2a97477c
Auto-generated-cl: translation import
2019-05-09 17:26:20 -07:00
Bill Yi
79c5fb32e8 Import translations. DO NOT MERGE
Change-Id: I87585a82fccf625bc05c5805fc90459d572cee10
Auto-generated-cl: translation import
2019-04-11 16:52:41 -07:00
Bill Yi
5954a237cb Import translations. DO NOT MERGE
Change-Id: I6aff7f01df0c28775a2dbef26ee3476cb5d83060
Auto-generated-cl: translation import
2019-04-08 09:53:18 -07:00
Bill Yi
25bfb1bea9 Import translations. DO NOT MERGE
Change-Id: Id46b7b2d7bf8f9fe1edd9bb90cc0e3d279f3472c
Auto-generated-cl: translation import
2019-02-01 21:22:54 -08:00
Bill Yi
00ab5cd4f7 Import translations. DO NOT MERGE
Change-Id: I1bd6d7f12c7bfffb7e022f09347a5be5a96766a3
Cherry-picked from: f560a89470
Test: mma
Auto-generated-cl: translation import
2018-12-11 12:30:44 -08:00
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
af36438170 Merge "ImageGenerator: ignore the duplicate locales"
am: 7846823125

Change-Id: I8a50e53fa5da77f264bc45fcbe51f9f0308b3e3d
2018-11-30 20:15:13 -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
f2099b7872 Merge "ImageGenerator: Handle special characters in xml files"
am: 697003dbce

Change-Id: Iee0eecaa259235f9546db3ca34e557b945ee3c5b
2018-11-29 10:46:08 -08: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
49ba6fc534 Merge "ImageGenerator: switch to BreakIterator from icu library"
am: 86936c46a8

Change-Id: Ic21c9505c8a8a4509fecc2a96635e9f5014e134a
2018-11-28 10:46:18 -08: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
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
5e789287d4 Merge changes I7b7cee68,I07d22c0d
am: fb8a636a2d

Change-Id: I859acad650b34e6038034ecd8dd42d899eb40281
2018-11-26 14:15:08 -08: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
Tianjie Xu
2ae9ad72c2 Merge "Delete the dumpkey host tool" am: 14d5540426 am: 74fa7cd1d9
am: 8f11e2a18c

Change-Id: Ief116f7789a735281ab8011f23c2bc71a8b04659
2018-11-20 18:19:32 -08:00
Tianjie Xu
74fa7cd1d9 Merge "Delete the dumpkey host tool"
am: 14d5540426

Change-Id: Ie3be5a201b8ef98ce936e9f0904c72667fa21dc0
2018-11-20 18:13:40 -08:00
Tianjie Xu
14d5540426 Merge "Delete the dumpkey host tool" 2018-11-21 01:45:39 +00:00
Bill Yi
967d4ac73c Import translations. DO NOT MERGE
Change-Id: I1bd6d7f12c7bfffb7e022f09347a5be5a96766a3
Auto-generated-cl: translation import
2018-11-15 16:16:39 -08:00
Tianjie Xu
bf21f1eaea Merge "Adjust the background text image width to reduce its size" am: 4ef9cb27eb am: f565ebb45f
am: 4850d463a5

Change-Id: I9d6feaa2fcb604aadcfb45666443f9a181e5586c
2018-11-14 22:13:55 -08:00
Tianjie Xu
b8564e1093 Adjust the background text image width to reduce its size
We can adjust the image width with respect to the maximum width of the
wrapped text. This will remove some black margins and reduce the final
size of the images, especially for those with short strings, e.g.
"recovery_error".

Also, add an option to centrally align the text; and fix a boundary
check in the recovery resource test.

Bug: 74397117
Test: Generate and check the image
Change-Id: Ib6cf61a9c99c4aeede16751dc0adfa23ce3f5424
2018-11-15 00:33:14 +00:00
Tianjie Xu
2138b28e3c Merge "image generator: format the java file" am: 860c82a66b am: 5faf4021c9
am: 77e1e5c2a4

Change-Id: I2e7c7b133e35799620a57a24d93e75f8f956c3f5
2018-11-14 13:05:31 -08:00
Tianjie Xu
b97f7e5343 image generator: format the java file
Format the file with google-java-format --aosp. This makes the presubmit
hook happy.

Bug: 74397117
Test: mma
Change-Id: Ie342ed11449414b63f2d1ae781023e940b136bcb
2018-11-13 20:29:16 +00:00
Bill Yi
f560a89470 Import translations. DO NOT MERGE
Change-Id: I1bd6d7f12c7bfffb7e022f09347a5be5a96766a3
Auto-generated-cl: translation import
2018-11-13 08:09:37 -08:00
Tao Bao
cf2a142c43 Merge changes If24c6b7c,I381b0103 am: 67b7e64034 am: aeda63b106
am: afad7170bb

Change-Id: I1f715c5de7c19514c5f9b5d62014bcf5ddb80598
2018-11-06 14:23:30 -08:00
Tao Bao
529bb742b7 image_generator: Fix the warnings on import order.
[platform/bootable/recovery] tools/image_generator/ImageGenerator.java:36: Wrong order for java.util.StringTokenizer import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS:
[platform/bootable/recovery] tools/image_generator/ImageGenerator.java:43: Wrong order for org.apache.commons.cli.CommandLine import. Use Ctrl+Shift+O (Eclipse) or Ctrl+Alt+O (Intellij) to sort imports. https://source.android.com/setup/code-style#order-import-statementsERRORS:
[platform/bootable/recovery] tools/image_generator/ImageGenerator.java:50: Extra separation in import group before 'org.w3c.dom.Document'

Test: `mmma -j bootable/recovery`
Test: `repo upload` no longer gives warnings.
Change-Id: If24c6b7ca33b9223b3e326a48885c24c35b5fa68
2018-11-06 11:34:31 -08:00
Tianjie Xu
59d0c1df0a Merge "Make the text image readable under recovery" am: d84922216c am: d50aa4f4ee
am: 69067f1946

Change-Id: I3ed6dc0ce70a8b859bd703cd7a322ee899f8e647
2018-11-04 23:06:54 -08:00
Tianjie Xu
22dd019aa5 Make the text image readable under recovery
Encode the width, height and locale of the localized image as pixels so
that recovery can locate the correct range of the image from a
concatenated png file.

Also address a few todoes including wrapping the CJK text, making a
catch-all type for all languages.

Test: view the generated image under locale test
Change-Id: Icd3997eb4e992e76ef72526787d64c406f606970
2018-11-01 15:57:31 -07:00
Bill Yi
df115ad537 Import translations. DO NOT MERGE
Change-Id: Icfe0dc21567e74da70cc7b2f1229815bceeac958
Auto-generated-cl: translation import
2018-10-30 19:01:50 -07:00
Tianjie Xu
d84d570d8c Merge "Add description for the new translation" 2018-10-30 03:00:47 +00:00
Tianjie Xu
9f843e7751 Add description for the new translation
As we localize the wipe data menu under the recovery mode, some
additional strings need the new translation. The strings include
1. The menu header that prompts a data wipe
2. Try again description
3. Factory reset description
4. The menu header to confirm a data wipe
5. Cancel description

We will resue the "Factory reset description" in the confirmation menu;
and the image_generator tool will be moved to this directory in later
cls.

Bug: 74397117
Test: mma
Change-Id: I706b8677dba506b62e890f6b200e3eb3b11ce483
2018-10-29 14:43:44 -07:00
Tianjie Xu
aeec0b2076 Delete the dumpkey host tool
We used to dump the public key files into some text format; and parse
them under recovery. But now we have switched to read the certificates
directly from the zip files; and there's no caller of this dumpkey host
tool any more.

Bug: 116655889
Test: mma
Change-Id: I115592e2a894b3375495c81cb249d1bed1a5d973
2018-10-29 11:14:09 -07:00
Tianjie Xu
edfeb97f9f Switch to use commandline parser
The commandline parser adds some flexibility to the argument parsing. It
also makes the help message more descriptive.

Bug: 74397117
Test: generate a image, checks the help message
Change-Id: Ib238658a9a6fa8806f1b0dde419c8fb970e7cb37
2018-10-29 11:01:36 -07:00
Tianjie Xu
721f6792b4 Use a host java program to generate the background text
This program uses java.awt.Graphics2D to generate the background text
files used under recovery mode. And thus we don't need to do the manual
work by running emulators with different dpi.

The program takes the following parameters:
1. imageWidth: The number of pixels per line; and the text strings will be
   wrapped accordingly.
2. textName: The description of the text string, e.g. "recovery_erasing",
   "recovery_installing_security"
3. fontDirectory: The directory that contains all the support .ttf | .ttc
   files, e.g. $OUT/system/fonts/
4. resourceDirectory: The resource directory that contains all the translated
   strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/
5. outputFilename: Path to the generated image.

Bug: 74397117
Test: checks the generated png files
Change-Id: Ia5506a0a4f5da1ebfd7090345eb246f44b265075
2018-10-12 15:46:32 -07:00
Tao Bao
f91fdfb3fc Merge "tools: Move to Soong." am: 6b16093b29
am: 9016deefe4

Change-Id: I1c8b1dd470279e3e5b8ca15c76dfe09691257bd6
2018-05-29 11:09:10 -07:00
Tao Bao
e462cdffe9 tools: Move to Soong.
Test: `mmma -j bootable/recovery/`
Test: Build and run RecoveryLocalizer on device.
Change-Id: I3359223c82bd670c94ad51296cb8b357b04f5349
2018-05-17 13:10:08 -07:00
Bill Yi
0bfea531d8 Import translations. DO NOT MERGE
Change-Id: I60c4e4ebce0bf3abcc2b0b5ab90b0fc5e9406c34
Auto-generated-cl: translation import
2018-02-21 17:03:26 -08:00
hansson
a7df318913 Merge "Set LOCAL_SDK_VERSION where possible." am: bf52b7e00b am: cd06b1696d
am: b1ac1b8494

Change-Id: Id51803759530a630ecfb287126c5e366938ad09f
2018-02-21 17:47:02 +00:00
hansson
b1ac1b8494 Merge "Set LOCAL_SDK_VERSION where possible." am: bf52b7e00b
am: cd06b1696d

Change-Id: I78bbe2e58b6d7d442984d3533dedbae705cb156f
2018-02-21 17:37:58 +00:00
Anton Hansson
6cc499ae07 Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I82fee834c5d92e699e9571933faded11c6d4596e
2018-02-21 14:11:02 +00:00
Bill Yi
9bc56553dd Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 68003463
Change-Id: Iae8fc3afc1453b6b609dae2bbff08231d00735e7
2017-10-20 01:50:04 -07:00
Bill Yi
4d9bd3798e Import translations. DO NOT MERGE
Change-Id: I8de15b09695dea1a53a368c942cb8a7dd30ed87d
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-13 08:18:22 -07:00
Bill Yi
8f84774a68 Import translations. DO NOT MERGE
Change-Id: If7aad0299a372403f2875fe3aeb60ad07acb7b47
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-09-06 06:24:06 -07:00
Bill Yi
9227a5ecec Import translations. DO NOT MERGE
Change-Id: I0b2ff87788553d2c49519d005f8876cd7318b8c6
Auto-generated-cl: translation import
2017-08-27 11:10:05 -07:00
Bill Yi
7b795abd13 Import translations. DO NOT MERGE
Change-Id: I8fb3f973ecd0dfe54dea048ef445d45902eae028
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-23 19:34:04 -07:00
Bill Yi
e332c5ad0e Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64680434
Change-Id: Ie356071f322238a5fb3a4610d2a79141c9aa9377
2017-08-17 00:34:01 -07:00
Bill Yi
616256e739 Import translations. DO NOT MERGE
Change-Id: I99a2cf060c75a70b3baf3c22d538fbfa08828474
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import
2017-08-12 06:53:13 -07:00
Bill Yi
d07422c448 Import translations. DO NOT MERGE
Change-Id: I90d94072de955eca8ea38762faa5d3e5a4f295db
Auto-generated-cl: translation import
2017-02-27 17:41:01 -08:00
Tianjie Xu
29a89a73c5 Merge "Restore the max width for recovery background texts" am: c1df344381 am: b037cff12e am: f1a371b1b0
am: 281fa9fd30

Change-Id: I109593352d526941895eafea41f87a49561f8fd7
2017-01-23 21:15:15 +00:00
Tianjie Xu
f1a371b1b0 Merge "Restore the max width for recovery background texts" am: c1df344381
am: b037cff12e

Change-Id: I177c4d5edcf8e0ee9874bd1627d0ae12a43ae506
2017-01-23 20:58:06 +00:00
Tianjie Xu
0f7031e295 Restore the max width for recovery background texts
Restore the max width to 900px for xxhdpi and 1200px for xxxhdpi

Bug: 34541299
Test: Checked width and images passed recovery_manual_test
Change-Id: If0fd51f93cfb3f965d4e9e69be5626eba89eb857
2017-01-22 18:46:04 -08:00
Tianjie Xu
86a820cb42 Merge "Update background text images in recovery" am: f0af02fea6 am: 19e4f627d8 am: e05674f93e
am: f92c313723

Change-Id: I36ab3a5d46758ef45854efd16dcf8285166d1dc4
2017-01-13 23:13:38 +00:00
Tianjie Xu
e05674f93e Merge "Update background text images in recovery" am: f0af02fea6
am: 19e4f627d8

Change-Id: Ic16111cc970780090827f3e2851e4df874a5d8cf
2017-01-13 23:09:07 +00:00
Roozbeh Pournader
f23f328513 Rename language+country resources to just language
Bug: 26496609
Test: none
Change-Id: I6467c8496478402614fcdb46c5399dfa28162201
2017-01-10 16:22:48 -08:00
Tianjie Xu
a78b2d2256 Update background text images in recovery
Locale texts are missing in the recovery log due to an extra empty
locale chunk in the png file. Fix the bug in the app and regenerate all
the background texts and compress the file with pngcrush + zopflipng.

Bug: 34054052
Test: Locale texts logged successfully on angler
Change-Id: I89f823a53c1eb69756183e8e11113216d093304f
2017-01-07 00:32:40 +00:00
Bill Yi
0622e407eb Revert "Import translations. DO NOT MERGE"
This reverts commit 6ecd63e459.

Change-Id: I66c34fc72c1e8f6a0c11e12fd7e21864f4437977
2016-12-05 18:46:14 +00:00
Bill Yi
6ecd63e459 Import translations. DO NOT MERGE
Change-Id: Ibe3698aabd36cca6e053ca099b87f09e8ad05c93
Auto-generated-cl: translation import
2016-12-02 23:55:11 -08:00
Bill Yi
9a4ff5a900 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 32177112
Change-Id: I4d68cd0c69b40d1765cd74dfa730f56be01b5b23
2016-11-20 15:25:37 -08:00
Tianjie Xu
a5dd2a452c Merge "Further compress the text images with zopflipng" am: 61240f88ea am: 3e244dc301 am: 5a84cecd26
am: 8b36965175

Change-Id: I6aad408e27e8661a83c6d985d080c0ae8637eec9
2016-08-03 18:11:54 +00:00
Tianjie Xu
5a84cecd26 Merge "Further compress the text images with zopflipng" am: 61240f88ea
am: 3e244dc301

Change-Id: Id651a94190d91c508b55d3745816253160b84284
2016-08-03 18:01:35 +00:00
Tianjie Xu
3e244dc301 Merge "Further compress the text images with zopflipng"
am: 61240f88ea

Change-Id: Ib3b28e84ee331a0e9d613d3761ff4d657c23088d
2016-08-03 17:59:11 +00:00
Tianjie Xu
1123fafd01 Further compress the text images with zopflipng
Bug:30415666
Test: Graphic tests pass on angler with new image files
Change-Id: I8716f53cb2f9fc6598fdc84f84e9626994faaa5e
2016-08-03 10:17:11 -07:00
Tianjie Xu
f136e71f7a Merge \\\\"Add docs on regeneration background text image\\\\" am: 5aa2e104c0 am: b02a58740e am: 698f75467a
am: 0df6011d0f

Change-Id: I9bf3d8a5357811700e7e09aec146eaf1969f6eb9
2016-07-29 00:27:34 +00:00
Tianjie Xu
698f75467a Merge \\"Add docs on regeneration background text image\\" am: 5aa2e104c0
am: b02a58740e

Change-Id: Ib15f443946a97eeb6609b0aab9b91bcd3ca91d4c
2016-07-29 00:12:42 +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
Bill Yi
34e2854786 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 29390361
Change-Id: Ie1d01357ef53bd977da8188825dd744801ae58ad
2016-06-30 19:13:48 -07:00
Bill Yi
e404d76e3a Import translations. DO NOT MERGE
Change-Id: Ic9a498dd7367a61fc2d380dc6eeeea0c4cafc8bf
Auto-generated-cl: translation import
2016-04-26 15:01:57 -07:00
Bill Yi
3470fea07d Import translations. DO NOT MERGE
Change-Id: Ice2fc6151b69ad3a4029184a5afa6020085219f2
Auto-generated-cl: translation import
2016-04-24 20:56:43 -07:00
Elliott Hughes
b7f24f5f87 Merge "Merge "Remove trailing punctuation from recovery strings." into nyc-dev am: 4eec72d am: c15177b" into nyc-mr1-dev-plus-aosp
am: f39da4f

* commit 'f39da4fc1b84c594d95b241d75eec1b25f7d4480':
  Remove trailing punctuation from recovery strings.

Change-Id: I8858b1097b301b612494801cce4c2ad3274823dc
2016-04-20 15:28:09 +00:00
Elliott Hughes
c15177b8b8 Merge "Remove trailing punctuation from recovery strings." into nyc-dev
am: 4eec72d

* commit '4eec72d2cf8c1be0068feffc804035dab756c78d':
  Remove trailing punctuation from recovery strings.

Change-Id: I60cf10d7748227d81f60fc9d1fe18cdb01f8b2f3
2016-04-20 15:21:35 +00:00
Elliott Hughes
ebcdea85e3 Remove trailing punctuation from recovery strings.
Bug: http://b/26548285
Change-Id: I235c620532e1759bfc76a4486409a4404f1c8c6a
2016-04-19 16:17:42 -07:00
Elliott Hughes
c30e7978e5 Explicitly set the font face and color. am: 70ae70b
am: 6fa5fa9

* commit '6fa5fa91bf1439e6c5070f3aee9b447f995882c1':
  Explicitly set the font face and color.

Change-Id: I1b2079d35cb7165db738a8d9ca442fa96729979e
2016-04-15 16:01:01 +00:00
Elliott Hughes
6fa5fa91bf Explicitly set the font face and color.
am: 70ae70b

* commit '70ae70b81e452ce8a85dfbb184786c02a9072c23':
  Explicitly set the font face and color.

Change-Id: I94011b0f4df228e6cdfe4c095542839abb689a74
2016-04-15 15:57:55 +00:00
Elliott Hughes
70ae70b81e Explicitly set the font face and color.
This matches what the UI folks asked us to use.

Also fix the locale parsing code.

Bug: http://b/27837319
Bug: http://b/22465983
Bug: http://b/26548285
Change-Id: I316a6e1f44855313dd983950abf21b543be7ffc0
2016-04-14 17:18:41 -07:00
Bill Yi
53ea95d0c2 Import translations. DO NOT MERGE
Change-Id: Id4a5f32acb01776c95b092cc6e883036812836a9
Auto-generated-cl: translation import
2016-04-06 04:02:16 -07:00
Bill Yi
c1afe830cf Import translations. DO NOT MERGE
Change-Id: Ic643d0e2d39e45d772ffb25001de45afdf923579
Auto-generated-cl: translation import
2016-04-05 11:13:59 -07:00