Only request the POST_NOTIFICATIONS permission in tests on API 33

This commit is contained in:
Alexander Bakker 2022-09-14 21:36:31 +02:00
parent 1e3ceefeec
commit 06405d10ad
3 changed files with 13 additions and 3 deletions

View file

@ -94,7 +94,7 @@ public class AuthActivity extends AegisActivity {
// A persistent notification is shown to let the user know that the vault is unlocked. Permission
// to do so is required since API 33, so for existing users, we have to request permission here
// in order to be able to show the notification after unlock.
if (Build.VERSION.SDK_INT >= 33) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
PermissionHelper.request(this, CODE_PERM_NOTIFICATIONS, Manifest.permission.POST_NOTIFICATIONS);
}
} else {