mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-02-16 11:31:34 +01:00
require Post Notifications permission if the app is the default
This commit is contained in:
parent
0078032031
commit
dbf112afde
@ -19,6 +19,7 @@
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.telecom.action.CONFIGURE_PHONE_ACCOUNT" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||
|
||||
<uses-permission
|
||||
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
|
@ -75,6 +75,12 @@ class MainActivity : SimpleActivity() {
|
||||
snackbar.setActionTextColor(getProperTextColor())
|
||||
snackbar.show()
|
||||
}
|
||||
|
||||
handleNotificationPermission { granted ->
|
||||
if (!granted) {
|
||||
toast(R.string.no_post_notifications_permissions)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
launchSetDefaultDialerIntent()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user