Prepare notification permissions

This commit is contained in:
M66B
2022-06-09 12:38:17 +02:00
parent 5b668cb5d0
commit 45b5afca61
14 changed files with 113 additions and 55 deletions

View File

@@ -622,7 +622,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swCheckWeekly.setEnabled(checked);
if (!checked) {
NotificationManager nm =
(NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
Helper.getSystemService(getContext(), NotificationManager.class);
nm.cancel(NotificationHelper.NOTIFICATION_UPDATE);
}
}
@@ -1550,7 +1550,8 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
if (!Helper.isPlayStoreInstall() &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationManager nm = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
NotificationManager nm =
Helper.getSystemService(getContext(), NotificationManager.class);
NotificationChannel notification = nm.getNotificationChannel("update");
if (notification != null) {