I am developing Lock screen where i want to disable Home button in ice cream sandwich and in Jelly bean , i can block it using following methods in android 2.2 , 2.3
@Override
public void onAttachedToWindow() {
// TODO Auto-generate method stub
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD);
super.onAttachedToWindow();
}
also tried this
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
Here i am also not getting event info via onPause
Method or onKeyDown
But these methods done't work for me in ICS,Jelly bean if is there any method that can replace it then let me know