Merge "Fix setAttachingSchedGroupLSP() to support use_fifo_ui"

This commit is contained in:
Treehugger Robot
2023-05-26 17:00:15 +00:00
committed by Gerrit Code Review

View File

@@ -2900,7 +2900,11 @@ public class OomAdjuster {
// {@link ProcessList.SCHED_GROUP_TOP_APP}. We don't check render thread because it
// is not ready when attaching.
app.getWindowProcessController().onTopProcChanged();
setThreadPriority(app.getPid(), THREAD_PRIORITY_TOP_APP_BOOST);
if (mService.mUseFifoUiScheduling) {
mService.scheduleAsFifoPriority(app.getPid(), true);
} else {
setThreadPriority(app.getPid(), THREAD_PRIORITY_TOP_APP_BOOST);
}
initialSchedGroup = ProcessList.SCHED_GROUP_TOP_APP;
} catch (Exception e) {
Slog.w(TAG, "Failed to pre-set top priority to " + app + " " + e);