OSDN Git Service

Fix work account setup lock screen content for face auth
authorCurtis Belmonte <curtislb@google.com>
Mon, 8 Jul 2019 18:23:28 +0000 (11:23 -0700)
committerCurtis Belmonte <curtislb@google.com>
Mon, 8 Jul 2019 19:03:56 +0000 (19:03 +0000)
commit560458593017c4911baf1e5cabd448b7dc3f4928
treefe30d15036a05fea15a818eee10fb4bca874ca8c
parentce4d5fbff9d42126aabb7d6f14080388493a89ee
Fix work account setup lock screen content for face auth

For devices which provide biometric authentication options, such as
fingerprint or face, we should be showing different content on the lock
setup screen during the corp account setup wizard. Namely, the title
should read "Choose screen lock", and the "Not now" option should be
changed to "Continue without [auth method]". However, we currently only
check for whether fingerprint authentication is available, leading to
incorrect text for devices with face authentication.

This CL fixes the issue by changing the introducing a private method to
check for any biometric authentication (currently just mForFingerprint ||
mForFace). It then uses this method in place of the existing
mForFingerprint checks in SetupChooseLockGeneric.

Test: On a device with fingerprint auth and one with face auth:
1. Set a work profile with TestDPC and add some password quality requirement
2. adb shell settings put global device_provisioned
3. adb shell am start -a android.app.action.SET_NEW_PARENT_PROFILE_PASSWORD
4. Verify that the correct content is now shown (screenshot/xZPVtpa3j3Z)
5. Verify that setting lock with and without biometric auth still works

Fixes: 136556653

Change-Id: I46d3c964f05986aa97cc8ed77fe0ac125337ddd0
src/com/android/settings/password/SetupChooseLockGeneric.java