Loading services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java +11 −9 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, FACE_RE_ENROLL_CHANNEL, showNotificationHelper(context, name, title, content, pendingIntent, FACE_RE_ENROLL_CHANNEL, FACE_RE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); Notification.CATEGORY_SYSTEM, FACE_RE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); } } /** /** Loading @@ -101,7 +102,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, FACE_ENROLL_CHANNEL, showNotificationHelper(context, name, title, content, pendingIntent, FACE_ENROLL_CHANNEL, FACE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); Notification.CATEGORY_RECOMMENDATION, FACE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); } } /** /** Loading @@ -124,8 +126,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, showNotificationHelper(context, name, title, content, pendingIntent, FINGERPRINT_ENROLL_CHANNEL, FINGERPRINT_ENROLL_NOTIFICATION_TAG, Notification.CATEGORY_RECOMMENDATION, FINGERPRINT_ENROLL_CHANNEL, Notification.VISIBILITY_PUBLIC); FINGERPRINT_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); } } /** /** Loading Loading @@ -159,13 +161,13 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, showNotificationHelper(context, name, title, content, pendingIntent, FINGERPRINT_BAD_CALIBRATION_CHANNEL, BAD_CALIBRATION_NOTIFICATION_TAG, Notification.CATEGORY_SYSTEM, FINGERPRINT_BAD_CALIBRATION_CHANNEL, Notification.VISIBILITY_SECRET); BAD_CALIBRATION_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); } } private static void showNotificationHelper(Context context, String name, String title, private static void showNotificationHelper(Context context, String name, String title, String content, PendingIntent pendingIntent, String channelName, String content, PendingIntent pendingIntent, String category, String notificationTag, int visibility) { String channelName, String notificationTag, int visibility) { final NotificationManager notificationManager = final NotificationManager notificationManager = context.getSystemService(NotificationManager.class); context.getSystemService(NotificationManager.class); final NotificationChannel channel = new NotificationChannel(channelName, name, final NotificationChannel channel = new NotificationChannel(channelName, name, Loading @@ -178,7 +180,7 @@ public class BiometricNotificationUtils { .setOnlyAlertOnce(true) .setOnlyAlertOnce(true) .setLocalOnly(true) .setLocalOnly(true) .setAutoCancel(true) .setAutoCancel(true) .setCategory(Notification.CATEGORY_SYSTEM) .setCategory(category) .setContentIntent(pendingIntent) .setContentIntent(pendingIntent) .setVisibility(visibility) .setVisibility(visibility) .build(); .build(); Loading Loading
services/core/java/com/android/server/biometrics/sensors/BiometricNotificationUtils.java +11 −9 Original line number Original line Diff line number Diff line Loading @@ -78,7 +78,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, FACE_RE_ENROLL_CHANNEL, showNotificationHelper(context, name, title, content, pendingIntent, FACE_RE_ENROLL_CHANNEL, FACE_RE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); Notification.CATEGORY_SYSTEM, FACE_RE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); } } /** /** Loading @@ -101,7 +102,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, FACE_ENROLL_CHANNEL, showNotificationHelper(context, name, title, content, pendingIntent, FACE_ENROLL_CHANNEL, FACE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); Notification.CATEGORY_RECOMMENDATION, FACE_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); } } /** /** Loading @@ -124,8 +126,8 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, showNotificationHelper(context, name, title, content, pendingIntent, FINGERPRINT_ENROLL_CHANNEL, FINGERPRINT_ENROLL_NOTIFICATION_TAG, Notification.CATEGORY_RECOMMENDATION, FINGERPRINT_ENROLL_CHANNEL, Notification.VISIBILITY_PUBLIC); FINGERPRINT_ENROLL_NOTIFICATION_TAG, Notification.VISIBILITY_PUBLIC); } } /** /** Loading Loading @@ -159,13 +161,13 @@ public class BiometricNotificationUtils { null /* options */, UserHandle.CURRENT); null /* options */, UserHandle.CURRENT); showNotificationHelper(context, name, title, content, pendingIntent, showNotificationHelper(context, name, title, content, pendingIntent, FINGERPRINT_BAD_CALIBRATION_CHANNEL, BAD_CALIBRATION_NOTIFICATION_TAG, Notification.CATEGORY_SYSTEM, FINGERPRINT_BAD_CALIBRATION_CHANNEL, Notification.VISIBILITY_SECRET); BAD_CALIBRATION_NOTIFICATION_TAG, Notification.VISIBILITY_SECRET); } } private static void showNotificationHelper(Context context, String name, String title, private static void showNotificationHelper(Context context, String name, String title, String content, PendingIntent pendingIntent, String channelName, String content, PendingIntent pendingIntent, String category, String notificationTag, int visibility) { String channelName, String notificationTag, int visibility) { final NotificationManager notificationManager = final NotificationManager notificationManager = context.getSystemService(NotificationManager.class); context.getSystemService(NotificationManager.class); final NotificationChannel channel = new NotificationChannel(channelName, name, final NotificationChannel channel = new NotificationChannel(channelName, name, Loading @@ -178,7 +180,7 @@ public class BiometricNotificationUtils { .setOnlyAlertOnce(true) .setOnlyAlertOnce(true) .setLocalOnly(true) .setLocalOnly(true) .setAutoCancel(true) .setAutoCancel(true) .setCategory(Notification.CATEGORY_SYSTEM) .setCategory(category) .setContentIntent(pendingIntent) .setContentIntent(pendingIntent) .setVisibility(visibility) .setVisibility(visibility) .build(); .build(); Loading