I think some Googlers have said this was going away for a long time now. I suppose it finally happened. :(
If you want to give a try of my paid app, Keyguard Disabler go for it. If it still works on your device I'll try to help get you working. Then feel free to do an automated refund or mail me for a refund. -Mike dg On Dec 4, 4:51 am, "Teo [GD API Guru]" <[email protected]> wrote: > Hi, > > has something changed in the latest OS update (Android 2.2.1, Nexus > One) about disabling keyguards? I have an app that has an alarm > feature and wakes up the phone + disables the keyguard; the keyguard > disabling doesn't happen anymore. Here's what i'm doing: > > private final void unlockScreen() { > final KeyguardManager km = ((KeyguardManager) > getSystemService(Activity.KEYGUARD_SERVICE)); > if (km.inKeyguardRestrictedInputMode()) { > final KeyguardLock kl = km.newKeyguardLock(KEYGUARD_SERVICE); > kl.disableKeyguard(); > } > } > > private final void wakeScreen() { > final boolean dim = sPref.getBoolean(Config.ALARM_DIM, false); > final PowerManager.WakeLock wl = ((PowerManager) > getSystemService(Context.POWER_SERVICE)) > .newWakeLock((dim ? PowerManager.SCREEN_DIM_WAKE_LOCK > : PowerManager.SCREEN_BRIGHT_WAKE_LOCK) > | PowerManager.ACQUIRE_CAUSES_WAKEUP, "TagToDoWake"); > wl.acquire(); > new Handler().postDelayed(new Runnable() { > public void run() { > wl.release(); > } > }, 20000); > > And i'm calling them in this order: > wakeScreen(); > unlockScreen(); > > Thanks, > Teo -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

