设置屏幕亮度的悲剧
WindowManager.LayoutParams localLayoutParams = getWindow().getAttributes(); System.out.println(localLayoutParams.screenBrightness); localLayoutParams.screenBrightness = new Random(System.currentTimeMillis()).nextInt(10)*1F/10F; getWindow().setAttributes(localLayoutParams);