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>
diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp
index 73ca518..a9c061e 100644
--- a/libcutils/sched_policy.cpp
+++ b/libcutils/sched_policy.cpp
@@ -262,6 +262,8 @@
*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")) {