This commit is contained in:
Oizaro 2020-09-17 14:10:14 +02:00
parent ab6078f366
commit cd9f3bf270
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ public class StatusNotification {
private static boolean notificationExists = false;
public static void Notify(Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && NotificationManagerCompat.from(context).areNotificationsEnabled()) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && NotificationManagerCompat.from(context.getApplicationContext()).areNotificationsEnabled()) {
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
boolean isChannelEnabled = true;