WindowManager: Send layer priority hint to SurfaceFlinger
Basic algorithm: if (!isFocused && preferredModeId > 0) -> priority is 2 if (isFocused && preferredModeId == 0) -> priority is 1 if (isFocused && preferredModeId > 0) -> priority is 0 else priority is INT_MAX See go/sf-generalizing-refresh-rate for master doc, and https://docs.google.com/document/d/1ozR7UT3AZclsJ6f4NJ4WXYO2eb-GRdv-Q55AYTltZSo for WM specific document. Test: Device starts. Observe logs for errors. Test: Observe printouts on SF side to make sure the correct number gets passed along. Test: Unit tests for setting priority on Transaction. Test: Swappy and Messaging app running in split screen. If swappy in focus, it gets priority 0, otherwise 2. If Messsging app in focus it gets priority 1, otherwise INT_MAX. Test: Chrome playing video. Chrome Activity gets priority 0. Test: Expand status bar. Status bar has priority 1. Test: Application running. Status bar gets an update. Nothing is passed along. Bug: 142507166 Change-Id: Iea75f63882b173fad089cd4a32a4831b92206797
Loading
Please register or sign in to comment