From f0b35e01d0fa908e505c31ef149e1849f5093afe Mon Sep 17 00:00:00 2001 From: dlmu2001 Date: Tue, 6 Dec 2016 15:41:58 +0800 Subject: [PATCH] Support Crosswalk and Android System WebView in the same application xwalk will put icudtl.dat in different folder like raw/res instead of assets.So it's not right to check and read from assets/icudtl.dat in high priority.Otherwise when android webview is called , app will extract webview.apk and copy it's icudtl.dat to assets,hence the two icudtl.dat will conflict. BUG=XWALK-7004 --- base/i18n/icu_util.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc index 30876f42f4204..c0545ca8cb9c2 100644 --- a/base/i18n/icu_util.cc +++ b/base/i18n/icu_util.cc @@ -86,6 +86,11 @@ void LazyInitIcuDataFile() { if (g_icudtl_pf != kInvalidPlatformFile) { return; } +//It's not correct to check and read from assets folder first, since xwalk +//put icudtl.dat in other folders like res/raw instead of assets.Reading +//from assets has a risk of conflict with android system webview. +//See https://crosswalk-project.org/jira/browse/XWALK-7004 +#if 0 #if defined(OS_ANDROID) int fd = base::android::OpenApkAsset(kAndroidAssetsIcuDataFileName, &g_icudtl_region); @@ -95,6 +100,7 @@ void LazyInitIcuDataFile() { } // For unit tests, data file is located on disk, so try there as a fallback. #endif // defined(OS_ANDROID) +#endif #if !defined(OS_MACOSX) FilePath data_path; #if defined(OS_WIN)