Enable encrypted notifications coalescing on in Androoid native code.
Summary:
Notification coalescing on Android is done automatically when we pass to NotificationManager.notify() and id that has been passed previously. The OS replaces the previous notification with the new one. That said to support encrypted notifications coalescing we have to:
- Always provide brand id field of the notification.
- Put the collapseKey in the encrypted notification payload.
- One the device look for the collapseKey in the payload after decryption and use it instead of id in case it is present.
Test Plan:
- Build Android app.
- Apply this patch to the keyserver: https://gist.github.com/marcinwasowicz/4a794560ef7cdac30dc15da75918a99d
- Test that notifications like chat description update are correctly coalesced.
Reviewers: tomek, atul, bartek
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9198