This code throws a \"Given thread does not exist\" exception when I try to use it in a thread:
android.os.Process.getThreadPriority((int) Thread.currentThread().
android.os.Process.getThreadPriority(android.os.Process.myTid());
For further reference
http://developer.android.com/reference/android/os/Process.html#myTid()