checking device before unlock

checking device before unlock