答案 0 :(得分:0)
尝试从KeyguardManager类中调用requestDismissKeyguard()方法:
KeyguardManager mKeyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
if (mKeyguardManager.isDeviceLocked()) {
mKeyguardManager.requestDismissKeyguard(this, new KeyguardManager.KeyguardDismissCallback() {
@Override
public void onDismissSucceeded() {
super.onDismissSucceeded();
//TODO
}
});
}