I’m sure that Toddler Lock just uses BroadcastReciever and listens to Intent.ACTION_MAIN and the Intent.CATEGORY_HOME category - so when you first start it advises you to select the “use this default application” checkbox and forces you to choose a lock for kids.
Thus, it doesn’t really block the Home button at all, it just sets itself as the default broadcast receiver for:
Intent i = new Intent(Intent.ACTION_MAIN); i.addCategory(Intent.CATEGORY_HOME);
When you launch Lock Toddler Lock, it probably sets an internal flag, and if you press the home button, it will simply bring the window forward. If the flag is not set, it probably launches Launcher explicitly.
Hope this makes sense. This is just a theory, but I am almost 100% sure that it was so.
synic Apr 16 '10 at 1:19
source share