Minor bug fixes for Lockscreen Safety Center source

- use correct severity enum for issues
- update biomterics on lockscreen change
- clean up some nearby tests to use eq matcher instead of captor

Test: SettingsUnitTests
Test: Manually tested
Bug: 223170514
Bug: 222338885
Change-Id: I4e28a418473cbe7cd5d75daf0d62776654fa7917
This commit is contained in:
Marie Matheson
2022-03-07 17:19:18 +00:00
parent 768a07fb9e
commit cc97297375
2 changed files with 24 additions and 22 deletions

View File

@@ -96,6 +96,10 @@ public final class LockScreenSafetySource {
context,
new ScreenLockPreferenceDetailsUtils(context, SettingsEnums.SAFETY_CENTER),
new SafetyEvent.Builder(SAFETY_EVENT_TYPE_SOURCE_STATE_CHANGED).build());
// Also send refreshed safety center data for biometrics, since changing lockscreen settings
// can unset biometrics.
BiometricsSafetySource.onBiometricsChanged(context);
}
private static IconAction createGearMenuIconAction(Context context,
@@ -126,7 +130,7 @@ public final class LockScreenSafetySource {
NO_SCREEN_LOCK_ISSUE_ID,
context.getString(R.string.no_screen_lock_issue_title),
context.getString(R.string.no_screen_lock_issue_summary),
SafetySourceStatus.STATUS_LEVEL_RECOMMENDATION,
SafetySourceIssue.SEVERITY_LEVEL_RECOMMENDATION,
NO_SCREEN_LOCK_ISSUE_TYPE_ID)
.setIssueCategory(SafetySourceIssue.ISSUE_CATEGORY_DEVICE)
.addAction(action).build();