[Android TWAs] Fix status bar colour
In order to use the theme-color specified by the web page for TWAs, CustomTabStatusBarColorProvider#setUseTabThemeColor() needs to be invoked because CustomTabStatusBarColorProvider#mUseTabThemeColor defaults to false. setUseTabThemeColor() is currently not invoked because TrustedWebActivityCoordinator#mInTwaMode defaults to true This CL fixes the bug by adding a speculative call to setUseTabThemeColor() in onPostInflationStartup() similar to what is done for the toolbar hide state This CL also enables CustomTabActivityTest.testToolbarColor() on Lollipop. This matches similar tests like WebappSplashScreenThemeColorTest#testThemeColorNotUsedIfPagesHasOne() BUG=997578 TEST=TrustedWebActivityTest.testStatusBarColorPrecedence Change-Id: I6015acbae310650051b49f75cacbddc16a5e66e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771316 Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by:Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/heads/master@{#694940}
Showing
Please register or sign in to comment