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
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