webrtc notifications should use a static notification id

NEW
Unassigned

Status

()

Firefox for Android
General
5 years ago
5 years ago

People

(Reporter: wesj, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 774491 [details] [diff] [review]
Patch

webrtc notification currently generate a random id every time Fennec is run. We don't really need to do that, and a nice static id means we can clean these up if they somehow survive after fennec is killed.
(Reporter)

Updated

5 years ago
Attachment #774491 - Attachment is patch: true
Attachment #774491 - Flags: review?(mark.finkle)
Comment on attachment 774491 [details] [diff] [review]
Patch

>diff --git a/mobile/android/chrome/content/WebrtcUI.js b/mobile/android/chrome/content/WebrtcUI.js

>+  notificationId: "WEBRTC_NOTIFICATION",

"webrtc-active-notification"

>diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js

>+    // clear any left over webrtc notifications that may have snuck by
>+    sendMessageToJava({
>+      type: "Notification:Hide",
>+      id: "WEBRTC_NOTIFICATION"
>+    });
>+
>+

I would rather never need to do this. Won't the notification foreground service you are working on fix this?

r+, but remove the browser.js part. If the browser.js part is required for some reason, then I want to re-think this patch
Attachment #774491 - Flags: review?(mark.finkle) → review+
You need to log in before you can comment on or make changes to this bug.