diff options
Diffstat (limited to 'app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt b/app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt index 5b01a54..d6e21f5 100644 --- a/app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt +++ b/app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt | |||
@@ -36,10 +36,7 @@ import org.pacien.tincapp.utils.PendingIntentUtils | |||
36 | class AppNotificationManager(private val context: Context) { | 36 | class AppNotificationManager(private val context: Context) { |
37 | companion object { | 37 | companion object { |
38 | private const val ERROR_CHANNEL_ID = "org.pacien.tincapp.notification.channels.error" | 38 | private const val ERROR_CHANNEL_ID = "org.pacien.tincapp.notification.channels.error" |
39 | private const val CONFIG_ACCESS_CHANNEL_ID = "org.pacien.tincapp.notification.channels.configuration" | ||
40 | |||
41 | const val ERROR_NOTIFICATION_ID = 0 | 39 | const val ERROR_NOTIFICATION_ID = 0 |
42 | const val CONFIG_ACCESS_NOTIFICATION_ID = 1 | ||
43 | } | 40 | } |
44 | 41 | ||
45 | init { | 42 | init { |
@@ -65,9 +62,6 @@ class AppNotificationManager(private val context: Context) { | |||
65 | NotificationManagerCompat.from(context).cancelAll() | 62 | NotificationManagerCompat.from(context).cancelAll() |
66 | } | 63 | } |
67 | 64 | ||
68 | fun newConfigurationAccessNotificationBuilder() = | ||
69 | NotificationCompat.Builder(context, CONFIG_ACCESS_CHANNEL_ID) | ||
70 | |||
71 | @RequiresApi(Build.VERSION_CODES.O) | 65 | @RequiresApi(Build.VERSION_CODES.O) |
72 | private fun registerChannels() { | 66 | private fun registerChannels() { |
73 | context.getSystemService(NotificationManager::class.java) | 67 | context.getSystemService(NotificationManager::class.java) |
@@ -78,13 +72,6 @@ class AppNotificationManager(private val context: Context) { | |||
78 | NotificationManager.IMPORTANCE_HIGH | 72 | NotificationManager.IMPORTANCE_HIGH |
79 | )) | 73 | )) |
80 | } | 74 | } |
81 | .apply { | ||
82 | createNotificationChannel(NotificationChannel( | ||
83 | CONFIG_ACCESS_CHANNEL_ID, | ||
84 | context.getString(R.string.notification_config_access_channel_name), | ||
85 | NotificationManager.IMPORTANCE_MIN | ||
86 | )) | ||
87 | } | ||
88 | } | 75 | } |
89 | 76 | ||
90 | private fun NotificationCompat.Builder.setHighPriority() = apply { | 77 | private fun NotificationCompat.Builder.setHighPriority() = apply { |