Add permission and guard for notifications on Android 13

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2022-08-29 19:30:38 +05:30
parent 298fcb1150
commit 852cba87b1
5 changed files with 54 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
/*
* Aurora Store
* Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
* Copyright (C) 2022, The Calyx Institute
*
* Aurora Store is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -56,6 +57,10 @@ fun isSAndAbove(): Boolean {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
}
fun isTAndAbove(): Boolean {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
}
fun isMIUI(): Boolean {
return getSystemProperty("ro.miui.ui.version.name").isNotEmpty()
}