PowerManager pm = (PowerManager)Context.getSystemServier(Context.POWER_SERVICE);
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
wl.acquire();
// ..screen will stay on during this section..
wl.release();
PARTIAL_WAKE_LOCK : CPU(On*), Screen(OFF), Keyboard(OFF)
SCREEN_DIM_WAKE_LOCK : CPU(On), Screen(Dim), Keyboard(OFF)
SCREEN_BRIGHT_WAKE_LOCK : CPU(On), Screen(Bright), Keyboard(OFF)
FULL_WAKE_LOCK : CPU(On), Screen(Bright), Keyboard(Bright)
PowerManagerService.mNotificationTask
-> WindowManagerPolicy.screenTurnedOn()
-> KeyguardViewMediator.onScreenTurnedOn();
-> WindowManagerPolicy.screenTurnedOff()
-> KeyguardViewMediator.onScreenTurnedOff();
留言列表