[First written by Steve Guo, please keep the mark if forwarding.]
Screen saver in Android is called Key guard screen internally. There are two methods to disable the annoying Android key guard screen, if you met such a problem during a demo or other things.
One is a hacked method: We can manually change the "device_provisioned" system settings to ‘0′ (I have posted another BKM on how to update the system settings, please refer to it). In this case, it will disable the key guard screen for ever even rebooting. And it may cause the incoming call not processed because phone app will check the settings during processing incoming call. I prefer this method. As a developer not handling phone, it’s very suitable for me.
Another is a graceful method: We can temporarily disable it in our JAVA app. For how to implement it, please just take a look at the PhoneApp.java and look for disableKeyguard and reenableKeyguard functions.
If you are interesting about the feature’s implementation of Android, KeyguardViewMediator.java is the starting point you should go. Enjoy it.