libcutils: fix system-background tasks shown in top command

tasks in system-background cgroup will be shown as below:
 580   580 system   12  -8   1% S 190656K  19408K unk surfaceflinger  /system/bin/surfaceflinger

This patch fix this issue.

Change-Id: Ib39ff892010498548d7fbfb4021df62498acd033
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
This commit is contained in:
Ganesh Mahendran 2017-04-12 16:25:25 +08:00
parent 120add07ab
commit 6748f24d70
1 changed files with 2 additions and 0 deletions

View File

@ -262,6 +262,8 @@ int get_sched_policy(int tid, SchedPolicy *policy)
*policy = SP_FOREGROUND;
} else if (!strcmp(grpBuf, "foreground")) {
*policy = SP_FOREGROUND;
} else if (!strcmp(grpBuf, "system-background")) {
*policy = SP_SYSTEM;
} else if (!strcmp(grpBuf, "background")) {
*policy = SP_BACKGROUND;
} else if (!strcmp(grpBuf, "top-app")) {