Merge "DO NOT MERGE Fix crash in case of no overlays" into pi-dev

This commit is contained in:
Jorim Jaggi
2018-06-18 15:52:09 +00:00
committed by Android (Google) Code Review

View File

@@ -126,7 +126,8 @@ public class ScreenDecorations extends SystemUI implements Tunable {
@Override @Override
public void onDisplayChanged(int displayId) { public void onDisplayChanged(int displayId) {
if (mRotation != RotationUtils.getExactRotation(mContext)) { if (mOverlay != null && mBottomOverlay != null
&& mRotation != RotationUtils.getExactRotation(mContext)) {
// We cannot immediately update the orientation. Otherwise // We cannot immediately update the orientation. Otherwise
// WindowManager is still deferring layout until it has finished dispatching // WindowManager is still deferring layout until it has finished dispatching
// the config changes, which may cause divergence between what we draw // the config changes, which may cause divergence between what we draw