Loading app/src/main/java/org/indin/blisslaunchero/features/notification/NotificationRepository.java +13 −5 Original line number Diff line number Diff line package org.indin.blisslaunchero.features.notification; import android.app.Notification; import android.service.notification.StatusBarNotification; import android.util.Log; import com.jakewharton.rxrelay2.BehaviorRelay; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import com.jakewharton.rxrelay2.BehaviorRelay; import android.service.notification.StatusBarNotification; import android.util.Log; /** * Created by Amit Kumar * Email : mr.doc10jl96@gmail.com Loading Loading @@ -37,6 +38,13 @@ public class NotificationRepository { Log.d(TAG, "updateNotification() called with: list = [" + list.size() + "]"); Set<String> notificationSet = new HashSet<>(); for (StatusBarNotification statusBarNotification : list) { Notification notification = statusBarNotification.getNotification(); if ((notification.flags & Notification.FLAG_ONGOING_EVENT) == Notification.FLAG_ONGOING_EVENT || (notification.flags & Notification.FLAG_FOREGROUND_SERVICE) == Notification.FLAG_FOREGROUND_SERVICE) { continue; } notificationSet.add(statusBarNotification.getPackageName()); } this.notificationRelay.accept(notificationSet); Loading Loading
app/src/main/java/org/indin/blisslaunchero/features/notification/NotificationRepository.java +13 −5 Original line number Diff line number Diff line package org.indin.blisslaunchero.features.notification; import android.app.Notification; import android.service.notification.StatusBarNotification; import android.util.Log; import com.jakewharton.rxrelay2.BehaviorRelay; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import com.jakewharton.rxrelay2.BehaviorRelay; import android.service.notification.StatusBarNotification; import android.util.Log; /** * Created by Amit Kumar * Email : mr.doc10jl96@gmail.com Loading Loading @@ -37,6 +38,13 @@ public class NotificationRepository { Log.d(TAG, "updateNotification() called with: list = [" + list.size() + "]"); Set<String> notificationSet = new HashSet<>(); for (StatusBarNotification statusBarNotification : list) { Notification notification = statusBarNotification.getNotification(); if ((notification.flags & Notification.FLAG_ONGOING_EVENT) == Notification.FLAG_ONGOING_EVENT || (notification.flags & Notification.FLAG_FOREGROUND_SERVICE) == Notification.FLAG_FOREGROUND_SERVICE) { continue; } notificationSet.add(statusBarNotification.getPackageName()); } this.notificationRelay.accept(notificationSet); Loading