Commit 0bf75bf8 authored by Thoren Paulson's avatar Thoren Paulson Committed by Commit Bot

[Chromecast] Include locale resources on Android.

Before, we weren't packaging localized pak files with the Android cast
shell, and ResourceBundle wasn't looking in the APK assets for these pak
files.

Bug: internal b/70031131
Test: CQ and tried it out with an Android build
Change-Id: I65adbaf552dfce6be62c4c4035d221f42b330c4d
Reviewed-on: https://chromium-review.googlesource.com/807406Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521807}
parent 57a9b3e3
......@@ -557,6 +557,7 @@ if (is_android) {
output = "$root_gen_dir/chromecast/android/${target_name}.h"
exception_files = jni_exception_files
}
android_assets("cast_shell_apk_assets") {
assert(v8_use_external_startup_data)
......@@ -565,6 +566,7 @@ if (is_android) {
]
deps = [
":cast_shell_apk_locale_assets",
":cast_shell_pak",
"//third_party/icu:icu_assets",
"//v8:v8_external_startup_data_assets",
......@@ -572,6 +574,23 @@ if (is_android) {
disable_compression = true
}
android_assets("cast_shell_apk_locale_assets") {
renaming_sources = []
renaming_destinations = []
foreach(locale, cast_locales) {
renaming_sources += [ "$root_out_dir/chromecast_locales/${locale}.pak" ]
renaming_destinations += [ "stored-locales/${locale}.pak" ]
}
deps = [
":chromecast_locales_pak",
]
treat_as_locale_paks = true
disable_compression = true
}
android_apk("cast_shell_apk") {
apk_name = "CastShell"
android_manifest = "$root_gen_dir/cast_shell_manifest/AndroidManifest.xml"
......
......@@ -34,6 +34,7 @@
#include "base/android/apk_assets.h"
#include "chromecast/app/android/cast_crash_reporter_client_android.h"
#include "chromecast/app/android/crash_handler.h"
#include "ui/base/resource/resource_bundle_android.h"
#elif defined(OS_LINUX)
#include "chromecast/app/linux/cast_crash_reporter_client.h"
#endif // defined(OS_LINUX)
......@@ -203,6 +204,8 @@ void CastMainDelegate::InitializeResourceBundle() {
DCHECK_GE(pak_fd, 0);
global_descriptors->Set(kAndroidPakDescriptor, pak_fd, pak_region);
}
ui::SetLocalePaksStoredInApk(true);
#endif // defined(OS_ANDROID)
resource_delegate_.reset(new CastResourceDelegate());
......
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