Do not re-initialize synthetic password
A bug was introduced in R where LSS ends up regenerating SP
when an escrow token is being auto-activated on unsecured user,
due to a logic error in shouldMigrateToSyntheticPasswordLocked().
Fix the bug and add some safeguards as well as unit test to
prevent future regressions.
Test: atest com.android.server.locksettings
(cherry picked from commit efc1d53df3a2e7116d7ed83bca9bf8e384d32740)
(cherry picked from commit 2d51788b08aa85afdb27af4f4586ac40dc949097)
2 files changed