屏幕点亮解锁

       PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);  
PowerManager.WakeLock wakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK
| PowerManager.ACQUIRE_CAUSES_WAKEUP, "Gank");
wakeLock.acquire();

KeyguardManager  km= (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);//得到键盘锁管理器对象 
KeyguardLock kl = km.newKeyguardLock(""); //参数是LogCat里用的Tag  
kl.disableKeyguard(); //解锁 

你可能感兴趣的:(屏幕点亮解锁)