Fixing sysui scrim not updating in landscape UI

Bug: 156422012
Change-Id: I2e1e9149e8337dd663bf564bd1b7f661ec2864e9
This commit is contained in:
Sunny Goyal
2020-06-15 13:41:41 -07:00
parent 946696124a
commit 8cd8d15886
@@ -244,13 +244,17 @@ public class ShelfScrimView extends ScrimView<BaseQuickstepLauncher>
@Override
protected void updateSysUiColors() {
// Use a light system UI (dark icons) if all apps is behind at least half of the
// status bar.
boolean forceChange = mShelfTop <= mLauncher.getDeviceProfile().getInsets().top / 2f;
if (forceChange) {
mLauncher.getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, !mIsScrimDark);
if (mDrawingFlatColor) {
super.updateSysUiColors();
} else {
mLauncher.getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, 0);
// Use a light system UI (dark icons) if all apps is behind at least half of the
// status bar.
boolean forceChange = mShelfTop <= mLauncher.getDeviceProfile().getInsets().top / 2f;
if (forceChange) {
mLauncher.getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, !mIsScrimDark);
} else {
mLauncher.getSystemUiController().updateUiState(UI_STATE_SCRIM_VIEW, 0);
}
}
}