Skip to content

Commit

Permalink
changed method to get system service
Browse files Browse the repository at this point in the history
  • Loading branch information
VWPhilipp committed Oct 5, 2021
1 parent b9e8955 commit 26159d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
}

// We cannot use NotificationManagerCompat here.
val setting = context.getSystemService(NotificationManager::class.java)!!.currentInterruptionFilter
val setting = (context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).currentInterruptionFilter

return setting == NotificationManager.INTERRUPTION_FILTER_NONE
|| setting == NotificationManager.INTERRUPTION_FILTER_ALARMS
Expand Down

0 comments on commit 26159d0

Please sign in to comment.