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
This commit is contained in:
Kevin Chyn
2021-08-12 16:03:51 -07:00
parent ef0a786bd7
commit 156db33a56
5 changed files with 81 additions and 22 deletions

View File

@@ -167,8 +167,8 @@ public class ParentalConsentHelperTest {
}
// initial consent status
final ParentalConsentHelper helper =
new ParentalConsentHelper(requireFace, requireFingerprint, gkpw);
final ParentalConsentHelper helper = new ParentalConsentHelper(gkpw);
helper.setConsentRequirement(requireFace, requireFingerprint);
assertThat(ParentalConsentHelper.hasFaceConsent(helper.getConsentResult()))
.isFalse();
assertThat(ParentalConsentHelper.hasFingerprintConsent(helper.getConsentResult()))