aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt
diff options
context:
space:
mode:
authorpacien2023-07-29 23:03:12 +0200
committerpacien2023-07-30 03:53:20 +0200
commitdfb26a0d2c95d56f69f5e1e0c255d9d5d6788120 (patch)
tree5db0f2b80090592c0a8cb30851369f088e65feb7 /app/src/main/java/org/pacien/tincapp/context/AppNotificationManager.kt
parent218709850d9db0ad1cddadc115546c446e9461cd (diff)
downloadtincapp-dfb26a0d2c95d56f69f5e1e0c255d9d5d6788120.tar.gz
storage: remove embedded FTP server
Moving back the configuration files and logs to the user-accessible storage. Everything should be accessible through a file manager using the "USB storage" mode. The embedded FTP server is no longer necessary.
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.kt13
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
36class AppNotificationManager(private val context: Context) { 36class 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 {