isLocked improvement.

- Rewrote the method, there was some confusion between regex matches being found and regex matches being true, what was needed was a simple OR. 
- Added test, so if we get more use cases we can easily add them.
- Cleaned up the dumpsys log part.

Can you add a short comment explaining what these functions are doing and why they're needed?  Alternatively, you can comment the implementation.