Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 20e79e49 authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Rename notification for external file logging

parent b3e0cef0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,14 +115,14 @@ object Logger : SharedPreferences.OnSharedPreferenceChangeListener {
                        pendingPref
                ).build())

                nm.notify(NotificationUtils.NOTIFY_EXTERNAL_FILE_LOGGING, builder.build())
                nm.notify(NotificationUtils.NOTIFY_VERBOSE_LOGGING, builder.build())
            } catch(e: IOException) {
                log.log(Level.SEVERE, "Couldn't create log file", e)
                Toast.makeText(context, context.getString(R.string.logging_couldnt_create_file), Toast.LENGTH_LONG).show()
            }
        } else {
            // verbose logging is disabled -> cancel notification and remove old logs
            nm.cancel(NotificationUtils.NOTIFY_EXTERNAL_FILE_LOGGING)
            nm.cancel(NotificationUtils.NOTIFY_VERBOSE_LOGGING)
            debugDir()?.deleteRecursively()
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ import at.bitfire.davdroid.R
object NotificationUtils {

    // notification IDs
    const val NOTIFY_EXTERNAL_FILE_LOGGING = 1
    const val NOTIFY_VERBOSE_LOGGING = 1
    const val NOTIFY_REFRESH_COLLECTIONS = 2
    const val NOTIFY_FOREGROUND = 3
    const val NOTIFY_DATABASE_CORRUPTED = 4