changing device lock status on change