OSDN Git Service

Do not set separate challenge flag before clearing lock
authorRubin Xu <rubinxu@google.com>
Wed, 11 Apr 2018 10:43:18 +0000 (11:43 +0100)
committerRubin Xu <rubinxu@google.com>
Wed, 11 Apr 2018 10:43:18 +0000 (11:43 +0100)
commit359a6b5c06709951e07ce7d1091b9780e35c792b
tree02027b38746398b685ddc2e1e8cdb2f897a03f7a
parent09793d19d31255cd1908843a61eed0756934efd3
Do not set separate challenge flag before clearing lock

This step is redundant since clearLock() would set the flag internally anyway.
In fact setting the flag before calling clearLock() is wrong since it will
lead LockSettingsService.setLockCredential() to think that the target profile
does not have a unified challenge, causing it to use an incorrect existing
credential for password change, leading to untrusted credential change.

Bug: 77892111
Test: Create profile; set separate empty work challenge; observe no crash
Change-Id: I4d76b20706a796654f9389f31ae8c46d51d7adac
src/com/android/settings/password/ChooseLockGeneric.java