1.SystemUI 中去掉锁屏
KeyguardViewMediator @mHandler
/**
* This handler will be associated with the policy thread, which will also
* be the UI thread of the keyguard. Since the apis of the policy, and therefore
* this class, can be called by other threads, any action that directly
* interacts with the keyguard ui should be posted to this handler, rather
* than called directly.
*/
private Handler mHandler = new Handler(Looper.myLooper(), null, true /*async*/) {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case SHOW:
//Do not show keyguard by ybf
// handleShow((Bundle) msg.obj);
break;
case HIDE:
handleHide();
break;
case RESET:
handleReset();
break;
case VERIFY_UNLOCK:
Trace.beginSection("KeyguardViewMediator#handleMessage VERIFY_UNLOCK");
handleVerifyUnlock();
Trace.endSection();
break;
''''
}
break;
2. 如果想实现自己是锁屏界面,改动越小,越能达到自己的目的,最好。
个人认为,如果能够修改SystemUI方法,那最好就是重载handleShow()方法,在这个方法中实现我们自己的锁屏界面。例如通过Activity跳转,别忘了释放PARTIAL_WEAK_LOCK。
重载这个方法,可以最大程度的不影响Android系统逻辑