dalvik: thread: Set the control group of a thread to the background group
if the priority is logically-lower than ANDROID_PRIORITY_BACKGROUND

Signed-off-by: San Mehat <san@google.com>
diff --git a/vm/Thread.c b/vm/Thread.c
index acfc7a9..0adde38 100644
--- a/vm/Thread.c
+++ b/vm/Thread.c
@@ -2819,9 +2819,9 @@
     }
     newNice = kNiceValues[newPriority-1];
 
-    if (newPriority == ANDROID_PRIORITY_BACKGROUND) {
+    if (newPriority >= ANDROID_PRIORITY_BACKGROUND) {
         dvmChangeThreadSchedulerGroup("bg_non_interactive");
-    } else if (getpriority(PRIO_PROCESS, pid) == ANDROID_PRIORITY_BACKGROUND) {
+    } else if (getpriority(PRIO_PROCESS, pid) >= ANDROID_PRIORITY_BACKGROUND) {
         dvmChangeThreadSchedulerGroup(NULL);
     }