Settings: fix potential crash when setting new pattern
When setting a pattern that has a different size length than default, or
the currently set pattern, an exception can occur when rotating the
device because the lock pattern utils method assumes a length, which may
not be correct.
Update to use the static version of stringToPattern() which accepts a
Also fix the pattern comparison check. It was comparing two array list
objects to decide whether the pattern was the same, and after a
rotation, the objects would have been reconstructed, and it never would
have accepted the correct pattern.
Signed-off-by: Roman Birg <firstname.lastname@example.org>
2 files changed