MOBILE-710 notifications: Correct check of foreground notifications