@@ -267,45 +267,30 @@ class RecorderService : Service() {
267267 }
268268
269269 private fun showNotification (): Notification {
270- val hideNotification = config.hideNotification
271270 val channelId = " simple_recorder"
272271 val label = getString(R .string.app_name)
273272 val notificationManager =
274273 getSystemService(Context .NOTIFICATION_SERVICE ) as NotificationManager
275- val importance = if (hideNotification) {
276- NotificationManager .IMPORTANCE_MIN
277- } else {
278- NotificationManager .IMPORTANCE_DEFAULT
279- }
280274
281- NotificationChannel (channelId, label, importance ).apply {
275+ NotificationChannel (channelId, label, NotificationManager . IMPORTANCE_DEFAULT ).apply {
282276 setSound(null , null )
283277 notificationManager.createNotificationChannel(this )
284278 }
285279
286- var priority = NotificationManager .IMPORTANCE_DEFAULT
287- var icon = R .drawable.ic_graphic_eq_vector
288- var title = label
289- var visibility = NotificationCompat .VISIBILITY_PUBLIC
280+ val icon = R .drawable.ic_graphic_eq_vector
281+ val title = label
282+ val visibility = NotificationCompat .VISIBILITY_PUBLIC
290283 var text = getString(R .string.recording)
291284 if (status == RECORDING_PAUSED ) {
292285 text + = " (${getString(R .string.paused)} )"
293286 }
294287
295- if (hideNotification) {
296- priority = NotificationManager .IMPORTANCE_MIN
297- icon = R .drawable.ic_empty
298- title = " "
299- text = " "
300- visibility = NotificationCompat .VISIBILITY_SECRET
301- }
302-
303288 val builder = NotificationCompat .Builder (this , channelId)
304289 .setContentTitle(title)
305290 .setContentText(text)
306291 .setSmallIcon(icon)
307292 .setContentIntent(getOpenAppIntent())
308- .setPriority(priority )
293+ .setPriority(NotificationManager . IMPORTANCE_DEFAULT )
309294 .setVisibility(visibility)
310295 .setSound(null )
311296 .setOngoing(true )
0 commit comments