From 6748f24d70fe0391ddc5df14cc45add5d7984a9b Mon Sep 17 00:00:00 2001 From: Ganesh Mahendran Date: Wed, 12 Apr 2017 16:25:25 +0800 Subject: [PATCH] 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 --- libcutils/sched_policy.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcutils/sched_policy.cpp b/libcutils/sched_policy.cpp index 73ca5180e..a9c061efb 100644 --- a/libcutils/sched_policy.cpp +++ b/libcutils/sched_policy.cpp @@ -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")) {