1. A method for providing security to a mobile electronic device, the method comprising: setting a lock state of the mobile electronic device to match a lock state of a computer in response to determining that the mobile electronic device is locally connected to the computer; initiating a preset time delay in response to determining that the lock state of the computer has changed from unlocked to locked; and locking the mobile electronic device in response to determining each of at least one condition is satisfied, the at least one condition comprising that the mobile electronic device remains locally connected to the computer after the expiry of the preset time delay.