diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 96cef2c..7a3a3b9 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -20,6 +20,7 @@
 
 #include <binder/Binder.h>
 #include <binder/BpBinder.h>
+#include <cutils/sched_policy.h>
 #include <utils/Debug.h>
 #include <utils/Log.h>
 #include <utils/TextOutput.h>
@@ -428,9 +429,9 @@
     mOut.writeInt32(isMain ? BC_ENTER_LOOPER : BC_REGISTER_LOOPER);
     
     // This thread may have been spawned by a thread that was in the background
-    // scheduling group, so first we will make sure it is in the default/foreground
+    // scheduling group, so first we will make sure it is in the foreground
     // one to avoid performing an initial transaction in the background.
-    androidSetThreadSchedulingGroup(mMyThreadId, ANDROID_TGROUP_DEFAULT);
+    set_sched_policy(mMyThreadId, SP_FOREGROUND);
         
     status_t result;
     do {
@@ -473,13 +474,13 @@
         }
         
         // After executing the command, ensure that the thread is returned to the
-        // default cgroup before rejoining the pool.  The driver takes care of
+        // foreground cgroup before rejoining the pool.  The driver takes care of
         // restoring the priority, but doesn't do anything with cgroups so we
         // need to take care of that here in userspace.  Note that we do make
         // sure to go in the foreground after executing a transaction, but
         // there are other callbacks into user code that could have changed
         // our group so we want to make absolutely sure it is put back.
-        androidSetThreadSchedulingGroup(mMyThreadId, ANDROID_TGROUP_DEFAULT);
+        set_sched_policy(mMyThreadId, SP_FOREGROUND);
 
         // Let this thread exit the thread pool if it is no longer
         // needed and it is not the main process thread.
@@ -1010,8 +1011,7 @@
                     // since the driver won't modify scheduling classes for us.
                     // The scheduling group is reset to default by the caller
                     // once this method returns after the transaction is complete.
-                    androidSetThreadSchedulingGroup(mMyThreadId,
-                                                    ANDROID_TGROUP_BG_NONINTERACT);
+                    set_sched_policy(mMyThreadId, SP_BACKGROUND);
                 }
             }
 
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index f9277de..bc1c285 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -324,29 +324,6 @@
 }
 
 #ifdef HAVE_ANDROID_OS
-int androidSetThreadSchedulingGroup(pid_t tid, int grp)
-{
-    if (grp > ANDROID_TGROUP_MAX || grp < 0) { 
-        return BAD_VALUE;
-    }
-
-#if defined(HAVE_PTHREADS)
-    pthread_once(&gDoSchedulingGroupOnce, checkDoSchedulingGroup);
-    if (gDoSchedulingGroup) {
-        // set_sched_policy does not support tid == 0
-        if (tid == 0) {
-            tid = androidGetTid();
-        }
-        if (set_sched_policy(tid, (grp == ANDROID_TGROUP_BG_NONINTERACT) ?
-                                          SP_BACKGROUND : SP_FOREGROUND)) {
-            return PERMISSION_DENIED;
-        }
-    }
-#endif
-    
-    return NO_ERROR;
-}
-
 int androidSetThreadPriority(pid_t tid, int pri)
 {
     int rc = 0;
@@ -392,40 +369,6 @@
 #endif
 }
 
-int androidGetThreadSchedulingGroup(pid_t tid)
-{
-    int ret = ANDROID_TGROUP_DEFAULT;
-
-#if defined(HAVE_PTHREADS)
-    // convention is to not call get/set_sched_policy methods if disabled by property
-    pthread_once(&gDoSchedulingGroupOnce, checkDoSchedulingGroup);
-    if (gDoSchedulingGroup) {
-        SchedPolicy policy;
-        // get_sched_policy does not support tid == 0
-        if (tid == 0) {
-            tid = androidGetTid();
-        }
-        if (get_sched_policy(tid, &policy) < 0) {
-            ret = INVALID_OPERATION;
-        } else {
-            switch (policy) {
-            case SP_BACKGROUND:
-                ret = ANDROID_TGROUP_BG_NONINTERACT;
-                break;
-            case SP_FOREGROUND:
-                ret = ANDROID_TGROUP_FG_BOOST;
-                break;
-            default:
-                // should not happen, as enum SchedPolicy does not have any other values
-                ret = INVALID_OPERATION;
-                break;
-            }
-        }
-    }
-#endif
-
-    return ret;
-}
 #endif
 
 namespace android {
