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

Skip to content
Commit 24433243 authored by Tomislav Novak's avatar Tomislav Novak Committed by Xin Guan
Browse files

Fix setAttachingSchedGroupLSP() to support use_fifo_ui



The method added in aosp/1249555 ("Start process of next activity with
top priority in advance") to set the priority of the newly-launched top
app's UI thread doesn't handle the use_fifo_ui=1 case.

By setting mSetSchedGroup it also prevents subsequent applyOomAdjLSP()
calls from fixing the priority, so on devices with the sys.use_fifo_ui
sysprop set, main thread may not actually use SCHED_FIFO. This is an
issue mainly for the initial launch of an app -- once it's moved to
another sched group and then back, the priority is adjusted correctly.

Test: set sys.use_fifo_ui, start a new app, and check thread priorities
      with `ps -lT <pid>`
Signed-off-by: default avatarTomislav Novak <tnovak@meta.com>
Change-Id: Ic8afc2eb054717018d227263a93d9fcc25bfa180
(cherry picked from commit 68b35014e524dd20ac1537ad4cc55f004afe26a9)
parent d055e38c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment