title: Set the screen brightness to the minimum
body: <p>I have problems trying to set the screen brightness to the minimum. My code is the following:</p>
  
  <pre><code>        WindowManager.LayoutParams params = w.getAttributes();
          params.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_OFF;
          w.setAttributes(params);
  </code></pre>
  
  <p>The problem is that the screen turns off completely in some devices and it is almost impossible to turn the screen on again even pressing the power button (fortunately the screen turns on again after a while). I have no idea about this behavior.</p>
  
  <p>Help please. Thanks in advance.</p>
  
  <p>Fran.</p>