Android 点亮屏幕的代码
jopen
11年前
private void AcquireWakeLock() { PowerManager pm = (PowerManager)mApplicationContext.getSystemService(Context.POWER_SERVICE); WakeLock m_wakeObj = (WakeLock)pm.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.ON_AFTER_RELEASE, ""); // m_wakeObj.acquire(); //点亮屏幕15秒钟 m_wakeObj.acquire(1000 * 5); m_wakeObj.release();//释放资源 }