Commit Graph

36 Commits

Author SHA1 Message Date
Shawn Lin
52874a641a Support the ability to enroll face unlock first
Add a new EXTRA value to indicate whehter the face enrollment should be
launched first.

Bug: 370940762
Test: atest BiometricEnrollActivityTest
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: I7c85212c7fbcc6fe9dd53a26515412623c80ecbf
2025-03-03 06:17:25 +00:00
Jason Chang
b5857a7af9 Fix for checking SUW/Setting Expressive style API
Flag: EXEMPT use SUW/Settings Expressive style API to check

Bug: 394223273

Test: build and manually check the UI and its behaviors
Change-Id: Iecbe443a20c4a228a6bd14fd061b0a731fbbd95a
2025-02-20 09:29:21 +00:00
Jason Chang
8889927181 Apply Expressive style "More” page-down button for Settings
Face Enroll Introduction page

Flag: EXEMPT use SUW/Settings Expressive style API to check

Bug: 394223273

Test: build and manually check the UI and its behaviors
Change-Id: Iad9d6a53363fabad05b45a822f8ba6f1b83b9d7b
2025-02-11 17:41:04 +00:00
Shawn Lin
962f57dc3d [Biometric Onboarding & Edu] Update Set up Face Unlock page
Update icons, strings and layouts for new UX design

Bug: 370940762
Test: manual:
      Pre condition - no face enrolled
      Go Settings>Security & privacy>Device unlock>Face unlock
Test: atest FaceEnrollTest
Flag: com.android.settings.flags.biometrics_onboarding_education
Change-Id: Ie469c47005afb941f5646a2f790736362c23c697
2025-01-02 23:49:00 -08:00
MiltonWu
694fe0751a Customize Fingerprint enroll activities
Provide an interface for ODM/OEM to override Fingerprint enrollment
activities.

Bug: 364794493
Flag: EXEMPT can't apply flag for manifest change
Test: atest SettingsRoboTests:FingerprintEnrollTest
Change-Id: Ic519970a3837614b3d4c8cb2f6d75967ae838208
2024-09-09 14:49:09 +00:00
Vincent Wang
e9c4adfaf1 Remove package biometric2 from AOSP settings
Flag: EXEMPT Remove legacy code from AOSP
Bug: 351977012
Test: Build pass
Change-Id: I2285ab8cc2776071c329d7432849aeffc28ed8ee
2024-07-11 00:06:41 +00:00
Joshua McCloskey
e5f62676c8 Adding biometric FRR Notification atom.
Test: statsd_testdrive 793
Test: statsd_testdrive 184
Test: m -j50 RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.biometrics
Test: atest FingerprintUpdaterTest FaceUpdaterTest
Bug: 302171089

Change-Id: I4c921b75321db79cc975b98b54b176a43379cd7c
2024-02-15 19:09:35 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Bill Lin
88bc013487 Merge "Update screen lock and biometrics options in order" into udc-qpr-dev am: 8ea74c3d76 am: f0278e6835
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23896224

Change-Id: I470152428e4fe0ecf1fc9e8f3d499fca89d114db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-14 02:06:19 +00:00
lbill
7f8197da82 Update screen lock and biometrics options in order
Previously the screen lock and biometrics order is :
UI & UX: b/182806496, b/183649070
- PIN • Face • Fingerprint
- Pattern • Face • Fingerprint
- Password • Face • Fingerprint

By requirement, we need to reverse Fingerprint & Face position
- PIN • Fingerprint • Face
- Pattern • Fingerprint • Face
- Password • Fingerprint • Face

Also remove unused strings

Fixes: 242143765
Test: Manual login corp, and observe the UI in Choose screen lock
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Change-Id: I1938f867360512121ecfdae8e2ca6de7002156f4
2023-07-11 12:30:22 +00:00
Milton Wu
bc2dbee762 [BiometricsV2] Refine fingerprint activities
Seperate FingerprintEnrollmentActivity to another InternalActivity and
SetupActivity. InternalActivity is used for FingerprintSettings.
SetupActivity is used for setupwizard flow.

Bug: 284248001
Test: atest FingerprintEnrollmentActivityTest
Test: atest for biometrics/biometrics2 in unit tests
Test: settingRoboTest for biometrics
Change-Id: I9fb5dc34300060b9ccf857a3335b81a5d4bf5c7b
2023-05-25 06:25:58 +00:00
lbill
67d6dff7cc Refine SkipDialog title and desc by device configs
1. Wrap isFaceSupportedInSUW() in Settings Utils
2. Wrap getCombinedScreenLockOptions in Settings Utils
3. Add EXTRA_KEY_FOR_SUW to judge if in SUW flow
4. Refactor SetupSkipDialog by hasFace, hasFingerprint,
   isSuw, isFaceSupported conditions
5. Clean up the mapping logic of SetupSkipDialog
6. Replace bools with @LockPatternUtils.CredentialType
7. Refine the logic for isFaceSupported
   ---------------------------------------
   Config |SuwSupportFace|!SuwSupportFace|
    isSuw |    true      |      false    |
   !isSuw |   hasFace    |     hasFace   |

Bug: 263070591
Bug: 279389803
Bug: 279195215
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Test: SUW(workprofile), post-SUW
Test: m RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.password
Test: m RunSettingsRoboTests ROBOTEST_FILTER=SetupSkipDialogTest
Change-Id: Ie7af4299695dc3983b4190929b4dd659c301c082
2023-05-09 09:55:52 +00:00
Milton Wu
94b421b253 Refine FingerprintEnrollmentActivity
1. Fix backstacks after enrolling finish
2. Support skipFindSensor and skipIntro

Bug: 260957939
Test: Manually test it on different sensor devices
Change-Id: I4061e29999a47bf4859d6562ad82330fb0f6f620
2023-02-25 08:08:31 +00:00
Diya Bera
271362af05 Merge "Fixes background color in SUW fingerprint enrollment" into tm-qpr-dev am: dc071e94cd am: 81ab030e4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20919289

Change-Id: I2d25a70f82548cc1ae754a8b6376fbc831f1f0e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12 00:55:03 +00:00
Diya Bera
00dfcd83dc Fixes background color in SUW fingerprint enrollment
Test: Manual (Enroll fingerprint in SUW, background color remains the
same)
Bug: 246231650
Bug: 250464527

Change-Id: Iffd1543d8b230199c3b925c6538bd418a381c96a
2023-01-09 23:52:34 +00:00
lbill
ee6366761b 3-1/ Impl FoldProvider.FoldCallback for Face enroll activities
Create a mechanism to allow OEM config posture guidance with
'config_face_enroll_guidance_page', and customize the config
'config_face_enroll_supported_posture' with standard postures
         0 : DEVICE_POSTURE_UNKNOWN
         1 : DEVICE_POSTURE_CLOSED
         2 : DEVICE_POSTURE_HALF_OPENED
         3 : DEVICE_POSTURE_OPENED
         4 : DEVICE_POSTURE_FLIPPED
For example, if we set 1 for the device, then device only
allow to enroll face in closed(folded) state, if device do
not in the allow state, we will prompt specific guidance
page activity defined in config_face_enroll_guidance_page.

At this stage , we only integrate 2 states OPENED/CLOSED through
ScreenSizeFoldProvider and register for onFoldUpdated() callback
- isFold(DEVICE_POSTURE_CLOSED): finish posture guidance
- !isFold(DEVICE_POSTURE_OPENED): launch posture guidance
- onActivityResult : reset mOnGuidanceShown false

1. Fix A11y lottie animation bug
2. Impl FoldProvider.FoldCallback
3. Register callback to ScreenSizeFoldProvider
4. Integrate back stack, skip, cancel events
   - Back key : RESULT_CANCELED
   - Skip btn : RESULT_SKIP
   - Posture changed : RESULT_FINISHED
5. Set single instance for relative activities
6. FaceEnrollFoldPage listen for onConfigurationChanged()
7. Add empty face_posture_guidance_lottie.json for overlay

Test: atest SettingsGoogleUnitTests
Test: m -j SettingsGoogleRoboTests RunSettingsGoogleRoboTests
Test: m RunSettingsRoboTests ROBOTEST_FILTER= \
      "com.android.settings.biometrics.face.FaceEnrollEducationTest"
Test: m RunSettingsRoboTests ROBOTEST_FILTER= \
      "com.android.settings.biometrics.face.FaceEnrollIntroductionTest"
Test: Manual launch security settings face enroll, unfold device
and observe posture guidance showing fullscreen on top
Test: Fold device ensure the posture guidance activity finish
Bug: 261141826
Fixes: 231908496

Change-Id: Ib9f43f82f7d19f3f187c2f6f8984e76cd843afbc
2023-01-06 19:54:03 +00:00
Milton Wu
160661dc6d Launch settings for clicking fingerprint unlock
Launch FingerprintSettings directly when user clicks "Fingerprint
Unlock". Let Fingerprint settings peform confirmLock() or chooseLock().
And to have smoothly animation, instead of generating challenge in
FingerprintSettings::onActivityResult(), challenge is generated in next
visible activity, and pass it back through next activity result.

Bug: 197717071
Test: atest GatekeeperPasswordProviderTest CredentialModelTest
Test: atest AutoCredentialViewModelTest FingerprintStatusUtilsTest
Test: RunSettingsRoboTests2 FingerprintEnrollIntroductionTest
Test: Manually test fingerprint enroll in settings or suw
Change-Id: Ie27c3c493ea475f6b53cb6bb3f2d45d555f47cb3
2022-12-30 10:01:06 +08:00
Milton Wu
a174486803 Fix face enroll introduction crash after 10mins
When requestGatekeeperHat() throws exception in FaceEnrollIntroduction
page, remove gk_pw_handle and recreate activity to trigger confirmLock.

Test: robotest for FaceEnrollIntroductionTest
Bug: 234437174
Change-Id: Ie1dd6f36e4deb3f776e3b39acd165fc47d04f526
2022-11-17 06:57:21 +00:00
Milton Wu
ee5ebfa18f Apply feature flag for biometrics
adb shell setprop sys.fflag.override.settings_biometrics2_enrollment true

Bug: 236072782
Test: Manully enable feature flag and test
Change-Id: Id794ba117d3ae9e0bc76086ee8c1cd95fa607cc1
2022-11-14 15:36:09 +08:00
Milton Wu
b9b8b8a512 Fingerprint Introduction FragmentActivity
Introducing MVVM architecture & fragments to biometric settings.
Here, we modify the first page of FingerprintEnrollIntroduction to use
new MVVM with Fragment architecture.

And with this new architecture, unit test and screen order will be
easier to be written or changed.

Bug: 236072782
Test: atest FingerprintEnrollmentViewModelTest AutoCredentialViewModelTest
	    FingerprintEnrollIntroViewModelTest FingerprintRepositoryTest
Change-Id: Icf12c91625db86c2c99081a0108203e607e77f74
2022-11-14 15:36:03 +08:00
Joshua Mccloskey
a30bfbd90d Merge "Fixed unicorn multi-enrollment flow." into tm-d1-dev am: 431542dddc am: e30a71787e am: 54b7ac755a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19093051

Change-Id: I8a39ef5bcd58b5d525e5933a95bbbf28ae1a30c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-29 18:03:20 +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
Eric Biggers
ff16ec8542 Use StorageManager.isFileEncrypted() instead of deprecated methods
Since emulated FBE is no longer supported, isFileEncryptedNativeOnly()
and isFileEncryptedNativeOrEmulated() are the same as the new method
isFileEncrypted().  Replace all calls to these deprecated methods in
this repository with isFileEncrypted().

Bug: 232458753
Change-Id: I95beea86ef771396c2e08f2d6a643fdc629ad89f
2022-06-10 17:42:38 +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
Joshua Mccloskey
0902b44744 Added lottie animations for udfps side/tip
Bug: 209807883
Test: Verified animations show for multiple devices.
Change-Id: Ic63a0eca226309b92aa64cb4f80791ef179b8154
2022-01-14 07:30:08 +00:00
Joe Bolinger
493e889dd6 Update remove face enrollment strings for convenience.
Fix: 209877102
Test: manual (enroll & delete)
Change-Id: Idb3a8d3622574edc47673e8fe6a72a5b9d449c7b
2021-12-09 19:24:27 +00:00
Kevin Chyn
715e337af8 Add debugReason to BiometricUtils#tryStartingNextBiometricEnroll
Bug: 196060286
Test: adb shell am start -a android.settings.BIOMETRIC_ENROLL
Change-Id: Ib157dd916b1cfd2238cf6844a970d70cbf56faa6
2021-08-11 16:35:35 -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
Curtis Belmonte
cef573f2d0 Consolidate face enroll intro/consent screens
Updates the UI of the face enroll intro screen based on the latest
mocks, while still allowing strings to be overlaid depending on the
device and/or face auth implementation.

Test: Manually tested face enrollment

Bug: 187207438
Change-Id: I5d912261b1eecfc7a241d6b48d549c4ff253ecdf
2021-05-12 17:26:17 -07: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
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
Curtis Belmonte
91f88d6186 Add a config for the face enroll introduction activity
Test: manual

Bug: 185426108
Change-Id: I42e1f8dd5a20e8066fbd1374283acc1228427d45
2021-04-14 17:39:02 -07:00
Mill Chen
474093e8cc Add a reverse landscape layout for UDFPS
Bug: 181614043
Test: visual verified
1) Settings -> Security -> Fingerprint
2) Follow the setup flow to find sensor page and enrolling page
3) Rotate your device and see if fingerprint icon is overlapping with
the title.

Change-Id: Ia1202e9688f2472c8063287164f4fc8f479cdae9
2021-03-29 11:53:13 +08: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
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