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
For a lockscreen Why don't you just use the following:
@Override
public void onAttachedToWindow() {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
}
If the user doesn't have a secure lock screen set, the app will just go to the home screen when your app closes. If the user does have a secure lockscreen set then the standard secure lockscreen will come up next no matter how your app closes. I guess I wouldn't worry about disabling the buttons. The user should be allowed to use the standard security features anyways, because they provide more security then you can guarantee from your app. Plus you don't have to spend the time coding secure unlock features.