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
Merged-In: Ief48c38ff9dc85c9033d502cc4006130678ae808
(cherry picked from commit 3f864738e2)
This commit is contained in:
@@ -946,7 +946,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user