摘要:
相关的变量: PowerManager powerManager = null; WakeLock wakeLock = null;初始化: powerManager = (PowerManager) this .getSystemService(Service.POWER_SERVICE); wakeLock = this.powerManager.newWakeLock( PowerManager.SCREEN_DIM_WAKE_LOCK, "My Lock");开启屏幕常亮: wakeLock.setReferenceCounted(false); wakeLock. 阅读全文