Methods Summary |
---|
private void | disableKeyguard(boolean disable)Acquires a wake lock and prevents keyguard from enabling.
if (disable) {
mKeyguardLock.disableKeyguard();
} else {
mKeyguardLock.reenableKeyguard();
}
|
protected void | onCreate(android.os.Bundle savedInstanceState)
super.onCreate(savedInstanceState);
Window winP = getWindow();
winP.setType(WindowManager.LayoutParams.TYPE_PRIORITY_PHONE);
winP.setLayout(WindowManager.LayoutParams.FILL_PARENT,
WindowManager.LayoutParams.FILL_PARENT);
winP.setGravity(Gravity.CENTER);
PhoneApp app = PhoneApp.getInstance();
KeyguardManager km = (KeyguardManager) app.getSystemService(Context.KEYGUARD_SERVICE);
mKeyguardLock = km.newKeyguardLock(TAG);
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
public boolean | onKeyDown(int keyCode, android.view.KeyEvent event)
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true;
}
return super.onKeyDown(keyCode, event);
|
protected void | onStart()
super.onStart();
disableKeyguard(true);
|
public void | onStop()
super.onStop();
disableKeyguard(false);
|