Loading app/src/main/java/org/mozilla/fenix/session/NotificationSessionObserver.kt +3 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,9 @@ class NotificationSessionObserver( } override fun onSessionAdded(session: Session) { if (session.private) { // Custom tabs are meant to feel like part of the app that opened them, not Fenix, so we // don't need to show a 'close tab' notification for them if (session.private && !session.isCustomTabSession()) { SessionNotificationService.start(context) } } Loading app/src/main/java/org/mozilla/fenix/session/SessionNotificationService.kt +8 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,14 @@ import org.mozilla.fenix.ext.metrics import org.mozilla.fenix.ext.sessionsOfType /** * As long as a session is active this service will keep the notification (and our process) alive. * Manages notifications for private tabs. * * Private tab notifications solve two problems for us: * 1 - They allow users to interact with us from outside of the app (example: by closing all * private tabs). * 2 - The notification will keep our process alive, allowing us to keep private tabs in memory. * * As long as a session is active this service will keep its notification alive. */ class SessionNotificationService : Service() { Loading Loading
app/src/main/java/org/mozilla/fenix/session/NotificationSessionObserver.kt +3 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,9 @@ class NotificationSessionObserver( } override fun onSessionAdded(session: Session) { if (session.private) { // Custom tabs are meant to feel like part of the app that opened them, not Fenix, so we // don't need to show a 'close tab' notification for them if (session.private && !session.isCustomTabSession()) { SessionNotificationService.start(context) } } Loading
app/src/main/java/org/mozilla/fenix/session/SessionNotificationService.kt +8 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,14 @@ import org.mozilla.fenix.ext.metrics import org.mozilla.fenix.ext.sessionsOfType /** * As long as a session is active this service will keep the notification (and our process) alive. * Manages notifications for private tabs. * * Private tab notifications solve two problems for us: * 1 - They allow users to interact with us from outside of the app (example: by closing all * private tabs). * 2 - The notification will keep our process alive, allowing us to keep private tabs in memory. * * As long as a session is active this service will keep its notification alive. */ class SessionNotificationService : Service() { Loading