Bug 885783 - Attach webrtc to a foreground notification. r=bnicholson

This commit is contained in:
Wes Johnston
2013-07-18 16:35:34 -07:00
parent f570f4ebb9
commit 9dd69914c4
5 changed files with 118 additions and 49 deletions

View File

@@ -106,8 +106,7 @@ public class NotificationHelper implements GeckoEventListener {
PendingIntent pi = PendingIntent.getActivity(mContext, 0, notificationIntent, 0);
builder.setContentIntent(pi);
NotificationManager manager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
manager.notify(id.hashCode(), builder.build());
GeckoAppShell.sNotificationClient.add(id.hashCode(), builder.build());
if (!mShowing.contains(id)) {
mShowing.add(id);
}
@@ -126,8 +125,7 @@ public class NotificationHelper implements GeckoEventListener {
}
public void hideNotification(String id) {
NotificationManager manager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
manager.cancel(id.hashCode());
GeckoAppShell.sNotificationClient.remove(id.hashCode());
mShowing.remove(id);
}