In legacy flow FaceEnrollIntroduction check maxFacesEnrolled() then update introduction description and prevent user go to next enroll step, the CUJ was not good to user, instead bring user to Face Settings and let user decide the next action(Delete face or change config) is more make sense. As any applications could broadcast intent(android.settings.FACE_ENROLL) to bring FaceEnrollIntroduction up, we add a check in onCreate() and check if device has been enrolled max face, launch FaceSettingsInternalActivity. In addition, skip to register any posture change callback when maxFacesEnrolled() during activity onStart(). Test: atest SettingsGoogleUnitTests Test: m -j SettingsGoogleRoboTests RunSettingsGoogleRoboTests Test: m RunSettingsRoboTests ROBOTEST_FILTER= \ "FaceEnrollIntroductionTest" Test: m RunSettingsRoboTests ROBOTEST_FILTER= \ "FingerprintEnrollIntroductionTest" Test: Manual enrolled face, unfold device, launch Tips Security page and click "Set up Face Unlock", device launch Face Settings insteand of posture guidance page. Bug: 263830403 Change-Id: Ied8b92259810f954ce6b2daaa9b87fc996ad752a
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.