PauseAndLock was only called with do_lock=true, and the function only used unpauseOnUnlock when do_lock was false.
final
overide