How to temporary override the current brightness setting and turn the back light to full brightness.
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
layoutParams.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_FULL;
getWindow().setAttributes(layoutParams);
Turn it off:
WindowManager.LayoutParams layoutParams = getWindow().getAttributes();
layoutParams.screenBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_NONE;
getWindow().setAttributes(layoutParams);
No comments:
Post a Comment