Use migrated severity levels

Bug: 225388845
Test: atest SettingsUnitTests
Change-Id: I8e7f06dc8fa7c96c14de738e19dee11ec967bb0c
This commit is contained in:
Giulio Fiscella
2022-03-24 16:52:29 +00:00
parent 6141b22325
commit 2a775c69fc
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();