• David 'Digit' Turner's avatar
    android: Place English locale pak files into fallback directory. · 697a88b1
    David 'Digit' Turner authored
    This change ensures that all English locale pak files (i.e.
    en-US.pak and en-GB.pak) are stored inside an app bundle into
    a directory named:
    
      assets/fallback-locales/
    
    This ensures that said .pak files are always stored in the base
    module split APK, and thus available on all Chrome installs, after
    any system locale change.
    
    This prevents Chrome from crashing on startup under rare
    circumstances (see related bug for details).
    
    Testing was performed manually because we don't have a good regression
    test suite that can change the device's system locale programmatically
    (see http://crbug.com/904360 for this). Following these steps:
    
    1) Set device's language to Spanish
    2) Ensure Chrome is not installed, then install the bundle.
    3) Start Chrome. It displays its UI in Spanish.
    4) Change system language to Slovenčina, and *remove* Spanish from
       the list of system languages.
    5) Start Chrome. It displays its UI in English (the fallback)
       instead of crashing.
    
    English is chosen because it is the fallback language that the Android
    framework actually choses when the application doesn't have any
    resources compatible with the current system language.
    
    BUG=905725
    R=agrieve@chromium.org,estevenson@chromium.org,yfriedman@chromium.org,tiborg@chromium.org,tedchoc@chromium.org
    
    Change-Id: I2c1f53a805122b6e48fb5105c1d9aa8c6262fa1d
    Reviewed-on: https://chromium-review.googlesource.com/c/1340303Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
    Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
    Commit-Queue: David Turner <digit@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#609385}
    697a88b1
create_app_bundle.py 11.4 KB