Commit Graph

59 Commits

Author SHA1 Message Date
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Austin Delgado
6e745242da Fix going back after biometric enrollment in SUW
Bug: 280530120
Test: atest BiometricEnrollActivityTest
Test: tested manually by swiping back after enrollments
Change-Id: I305dd0904f86e2fc77f02047de8f3fc2c54621cb
2023-05-08 17:24:19 +00:00
Austin Delgado
0ea56b4fec Hide enrollment options that don't match requested biometric strength
When calling biometric enroll intent with biometric_strong, don't include
weak enrollments as options.

Bug: 265898482
Test: Tested manually by calling enrollment and verifying correct
options are shown
Test: atest BiometricEnrollActivityTest

Change-Id: I5fa650a593aee536955ae806f5963ffbdc135a2e
2023-04-20 11:20:37 -07:00
Milton Wu
e4fe606939 Fix enrolled pages not hide during SUW
Update mIsFaceEnrollable and mIsFingerprintEnrollable in
BiometricEnrollActivity, and use them to determine the activity flow.

Bug: 270102158
Test: Manually test following cases
      1. Complete fp and face in suw, then back to "Google Service" page
	 to make sure
	 a. Fingeprint introduction page isn't shown
	 b. Face introduction page isn't shown
	 c. ConfirmCredential page is shown
      2. Complete fp in suw, then press back to previous page in Face
	 introduction page. And check Fingerpirnt isn't shown.
Change-Id: Ibc74128f6776128d8a0f4cab014b58057ac0f844
2023-04-13 14:57:37 +08:00
Dmitry Dementyev
cd7123e071 Merge "Return GK_PW_HANDLE after remote LSKF verification." into udc-dev 2023-04-04 18:37:36 +00:00
Milton Wu
05d275bf07 Update theme transition for fingerprint in U
Apply suw transition for fingerprint
1. Fix incorrect animation between Lock and Fingeprint in Suw
2. Fix incorrect animation between Fingeprint and FaceLock in Suw
3. Remove unnecessary overridePendingAnimation during Enorlling
4. Fix no animation in biometrics v2 because of incorrect calling order
   in FragmentTransaction

Bug: 269063515
Test: Manually test transition animation for fingerprint enrollments
Change-Id: I12475dae5cb2905c81b24d3b57438b898afa1e27
2023-03-28 11:24:59 +00:00
Dmitry Dementyev
e9e48a5b95 Return GK_PW_HANDLE after remote LSKF verification.
Handle is returned when LSKF is set after successful verification.
It is used by SUW to add biometrics without asking for LSKF.

Bug: 272807192
Test: manual
Change-Id: I3fe6ed7fd6401421090ccd684509dfede9106076
2023-03-20 18:01:52 -07:00
yuanjiahsu
06466b030b Implement “Set up Face or Fingerprint Unlock first” page
The activity which instructs the user to set up face or fingerprint unlock before setting the watch unlock

Bug: 264813445
Bug: 264962961
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ActiveUnlockRequireBiometricSetupTest
Change-Id: I556c62b6b8102f6e15045a37cf506c0c0eedf733
2023-01-30 16:48:52 -08:00
Vincent Wang
b8926bd868 Merge "Launch FaceEnrollPage form BiometricEnrollActivity" 2023-01-09 04:56:44 +00:00
lbill
1eee5eda6c 2-1/ Add config_suw_support_face_enroll to customize SUW face enroll flow
1. Add config_suw_support_face_enroll default is TRUE
2. Impl FaceFeatureProvider to obtain the config
3. Overlay config_suw_support_face_enroll by requirements

Test: Flash build and manual check if device go through face enroll in SUW
Bug: 262469686
Change-Id: I61aa5c818bedfb490f2172a7481f59fda7295c1a
2023-01-06 19:29:51 +00:00
Vincent Wang
7fdc046d9b Launch FaceEnrollPage form BiometricEnrollActivity
For compatible with Biometric V2, launch FaceEnrollPage from
BiometricEnrollActivity

Bug: 259658609
Test: 1. adb root
      2. adb shell am start -n com.google.android.setupwizard/.SetupWizardTestActivity
      3. Test Fingerprint & Face enrollment
Change-Id: Ice85406abaa3d7a4b686fb017349471118a42951
2022-12-28 10:13:26 +00:00
TreeHugger Robot
7598750620 Merge "Fix incorrect choose screen lock during unicorn" into tm-qpr-dev am: 094d7badba am: 9386416103
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19880532

Change-Id: I88e7db1f442c18aada11305ed54f0b5e66636d7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13 07:17:39 +00:00
Milton Wu
4f93ef7790 Fix incorrect choose screen lock during unicorn
ChooseLockGeneneric uses intent extra key to determine correct strings
on "Choose screen lock" screen.

Bug: 219419005
Test: atest BiometricEnrollActivityTest
Test: Manully test SUW as following combinations
      1. W/ unicorn flow or W/O unicorn flow
      2. Fingerprint only devices or Fingerpirnt+Face devices
Change-Id: I2abf9555676f3fb3b92dd6ddcc091ea8158bfe9f
2022-09-08 07:54:53 +00:00
Milton Wu
81626fb1c8 Run lock before single sensor enroll
Run setOrConfirmCredentialsNow() before enrolling for devices w/
single-sensor

Bug: 239105333
Test: atest BiometricEnrollActivityTest
Test: Manually test multi-sensor and single-sensor devices
Change-Id: I807418c842eb076974f839a0d08bae67d3bc51dc
2022-07-26 01:23:55 +00:00
Milton Wu
68247caafc Send metric intent back to SUW
Add metric intent if ChooseLockGeneric is triggered in SUW.
1. Save the result bundle data from ChooseLockGeneric to cache inside
   BiometricEnrollActivity and pass back to SUW after all finished.
2. Since fingerprint enrollment trigger points in SUW for
   fingerprint-only or fingerprint + faceAuth devices are all moved
   from SetupFingerprintEnrollIntroduction to BiometricEnrollActivity,
   remove deprecated code from SetupFingerprintEnrollIntroduction.

Bug: 235458700
Test: Manually test fingerprint enroll with SUW or w/o SUW
Test: Manually test fingerprint enroll with unicorn SUW
Test: atest BiometricEnrollActivityTest
Test: robo tests FingerprintEnrollIntroductionTest
Change-Id: I34b2884ab4c2c65d464d91eaef0f58c72dad438b
2022-07-22 08:53:48 +00:00
Milton Wu
504a659ba5 Run lock before fingerprint enroll
Run setOrConfirmCredentialsNow() before enrolling fingerprint for
fingerprint-only device.

Bug: 237433373
Test: atest BiometricEnrollActivityTest
Test: Manually test SUW flows for fingerprint-only device
      1. check confirm pin case
      2. check choose pin case
      3. enable always_finish_activities, check confirm pin case
      4. enable always_finish_activities, check choose pin case
Change-Id: I68da429145835fc79f83f3292749088dc25fdeee
2022-07-14 08:40:45 +00:00
Joshua McCloskey
cdb654f9be Fixed unicorn multi-enrollment flow.
Test: Verified that Unicorn SUW flows can now
enroll a face.
Test: Verified normal SUW flow works as expected.

Fixes: 237088482
Fixes: 234663447
Change-Id: I9c4100f61b5e7d40fc9ed67c6918ec7bf31fc30a
2022-06-28 17:08:40 +00:00
Joshua McCloskey
1dd4f54d58 SUW enrolls FP before Face
Test: During SUW verified Fingerprint enrollment
comes before face.
Test: During SUW enrolled multiple fingerprints than 1 face.
Test: Skipped and cancelled on every possible screen to ensure behavior
was correct.
Bug: 228607474

Change-Id: I4c50763a804fe4eb9d62451eb2f957545857723e
2022-04-18 19:42:35 +00:00
Joe Bolinger
d00fd7f362 Remove face auth from setup wizard when configured as a convenience.
Fix: 206867696
Test: manual (enroll via SUW with/without unicorn)
Change-Id: I41bf7488cf30ffe3e0d09282e923347c7f5938df
2021-11-23 00:59:31 +00:00
Kevin Chyn
156db33a56 Disable combined controller only if all modalities require consent
Additionally, ensure that consent is only requested for modalities
that have not been previously consented to. We retrieve the consent
requirement (which come from DPM) in onActivityResult instead of
onCreate, since the signal may not be ready immediately.

Fixes: 196060286
Fixes: 204592495
Test: make -j56 RunSettingsRoboTests ROBOTEST_FILTER=CombinedBiometricStatusPreferenceControllerTest

Change-Id: I984e61f28ffbf957c16cac4ea84f40b6ad7d8ae9
2021-11-16 12:32:56 -08:00
Joshua Mccloskey
f0a55f7c4e Fixed bug causing user to be stuck on face intro
Test: See below
Fixes: 203375738
Change-Id: I3e59191a8c936c7c7a3d8561e908593dbf9710b5

1. Enrolled a face during SUW
2. Pressed back on fingerprint enroll intro
3. Verified that the next button's text is chnaged to done
4. The done action launches the fingerprint enroll intro flow.

Change-Id: Id5d652257445e40426ade3d396a31ebf936cc348
2021-10-25 15:08:51 -07:00
Joe Bolinger
c11e01f39d Fix extra password confirm prompts during managed setup.
Managed accounts may set the pin/pattern before enrollment begins.

Fix: 191608999
Test: atest BiometricEnrollActivityTest
Change-Id: I4065989ecc26ce72ffd0e06e7c6e68029a11908f
2021-08-05 11:08:48 -07:00
Joe Bolinger
d5ea0ffe67 Skip enrollment when unicorn account is launched by setup wizard.
Bug: 194244555
Test: manual
Change-Id: Id310c5e4dec1b1c5262c9703259223ce21b1da61
2021-07-30 12:51:02 -07:00
Joe Bolinger
91d7545826 Limit biometric enrollments when Unicorn account is present.
This prevents biometric enrollment from happening after consent
has been obtained and is being managed by family link.

Note that this requires a corresponding change the setup wizard app
to work in most cases.

Bug: 193577587
Test: manual (enroll then relaunch SuW and repeat)
Change-Id: If260e49f38a141931d7f3362c1faf80ee7790232
2021-07-29 15:43:04 -07:00
Kevin Chyn
c702e1bfba Only launchHandoffToParent in SUW
Settings flow does not need to show this screen

Fixes: 192586840
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL --ez require_consent true --ez skip_return_to_parent <true/false>
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL --ez require_consent true
Test: atest com.android.settings.biometrics.ParentalConsentHelperTest

Change-Id: Ic2edbb5ec9693d05c89206d49249f59fd968aa2f
2021-07-02 12:04:06 -07:00
Joe Bolinger
47e8ddbdb9 Prevent finishing early on single sensor devices.
Fixes regression from commit c358adad56.

Fix: 192420564
Fix: 188847063

Test: manual enroll face & fingerprint via setup wizard (on fp, face, & fp+face device variants)
Change-Id: If7027e4d0ddf9d73daf91f174f237e4eb1621ea7
2021-06-30 14:21:04 -07:00
Joe Bolinger
c17876365a Revert "Revert "Return enrollment consent status to caller.""
This reverts commit c358adad56.

Reason for revert: Applying original change with additional change for single sensor devices.

Bug: 192420564
Bug: 188847063

Test: manual enroll face & fingerprint via setup wizard (on fp, face, & fp+face device variants)

Change-Id: Idfaaa2b6f4611056f9999325bac8401e28a7510b
2021-06-30 14:16:56 -07:00
bsears
c358adad56 Revert "Return enrollment consent status to caller."
This reverts commit eb1dac69f0.

Reason for revert: Based on bisection, this CL is the root cause for bug 192420564, which breaks Setup Wizard.

Bug: 192420564
Change-Id: I8d9aee7fe2415e134fcc981b0548bd9ce300db55
2021-06-30 14:53:13 +00:00
Joe Bolinger
eb1dac69f0 Return enrollment consent status to caller.
Bug: 188847063
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL --ez require_consent true
Change-Id: I3285b379e175539c37355c67749c3d900e6ac62b
2021-06-28 17:51:46 -07:00
Joe Bolinger
fb515ed608 Add handoff activity to parental consent flow.
Bug: 188847063
Test: manual
Change-Id: Ib6f38aae487a536fb8e85d608a22378a17c1bc64
2021-06-18 10:35:35 -07:00
Joe Bolinger
a8808f7368 Add plumbing and placeholder screens for parental consent flow.
Bug: 188847063
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL --ez require_consent true
Test: atest com.android.settings.biometrics.ParentalConsentHelperTest
Change-Id: Ie136036d5f550775fd0b021979581a5d222f1b68
2021-06-16 09:58:19 -07:00
Joshua Mccloskey
785203d51a Update multi biometric flow for SUW
Currently, if a user has completed a fingerprint/face enrollment
in SUW and they press the back button, we show the UI for each, and
it fails with no error.

This change makes it so that if a user completes 1 fingerprint or 1
face enrollment, it will no longer try and enroll them again if they
have failed.

Test: Manual
Bug: 191073296
Change-Id: I020c423b5d34797cd7c8be66a2e24051135c9be0
2021-06-14 19:59:23 -07:00
Kevin Chyn
3d20bf93fd Fix array out of bounds in BiometricEnrollActivity
Bug: 189876828
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Change-Id: I89f8ea1353cd9243c20c6184d579707da27e7b6f
2021-06-02 09:40:51 -07:00
TreeHugger Robot
0842cc9adc Merge "Prevent multi-sensor enrollment from doing nothing." into sc-dev 2021-05-07 20:25:35 +00:00
Joe Bolinger
955c8349ed Prevent multi-sensor enrollment from doing nothing.
Fix: 186499864
Test: manual (setup with managed account)
Change-Id: If2b2623b2e348ef9d335c81189dbe23e4fe5f003
2021-05-06 21:41:43 -07:00
Rubin Xu
8e4acdbf51 Refactor ChooseLockGenericController
* Move all logics around aggregating password policies
  to the controller
* Replace HIDE_DISABLED_PREFS and MINIMUM_QUALITY_KEY
  with HIDE_INSECURE_OPTIONS as all call sites are just
  using them to hide insecure screenlock options.
* Remove password policy aggregation logic from
  ChooseLockPassword and make it use policies passed in.
* Remove padlock from disabled screen lock options,
  per UX mock.
* Increase char limit for some strings

Bug: 177638284
Bug: 177641868
Bug: 182561862
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Test: 1. set profile password quality/complexity and enroll device lock
      2. set profile password quality/complexity and enroll work challenge
      3. set parent password quality/complexity and enroll device lock
      4. set parent password quality/complexity and enroll work challenge
      5. set profile and parent password complexity, then enroll work challenge
      6. set profile and parent password complexity, then unify work challenge
      7. Enroll device lock during SUW
Change-Id: Iba1d37e6f33eba7b7e8e1f805f8e37aaec108404
2021-05-06 23:09:27 +01:00
Joe Bolinger
43d978bd7b Fix back navigation in biometric enrollment.
Using the back buttons can cause a crash in at least two cases. Skipping
face enrollment and then starting/stopping any enrollment can lead to
an invalid token and failed HAT request. Backing out of the activity and
restarting it can also lead to using a stale token that fails.

Fix: 179336333
Test: manual on device
Change-Id: I0c1133e4c3d9c97997043ddc9374aa3cfc4f1c97
2021-05-04 14:43:17 -07:00
Curtis Belmonte
d758022916 Log new auth-related framework atoms for Android 12
Adds logging to Settings for new authentication and biometric atoms
introduced as part of ag/13856328.

Test: Manually trigger each case and verify log statements are called.

Bug: 185136248
Change-Id: Ic41a89da4f148dc94864f140e85b55f63643681b
2021-04-20 17:33:16 -07:00
Curtis Belmonte
5f1d13e3b0 Remove multi-biometric interstitial screen in SUW
On devices with multiple biometric sensors, this removes the
interstitial screen in Setup Wizard that let the user choose whether to
enroll face, fingerprint, or both. Instead, such devices will always
show face enrollment followed by fingerprint, with the option to skip
either or both.

Test: Manually tested all enroll/skip combinations in SUW

Fixes: 183720580
Change-Id: I7f045579f732196bde28dd96e9443e4bb4c906ae
2021-04-19 14:24:47 -07:00
Kevin Chyn
ee1dd50e74 Forward gatekeeper password handle to enrollment
Fixes: 169629017
Test: Wipe device, go through setup flow with a managed account.
      Successfully set up credential and fingerprint

During the conversion to GkPwHandle (instead of HAT), the code in
Choose/ConfirmLock* and most of the biometric paths were updated, with
the exception of 2a below.
1) Only multi-biometric devices request Choose/ConfirmLock in
   BiometricEnrollActivity.
2) Single-biometric devices (in almost all paths) request credentials
   in their intro activities (FingerprintEnrollIntro, etc).
2a) However, there is a special path used by work profiles where
    credentials are first set up, and the GkPwHandle is passed into
    BiometricEnrollActivity, with the request to skip the fingerprint
    enroll introduction page. In this case, we must remember to
    forward the GkPwHandle to the relavent enrollment page
    (FingerprintEnrollFindSensor).

At some point in the future we should have all credential stuff
done in BiometricEnrollActivity. However, due to legacy APIs, etc,
it may be more work than it's worth right now.

Change-Id: I3f95876de6969fee7130d7a19c8db363da69c4c2
2020-12-16 12:34:44 -08:00
pihuei
55fb2b745d Use system day/night to switch theme instead of from intent extra.
Use value-night to give theme instead of directly from intent extra when Setup day/nNight mode enabled and in Setup flow

Before:
<vision settings>
https://hsv.googleplex.com/4837266235064320
<wifi dialog>
https://hsv.googleplex.com/5687053981319168
<lock screen with disabling button>
https://hsv.googleplex.com/4843506419892224
<lock screen with enabling button>
https://hsv.googleplex.com/5650348922372096
<fingerprint intro>
https://hsv.googleplex.com/5133769046491136
<fingerprint touch>
https://hsv.googleplex.com/5681937198874624
<fingerprint left touch>
https://hsv.googleplex.com/5767441676238848
<squeeze release>
https://hsv.googleplex.com/6632476812247040

After:
<vision settings>
https://hsv.googleplex.com/6213298875793408
<wifi dialog>
https://hsv.googleplex.com/6025790804197376
<lock screen with disabling button>
https://hsv.googleplex.com/5747461219942400
<lock screen with enabling button>
https://hsv.googleplex.com/5766700781797376
<fingerprint intro>
https://hsv.googleplex.com/6751334529236992
<fingerprint touch>
https://hsv.googleplex.com/5625963293442048
<fingerprint left touch>
https://hsv.googleplex.com/4518139360444416
<squeeze release>
https://hsv.googleplex.com/5220720579706880

Bug: 169734655
Test: robo test
Change-Id: I4aab843e28a932c7b823f36f1d8df1e5b2341f4e
2020-11-05 05:09:14 +00:00
Kevin Chyn
587bd62dff Update settings together with frameworks/base
Bug: 169459906
Test: Builds

Exempt-From-Owner-Approval: Name change

Change-Id: I453d743fe29c33776a784942863dcba19c67c26a
2020-09-29 18:19:16 -07:00
Kevin Chyn
8d63b98272 Update settings together with frameworks/base
Bug: 169195610
Test: Builds
Change-Id: I2c732dba78eb8c90ef71351562415e06949b31bb
2020-09-23 00:17:56 -07:00
Kevin Chyn
87bb772e16 2/n: Add default implementation for multi-biometric enroll
1) Adds a layout for multi-biometric selection in BiometricEnrollActivity
2) Adds widgets for checkboxes
3) Shows ConfirmLock*/ChooseLock* for multi-biometric devices in
   BiometricEnrollActivity
4) finish()'s when loses foreground
5) Adds default string for ChooseLock* and multi-biometrics, e.g.
   "Set up Password + Biometrics", as well as associated plumbing
   to bring the user back to BiometricEnrollActivity once the
   credential is enrolled
6) When max templates enrolled, checkbox becomes disabled and
   description string is updated

Bug: 162341940
Bug: 152242790
Fixes: 161742393

No effect on existing devices with the following:
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW
Test: make -j RunSettingsRoboTests

Exempt-From-Owner-Approval: Biometric-related change
to EncryptionInterstitial

Change-Id: I855460d50228ace24d4ec5fbe330f02ab406cc02
2020-09-16 23:30:11 -07:00
Kevin Chyn
eb8c0f14ea 1/n: Clean up BiometricEnrollActivity
Test: fingerprint and face enroll via
      adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: credential enroll via
      adb shell am start -a android.settings.BIOMETRIC_ENROLL --ei android.provider.extra.BIOMETRIC_AUTHENTICATORS_ALLOWED 32768

Bug: 162341940
Bug: 152242790
Change-Id: Idfdf96891ba9a2394f61eedb0adde2adf9fd85e6
2020-09-09 15:07:24 -07:00
Kevin Chyn
202494365c Update settings together with frameworks/base
LockSettingsService returns a handle to the gatekeeper password
instead of the password itself now. As such, update areas of code
accordingly.

Bug: 161765592

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Ibc71ec88f8192620d041bfd125f400371708b296
2020-08-16 12:38:27 -07:00
Kevin Chyn
7b0867c6d3 4/n: Remove challenge from choose/confirm, use new path
Biometric enrollment will not request a Gatekeeper HAT during
initial credential setup or credential confirmation anymore.
Instead, it is broken down into the following steps now.

Bug: 161765592

1) Request credential setup / confirmation to return a
   Gatekeeper Password
2) Biometric enrollment will generate a challenge
3) Biometric enrollment will request LockSettingsService to
   verify(GatekeeperPassword, challenge), and upon verification,
   the Gatekeeper HAT will be returned.

Since both LockSettingsService and Biometric enroll/settings
make use of biometric challenges, this allows us to make the
challenge ownership/lifecycle clear (vs. previously, where
LockSettingsService has no idea who the challenge belongs to).

Exempt-From-Owner-Approval:For files not owned by our team,
(StorageWizard), this change is just a method rename

Test: RunSettingsRoboTests

Run the following on face/fingerprint devices
Test: Remove credential
      adb shell am start -a android.app.action.SET_NEW_PASSWORD
      Set up credential + fingerprint
Test: Remove credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ChooseLock* logic in FingerprintSettings
Test: Set up credential,
      adb shell am start -a android.settings.FINGERPRINT_SETTINGS
      This tests the ConfirmLock* logic in FingerprintSettings
Test: Remove device credential, enroll fingerprint/face. Succeeds.
      This tests the ChooseLock* returning SP path from
      BiometricEnrollIntro
Test: With credential and fingerprint/face enrolled, go to
      fingerprint/face settings and enroll. This tests the
      ConfirmLock* path in Fingerprint/FaceSettings
Test: Remove device credential, enroll credential-only, enroll
      fingerprint/face separately. Succeeds. This tests the
      ConfirmLock* returning SP path in BiometricEnrollIntro
Test: In SUW, set up credential, then biometric. This tests
      the ChooseLock* path in SUW
Test: In SUW, set up credential, go back, then set up biometric.
      This tests the ConfirmLock* path in SUW

Change-Id: Idf6fcb43f7497323d089eb9c37125294e7a7f5dc
2020-08-07 12:49:15 -07:00