// 保持Android设备屏幕灯长亮 public static void setScreenBright(Activity activity, boolean keepScreenOn) { if (keepScreenOn) { activity.getWindow().addFlags( WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } }
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/10729.html