Fix bug on nougat where the background is black while the activity is displaying

This commit is contained in:
Anthony Restaino 2016-09-26 21:33:40 -04:00
parent 8ae8f58cc6
commit 36a46002a4

View File

@ -1350,7 +1350,12 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
final int color = DrawableUtils.mixColor(interpolatedTime, mCurrentUiColor, finalColor); final int color = DrawableUtils.mixColor(interpolatedTime, mCurrentUiColor, finalColor);
if (mShowTabsInDrawer) { if (mShowTabsInDrawer) {
mBackground.setColor(color); mBackground.setColor(color);
window.setBackgroundDrawable(mBackground); Handlers.MAIN.post(new Runnable() {
@Override
public void run() {
window.setBackgroundDrawable(mBackground);
}
});
} else if (tabBackground != null) { } else if (tabBackground != null) {
tabBackground.setColorFilter(color, PorterDuff.Mode.SRC_IN); tabBackground.setColorFilter(color, PorterDuff.Mode.SRC_IN);
} }