title: PARTIAL_WAKE_LOCK does not work
body: <p>I created a new project with target API 15 (ICS) with empty Activity. I added permission to manifest: </p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  </code></pre>
  
  <p>I added code to <code>onCreate()</code>:</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          PowerManager pm = (PowerManager) getSystemService(getApplicationContext().POWER_SERVICE);
          PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Tag");
          wl.acquire();
  
          WindowManager.LayoutParams params = getWindow().getAttributes();
          params.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
          params.screenBrightness = 0;
          getWindow().setAttributes(params);
      }
  </code></pre>
  
  <p>But nothing happens with the device. According to <a href="https://developer.android.com/reference/android/os/PowerManager.html" rel="nofollow">PowerManager documentation</a> I expected the screen to go off (immediately). So, am I doing something wrong or is this not working?</p>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I tried Ashish Ranjan's suggestion to manually set <code>screenBrightness</code> after acquiring WakeLock but this too does not work.</p>