i create a lockscreen application and i need to disable a home button, so if that phone is stolen, that phone can\'t be accessed.. my lockscreen is a fullscreen activity.. i
Try this code :
@Override
public void onAttachedToWindow() {
// TODO Auto-generated method stub
super.onAttachedToWindow();
handler.postDelayed(mUpdateUiMsg, 100);
}
public boolean onKeyDown(int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
if(keyCode==KeyEvent.KEYCODE_BACK){
return true;
}
if(keyCode==KeyEvent.KEYCODE_HOME){
return true;
}
return super.onKeyDown(keyCode, event);
}
private Runnable mUpdateUiMsg = new Runnable() {
public void run() {
getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
}
};