Be extra safe when posting a notification during a migration.

This commit is contained in:
Greyson Parrelli
2021-01-15 11:21:56 -05:00
parent c0c8d2caa7
commit 417d5a2804

View File

@@ -110,8 +110,12 @@ public class UserNotificationMigrationJob extends MigrationJob {
.setContentIntent(pendingIntent) .setContentIntent(pendingIntent)
.build(); .build();
try {
NotificationManagerCompat.from(context) NotificationManagerCompat.from(context)
.notify(NotificationIds.USER_NOTIFICATION_MIGRATION, notification); .notify(NotificationIds.USER_NOTIFICATION_MIGRATION, notification);
} catch (Throwable t) {
Log.w(TAG, "Failed to notify!", t);
}
} }
@Override @Override