|
@@ -76,7 +76,8 @@ public class NotificationUtils {
|
|
}
|
|
}
|
|
|
|
|
|
public static void cancelExistingNotifications(Context context, UserEntity conversationUser) {
|
|
public static void cancelExistingNotifications(Context context, UserEntity conversationUser) {
|
|
- if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && conversationUser.getId() != -1) {
|
|
|
|
|
|
+ if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M && conversationUser.getId() != -1 &&
|
|
|
|
+ context != null) {
|
|
|
|
|
|
NotificationManager notificationManager =
|
|
NotificationManager notificationManager =
|
|
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
|
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|