Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fix to the notification checks #198

Merged
merged 1 commit into from
Apr 27, 2022

Conversation

shankari
Copy link
Contributor

To ensure that we don't fail if we have more permissions than requested
e-mission/e-mission-docs#722 (comment)

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
e-mission/e-mission-docs#722 (comment)

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
@shankari shankari merged commit a2b3e26 into e-mission:master Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant