e-mission / e-mission-data-collection

Repository for our own data collection
BSD 3-Clause "New" or "Revised" License
4 stars 19 forks source link

Minor fix to the notification checks #198

Closed shankari closed 2 years ago

shankari commented 2 years ago

To ensure that we don't fail if we have more permissions than requested https://github.com/e-mission/e-mission-docs/issues/722#issuecomment-1110510498

Without this fix, having sound enabled for app notifications would cause the checks to fail to fail, since the requested flags = 5 and the actual flags = 7

With this fix, we bitwise and the two values to remove the excess permissions. 7 (111) & 5 (101) = 101 = 5 = requested permissions