Commit Graph

15 Commits

Author SHA1 Message Date
lbill
09276c9639 Count isActivityEmbedded() state to show split screen warning dialog
According to Activity#isInMultiWindowMode() API design,
When the Task is in fullscreen windowing mode, and the app is in
ActivityEmbedding split (two activities split left and right),
Activity.isInMultiWindowMode() == true.

With the reason, we should consider additional condidion for
foldable device in unfolded mode, while settings activities
config to embedded activity, we can't only count on
isInMultiWindowMode() for split-screen mode

Bug: 278176550
Bug: 276938441
Test: atest CombinedBiometricProfileSettingsTest
Test: atest FingerprintSettingsFragmentTest
Test: manaul go to split screen mode and try to enroll face
Test: manual unfold device and enroll finger or face
Change-Id: I02bd223f27889e74e67b73051531a5b4554f3de1
2023-04-14 09:57:04 +00:00
Milton Wu
52a46d0a85 Pass Timeout back to upper biometric preference
When FaceSettings or FingerprintSettings are closed because of onStop(),
this information can't been passed back to previous Preference screen,
CombinedBiometricSettings, because handlePreferenceTreeClick() from
AbstractPreferenceController class only can launchActivity() throguh
preference's Context.

In order to recevice the activity result code from FaceSettings or
FingerprintSettings, add handleBiometricPreferenceTreeClick() method in
BiometricStatusPreferenceController. Then CombinedBiometricSettings uses
this method to show FaceSettings or FingerprintSettings through
launchActivityForResult().

Bug: 263057093
Test: atest BiometricNavigationUtilsTest
Test: Manually open camera through double-click power key on different
      pages inside "Face & Fingerprint Unlock"
Change-Id: I99167739766ad5ea5f204b0f0543ba6ad18fac31
2023-04-13 09:02:18 +00:00
Hao Dong
64277a23bb Show a dialog preventing face enrollment in split mode.
Test: atest CombinedBiometricProfileSettingsTest
Test: atest FingerprintSettingsFragmentTest
Test: manaul test- go to split screen mode and try to enroll
face
Bug: 276938441

Change-Id: I45e859b453700aa79f7774fb5deda81b1f30e5a5
2023-04-07 21:53:52 +00:00
Hao Dong
ee8252b56b Show a dialog preventing fingerprint enrollment in split mode.
Test: atest CombinedBiometricProfileSettingsTest
Test: atest FingerprintSettingsFragmentTest
Test: manaul test- go to split screen mode and try to enroll
fingerprint
Bug: 246247132

Change-Id: I12357d197f2ceda8c1f1f582cdecb20fd18e30f7
2023-04-03 18:02:22 +00:00
Derek Jedral
053a9f8947 Route to active unlock component
Update onRetryPrefenceTreeClick to check for the active unlock
preference. If biometrics are not enrolled and we're using the
biometric failure model, launch the biometric setup flow. Otherwise,
launch the  component directly.

Test: manual flag flip, confirm activity launches
Bug: 266441818
Change-Id: I8f3ce8f8366b65aad622d33ff7f99f5c82aae3e8
2023-01-30 16:48:52 -08:00
Derek Jedral
9134f24f31 Update text when Active Unlock is enabled.
Update the security summary, intro, and unlock your phone summary when
Active Unlock is enabled and enrolled on the device.

Test: make RunSettingsRoboTests
Test: manually flip flags, confirm combined page has updated strings
Bug: 264812018
Change-Id: I2843e9f3aa0f38a9f2ebb18d60fed6293f9ce36e
2023-01-30 16:48:52 -08:00
Milton Wu
5a47cf56ef Retry fingerprint or face unlock
When IllegalStateException happens during user enters `Fingerprint
Unlock` or `Face Unlock` page through `Face and Fingerprint Unlock`
page, show ConfirmLock for user to re-enter credential again.
If user fails to pass credential page, finish activity and back to
`Security` page.
If user success to pass credential page, enter `Fingerprint Unlock` or
`Face Unlock` page.

Test: Manully test timeout case on `Face and Fingerprint Unlock` page
Test: robotest for CombinedBiometricProfileSettingsTest
      FaceSettingsLockscreenBypassPreferenceControllerTest
Bug: 248165760
Change-Id: I3361c38d09d14461db8ecf2d89a34ba9604dc7e8
2022-10-19 23:55:39 +08:00
Joe Bolinger
e167f9ed0a Cache context for generateChallenge response.
Fix: 232678514
Test: manual
Change-Id: I7deac5f296260bf667b15300e600195c42c0cbc1
2022-08-18 00:49:38 +00:00
Curtis Belmonte
a9c582262e Make biometric setting toggles show dynamic auth types
Updates the preference toggles shown on the combined biometric settings
screen to indicate which types of biometric sensor (e.g. face and/or
fingerprint) each setting applies to. This is done by checking the
maximum registered strength for each type of sensor.

Test: Manual

Bug: 193714498
Bug: 201306569
Change-Id: I1f27bbe1fdd172ebc899c3c5f1daef9095b338bd
2021-09-27 15:55:43 -07:00
Yi-Ling Chuang
9312dc83fa Apply sliding transition to biometric settings
Bug: 187542491
Test: rebuild
Change-Id: Ife645785a37c4ac838204d0613dffd5a5911a47e
2021-06-04 15:49:43 +08:00
Joe Bolinger
eb5fd6ec30 Prevent duplicate lock confirmation in face & fingerprint settings.
Wait for all extras to be available before launching the next activity.

Fix: 187005993
Test: manual (open face/fp settings & verify only asked for PIN once)
Change-Id: I9e3f46d5750b11ab0773d08d44908d3e9703ca42
2021-05-21 20:55:11 +00:00
Joe Bolinger
971f0f3c5a Add userId parameter to all uses of challenge in settings.
Bug: 184915229

Test: manually on device (as normal, extra user, & work profile)
Change-Id: Id509b5866d53525b38a5bb95bbbcc723d6651745
2021-05-10 18:26:57 -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
Kevin Chyn
1f0cd17e3e Fix several challenge paths
1) Combined settings page should finish() when losing foreground
   (but not if fingerprint or face settings are launched from it)
2) Challenge should be generated when entering FaceSettings or
   FingerprintSettings each time. This allows us to leave the existing
   revokeChallenge paths in FaceSettings and FingerprintSettings.

Fixes: 186257202
Test: Manual

Change-Id: I1b6452f787279001a71628f220c01fcb86b88f3d
2021-04-28 13:01:28 -07:00
Mill Chen
8843157b01 Update confirming credential flow for biometric settings
The combined biometrics settings has been integrating face and
fingerprint authentication together, so the confirming credential flow
has to be invoked before entering biometrics settings page.

Bug: 183449119
Test: manual
Change-Id: I3c0d059241cb10a254868c2e388c4d3b20305b10
2021-04-23 15:33:32 +08:00