mirror of
https://github.com/fankes/MIUINativeNotifyIcon.git
synced 2025-09-06 10:45:20 +08:00
修复一个可能的权限问题
This commit is contained in:
@@ -59,7 +59,12 @@ val Context.isSystemInDarkMode get() = (resources.configuration.uiMode and Confi
|
|||||||
* 通知栏是否为 MIUI 样式
|
* 通知栏是否为 MIUI 样式
|
||||||
* @return [Boolean] 是否符合条件
|
* @return [Boolean] 是否符合条件
|
||||||
*/
|
*/
|
||||||
val Context.isMiuiNotifyStyle get() = Settings.System.getInt(contentResolver, "status_bar_notification_style") == 0
|
val Context.isMiuiNotifyStyle
|
||||||
|
get() = try {
|
||||||
|
Settings.System.getInt(contentResolver, "status_bar_notification_style") == 0
|
||||||
|
} catch (_: Throwable) {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统深色模式是否没开启
|
* 系统深色模式是否没开启
|
||||||
|
Reference in New Issue
Block a user