Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d5d1c31 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fixed cutout flicker in C10, P10" into tm-dev am: 5a9d90c1 am:...

Merge "Merge "Fixed cutout flicker in C10, P10" into tm-dev am: 5a9d90c1 am: 95060444 am: a3ca4a6e" into tm-qpr-dev-plus-aosp
parents 82f49662 ba724a5f
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import android.hardware.graphics.common.AlphaInterpretation;
import android.hardware.graphics.common.DisplayDecorationSupport;
import android.os.Handler;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.provider.Settings.Secure;
import android.util.DisplayUtils;
@@ -1067,15 +1068,22 @@ public class ScreenDecorations extends CoreStartable implements Tunable , Dumpab
    }

    private void updateLayoutParams() {
        if (mOverlays == null) {
            return;
        //ToDo: We should skip unnecessary call to update view layout.
        Trace.beginSection("ScreenDecorations#updateLayoutParams");
        if (mScreenDecorHwcWindow != null) {
            mWindowManager.updateViewLayout(mScreenDecorHwcWindow, getHwcWindowLayoutParams());
        }

        if (mOverlays != null) {
            for (int i = 0; i < BOUNDS_POSITION_LENGTH; i++) {
                if (mOverlays[i] == null) {
                    continue;
                }
            mWindowManager.updateViewLayout(mOverlays[i].getRootView(), getWindowLayoutParams(i));
                mWindowManager.updateViewLayout(
                        mOverlays[i].getRootView(), getWindowLayoutParams(i));
            }
        }
        Trace.endSection();
    }

    @Override