[automerge] Use migrated severity levels 2p: 2a775c69fc

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17384684

Bug: 225388845
Change-Id: I9aae5c32f87f2b225547e3d36dac94f5d2646ca5
This commit is contained in:
Giulio Fiscella
2022-03-24 19:10:17 +00:00
committed by Presubmit Automerger Backend
4 changed files with 20 additions and 23 deletions

View File

@@ -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();

View File

@@ -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();