Commit Graph

3 Commits

Author SHA1 Message Date
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
5174310392 Fix FingerprintEnrollmentActivity rotaiton crash
1. When FragmentActivity rotated, FragmentManager will call default
   fragment constructor w/o parameters. Remove parameters of
   FingerprintEnrollIntroFragment constructor. And also remove
   BiometricsFragmentFactory because of useless now.
2. Remove some LiveData inside AutoCredentialViewModel because it causes
   jitter on activity transition.
3. Save and restore data inside AutoCredentialViewModel for handling
   activity recreation during rotation.
4. clear FingerprintEnrollIntroViewModel.mActionLiveData to prevent
   that activity gets previous action after recreate
5. Fix launching wrong activity during setupwizard

Bug: 259626932
Test: atest AutoCredentialViewModelTest CredentialModelTest
            FingerprintEnrollIntroViewModelTest
Change-Id: Ia26c86dc99ad91dbddef90538d9f5e5583585063
2022-11-22 18:18:44 +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