/** * Lock the device (bring it to the lock screen) for a given number of * seconds or forever (until the command for unlocking is called). The call * is ignored if the device has been already locked. * * @param duration for how long to lock the screen. Minimum time resolution is one second. * A negative/zero value will lock the device and return immediately. */ default void lockDevice(Duration duration) { CommandExecutionHelper.execute(this, lockDeviceCommand(duration)); }
/** * Lock the device (bring it to the lock screen) for a given number of * seconds or forever (until the command for unlocking is called). The call * is ignored if the device has been already locked. * * @param duration for how long to lock the screen. Minimum time resolution is one second. * A negative/zero value will lock the device and return immediately. */ default void lockDevice(Duration duration) { CommandExecutionHelper.execute(this, lockDeviceCommand(duration)); }