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

Commit 3f864738 authored by Kriti Dang's avatar Kriti Dang
Browse files

Ignore the preferredModeId for non-focussed windows

If a window sets preferredModeId, and then enters pip mode. Then if the
mode/refresh-rate/resolution is chosen by user from Settings menu, it doesn't take
effect because of preferredModeId of the pip window.

Bug: 232711732
Test: atest DisplayContentTests
Change-Id: Ief48c38ff9dc85c9033d502cc4006130678ae808
parent 016675bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -950,7 +950,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

                final int preferredModeId = getDisplayPolicy().getRefreshRatePolicy()
                        .getPreferredModeId(w);
                if (mTmpApplySurfaceChangesTransactionState.preferredModeId == 0
                if (w.isFocused() && mTmpApplySurfaceChangesTransactionState.preferredModeId == 0
                        && preferredModeId != 0) {
                    mTmpApplySurfaceChangesTransactionState.preferredModeId = preferredModeId;
                }