Setting Window Brightness via app screen
===

I am wondering how correct this code is also why is addFlags(just this nothing else) highlighted in red?: 

    		WindowManager.LayoutParams lp = getWindow().getAttributes();
		lp.screenBrightness = 0.01f;
		lp.addFlags(WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_OFF);