Adjusting screen brightness using WindowManager stops working after inactivity
<p>I'm using this code to change an Activity's brightness by dimming it.</p>

<pre><code>WindowManager.LayoutParams layoutParameters = getWindow().getAttributes();
layoutParameters.screenBrightness = 0.0075f;
getWindow().setAttributes(layoutParameters);
</code></pre>

<p>I'm also adjusting the android.provider.Settings.System brightness. </p>

<p>My problem is, that after ~8 seconds of inactivity, the screen brightness resorts back to normal (i.e. brightens again). Does anyone know why this is happening and how I could change that setting as well?</p>

<p>Thanks!</p>
