title: Changing thread priority doesn't have an effect
body: <p>I'm trying to change priority of main thread using <code>android.os.Process.setThreadPriority()</code>. I have log messages before and after priority changing, here is code:</p>
  
  <pre><code>public class TestActivity extends Activity {
      public final String TAG="TestActivity";
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          int tid=(int)Thread.currentThread().getId();
          Log.d(TAG,"priority before change = " + android.os.Process.getThreadPriority(tid));
          Log.d(TAG,"priority before change = "+Thread.currentThread().getPriority());
          android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_DISPLAY);
          Log.d(TAG,"priority after change = " + android.os.Process.getThreadPriority(tid));
          Log.d(TAG,"priority after change = " + Thread.currentThread().getPriority());
      }
  }
  </code></pre>
  
  <p>And I get the following output:</p>
  
  <pre><code>priority before change (getThreadPriority) = 0
  priority before change (currentThread().getPriority) = 5
  priority after change (getThreadPriority) = 0
  priority after change (currentThread().getPriority) = 5
  </code></pre>
  
  <p>It means that priority didn't change, whatever method I use to evaluate it.
  <code>android.os.Process.THREAD_PRIORITY_DISPLAY = -4</code>, so after changing my ouput should equal -4, why it remains the same? Why <code>android.os.Process.setThreadPriority()</code> has no effect?</p>
  
  <p>P.S. I read google docs about threads, but I didn't come across any issues explaining difference between <code>android.os.Process.getThreadPriority()</code> and <code>Thread.currentThread().getPriority()</code>. Why these methods return different values?</p>
  
  <p>P.P.S. <code>Thread.currentThread().setPriority()</code> works fine.</p>