Notification manager shouldn’t be null

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-01-14 02:04:11 +01:00
parent 59e9da8984
commit 075cd9f79f

View File

@ -195,8 +195,10 @@ public class MagicFirebaseMessagingService extends FirebaseMessagingService {
crc32 = new CRC32(); crc32 = new CRC32();
crc32.update(stringForCrc.getBytes()); crc32.update(stringForCrc.getBytes());
if (notificationManager != null) {
notificationManager.notify((int) crc32.getValue(), notificationBuilder.build()); notificationManager.notify((int) crc32.getValue(), notificationBuilder.build());
} }
}
} }
} catch (NoSuchAlgorithmException e1) { } catch (NoSuchAlgorithmException e1) {