Wednesday, January 13, 2010

Custom button unlock and wakeup proof of concept achieved

Thanks to a window feature called flag_dismiss_keyguard new in 2.0 I can put my own lockscreen in place every time the screen sleeps (cancelling the regular lockscreen). Then I can respond to keys however I want using regular key event handling. While I can't stop the cpu from waking up because android doesn't give apps permission to define wakeup rules, my lockscreen doesn't turn your screen on unless its a key event that we actually want to wake it up. It sends the cpu back to sleep in 5 seconds. Since it isn't doing anything it doesn't impact battery at all.

This pre-alpha test build lets camera key wake it up (once awake you see a clock, and you can use the notification panel, or press back to unlock) and keeps volume and focus camera key presses from waking the screen. Power still instant unlocks just like the rest of the myLock versions.

I am skipping alpha release for this as the first implementation of it is already in myLock complete (though non-functional as a lockscreen) and my test build APK is also up for download because I forgot to delete it.

The beta is pending completion of To-Dos:
  • Add phone listener that stops it from placing the custom lockscreen during calls -- done
  • Handle opening the slider as a wakeup event (stays asleep currently) -- done
  • Support customization for users to add widgets & app launchers -- proof of concept for widgets is done
  • Get the home key exit consistently processing correctly --mostly done
  • Get the phone call event handling rock solid --- mostly done
  • Figure out how to let the power key still unlock after an accidental press of a locked key --got a working fix that inexplicably won't work for the volume keys but does for camera/cam focus
  • figure out why random apps seem to interfere when lockscreen comes on over the top of them -- no idea. it seems to be odd lag and because it takes too long the lockscreen can't close itself since screen isn't waking up
  • Implement the 5 second re-lock grace period and also a longer timeout for pattern lockdown
  • Implement settings screen for configuring unlock/wakeup/locked down keys. I will ensure it supports double press and long press as well. Maybe you want all keys locked down except when double pressed. It will be able to do that.
  • Possible implementation of a lockdown mode. This is an extra security level allowing the user to place phone into lockdown requiring they type in their password to get out of it. The lockdown mode works by intercepting attempts to leave the lockdown screen and forcing it to open again. If I can get it rock solid where it even overrides the call answering screen, then I may include this feature in the beta.
  • Finish creating the 2.0 optimized lock-skip mode that actually uses a replacement lockscreen window with no customization -- 70% done

9 comments:

  1. I hope the package works with the motorola milestone! :)

    ReplyDelete
  2. I don't think it will. I don't know why the milestone is having that issue for installing. I need to get a beta on the market and see if the milestoners are able to get it

    ReplyDelete
  3. Will the camera button option be optional? I'd like to only allow the power button (and sliding the keyboard once you get that) to do it. The others cause it to wake up in my pocket...

    ReplyDelete
  4. Yes you can customize what keys or actions you want to have wakeup. The existing myLock releases do not unlock or wakeup with any key other than power. The custom lockscreen mode will provide this type of customization in addition to allowing you to add widgets or shortcuts.

    ReplyDelete
  5. ain't there no log file for apk installations?
    btw, where is the install binary located? if I try to install it from the terminal with install, I get, of course, a permission denied. But if I execute install as root, it can not find install, because it is not in the path...hm :)

    ReplyDelete
  6. hm, it looks like myLock doesn't unlock thy device anymore now that I updated to 2.0.1 and the different looking lockscreen...

    ReplyDelete
  7. Try the troubleshooting faq. I've been developing under 2.0.1 since it came out and I believe you might be getting an incidental glitch. If it fails it sometimes can't recover without a reboot (full battery removal restart)

    I'm working on a more 2.0.1 / 2.1 friendly instant unlock, hopefully I'll have it working perfectly very soon for a full beta under new name. I'm taking custom lockscreen the direction of the myLock idea and releasing the instant unlock + screen timeout tools as a beta standalone

    ReplyDelete
  8. Will this allow me to unlock the device only with a long press of the wake-button, without seing a lockscreen? I want it! When and where can we download (buy) it? Thx

    ReplyDelete