What about this article?Program.
Safscreenreceiver. Java: serves as the entry to the screen lock module. By obtaining the boot and lock screen keys, you can enable the lock screen service based on whether the storage in the safscreenreceiver allows the lock screen.
Package SAF. CMCC. home. lock; import android. content. broadcastreceiver; import android. content. context; import android. content. intent; import android. util. log;/*** this class role is to inform er the system broadcast: open phone * @ author issuser **/public class safscreenreceiver extends broadcastreceiver {Private Static final string tag = "safscreenreceiver"; @ overridepublic void onreceive (context, intent) {string action = intent. getaction (); If (intent. action_boot_completed.equalsignorecase (Action) | intent. action_user_present.equalsignorecase (Action) {log. V (TAG, "Action:" + action); saflockconstants. loadinitparam (context); If (saflockconstants. lock_enable) {intent I = new intent (context, saflockservice. class); context. startservice (I );}}}}
Sorry, no comments. I don't know what to write. Just look at it.