Use migrated severity levels
Bug: 225388845 Test: atest SettingsUnitTests Change-Id: I8e7f06dc8fa7c96c14de738e19dee11ec967bb0c
This commit is contained in:
@@ -25,7 +25,6 @@ import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.safetycenter.SafetyEvent;
|
||||
import android.safetycenter.SafetySourceData;
|
||||
import android.safetycenter.SafetySourceSeverity;
|
||||
import android.safetycenter.SafetySourceStatus;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -122,8 +121,8 @@ public final class BiometricsSafetySource {
|
||||
Intent clickIntent, boolean enabled, boolean hasEnrolled, SafetyEvent safetyEvent) {
|
||||
final PendingIntent pendingIntent = createPendingIntent(context, clickIntent);
|
||||
final int severityLevel =
|
||||
enabled && hasEnrolled ? SafetySourceSeverity.LEVEL_INFORMATION
|
||||
: SafetySourceSeverity.LEVEL_UNSPECIFIED;
|
||||
enabled && hasEnrolled ? SafetySourceData.SEVERITY_LEVEL_INFORMATION
|
||||
: SafetySourceData.SEVERITY_LEVEL_UNSPECIFIED;
|
||||
|
||||
final SafetySourceStatus status = new SafetySourceStatus.Builder(title, summary,
|
||||
severityLevel).setPendingIntent(pendingIntent).setEnabled(enabled).build();
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.os.UserHandle;
|
||||
import android.safetycenter.SafetyEvent;
|
||||
import android.safetycenter.SafetySourceData;
|
||||
import android.safetycenter.SafetySourceIssue;
|
||||
import android.safetycenter.SafetySourceSeverity;
|
||||
import android.safetycenter.SafetySourceStatus;
|
||||
import android.safetycenter.SafetySourceStatus.IconAction;
|
||||
|
||||
@@ -71,9 +70,9 @@ public final class LockScreenSafetySource {
|
||||
final boolean isLockPatternSecure = screenLockPreferenceDetailsUtils.isLockPatternSecure();
|
||||
final int severityLevel = enabled
|
||||
? isLockPatternSecure
|
||||
? SafetySourceSeverity.LEVEL_INFORMATION
|
||||
: SafetySourceSeverity.LEVEL_RECOMMENDATION
|
||||
: SafetySourceSeverity.LEVEL_UNSPECIFIED;
|
||||
? SafetySourceData.SEVERITY_LEVEL_INFORMATION
|
||||
: SafetySourceData.SEVERITY_LEVEL_RECOMMENDATION
|
||||
: SafetySourceData.SEVERITY_LEVEL_UNSPECIFIED;
|
||||
|
||||
|
||||
final SafetySourceStatus status = new SafetySourceStatus.Builder(
|
||||
@@ -138,7 +137,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),
|
||||
SafetySourceSeverity.LEVEL_RECOMMENDATION,
|
||||
SafetySourceData.SEVERITY_LEVEL_RECOMMENDATION,
|
||||
NO_SCREEN_LOCK_ISSUE_TYPE_ID)
|
||||
.setIssueCategory(SafetySourceIssue.ISSUE_CATEGORY_DEVICE)
|
||||
.addAction(action).build();
|
||||
|
||||
Reference in New Issue
Block a user