Commit c48af9db authored by Trevor Perrier's avatar Trevor Perrier Committed by Commit Bot

[android] include all locales in resource packing bundles

This CL makes it so that all locales are used during resource_packaging
for bundle builds.

It is a reland of: https://crrev.com/c/2024159 which included the new
locales on APK builds and was reverted.

Before this change all language splits for the 27 + 9 new languages
recently added to Clank were about half the size as older languages in
monochrome_public_bundle.apks

After this change the new languages and old languages are about the same
size in monochrome_public_bundle.apks.

Example Before (af,as, az, be, bn, and bs are new languages):

   158921  2001-01-01 00:00   splits/base-af.apk
   424765  2001-01-01 00:00   splits/base-am.apk
   432527  2001-01-01 00:00   splits/base-ar.apk
   226815  2001-01-01 00:00   splits/base-as.apk
   165763  2001-01-01 00:00   splits/base-az.apk
   203683  2001-01-01 00:00   splits/base-be.apk
   473236  2001-01-01 00:00   splits/base-bg.apk
   234710  2001-01-01 00:00   splits/base-bn.apk
   163986  2001-01-01 00:00   splits/base-bs.apk

Example After:

   305787  2001-01-01 00:00   splits/base-af.apk
   424765  2001-01-01 00:00   splits/base-am.apk
   432527  2001-01-01 00:00   splits/base-ar.apk
   569512  2001-01-01 00:00   splits/base-as.apk
   325961  2001-01-01 00:00   splits/base-az.apk
   468522  2001-01-01 00:00   splits/base-be.apk
   473236  2001-01-01 00:00   splits/base-bg.apk
   577862  2001-01-01 00:00   splits/base-bn.apk
   324504  2001-01-01 00:00   splits/base-bs.apk

Bug: 1035665 1046654
Change-Id: I4928e62ac29b35bf6c19508a70834149eabaaa82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029232Reviewed-by: default avatarMegan Jablonski <megjablon@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Trevor  Perrier <perrier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736773}
parent 9ed9c7ba
......@@ -1362,7 +1362,14 @@ if (current_toolchain == default_toolchain) {
disable_compression = _is_bundle_module
renaming_sources = []
renaming_destinations = []
foreach(_locale, android_apk_locales) {
# Only include all Android locales on bundle builds.
if (_is_bundle_module) {
_locales_list = locales
} else {
_locales_list = android_apk_locales
}
foreach(_locale, _locales_list) {
renaming_sources +=
[ "$target_gen_dir/${_variant}_paks/locales/$_locale.pak" ]
renaming_destinations += [ "locales/$_locale.pak" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment