[Android] Add AppLocaleController for language decouple
This CL adds the AppLocaleController interface and the GlobalAppLocaleController implementation which use the APPLICATION_OVERRIDE_LANGUAGE value to override the Clank language. Early in ChromeApplication.attachBaseContext the GlobaleAppLocaleController singleton is initialized with the override language and updates the Application level Locales/LocaleList. Doing the Application override this early also overrides the ContextUtils wrapped application Context. The base Context passed by Android to the Activity level attachBaseContext still uses the system locales so an Activity level locale override is also done. The override language is used for CCTs. This is the third of four CLs for this feature. The next will introduce the UI changes to allow users to control the preference. Bug: 1068667 Change-Id: Ifbbe9f8ed592c1b890a9069ef5cbfb685d34e00f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354546Reviewed-by:Trevor Perrier <perrier@chromium.org> Reviewed-by:
Andrew Grieve <agrieve@chromium.org> Reviewed-by:
Theresa <twellington@chromium.org> Reviewed-by:
Brandon Wylie <wylieb@chromium.org> Commit-Queue: Trevor Perrier <perrier@chromium.org> Cr-Commit-Position: refs/heads/master@{#805882}
Showing
Please register or sign in to comment