Use local broadcast receivers

This commit is contained in:
M66B
2023-09-21 08:45:04 +02:00
parent 875a959188
commit 199c5d8b14
4 changed files with 33 additions and 8 deletions

View File

@@ -5153,7 +5153,10 @@ public class FragmentMessages extends FragmentBase
cm.registerNetworkCallback(builder.build(), networkCallback);
updateAirplaneMode(ConnectionHelper.airplaneMode(context));
context.registerReceiver(airplanemode, new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED));
ContextCompat.registerReceiver(context,
airplanemode,
new IntentFilter(Intent.ACTION_AIRPLANE_MODE_CHANGED),
ContextCompat.RECEIVER_NOT_EXPORTED);
boolean isIgnoring = !Boolean.FALSE.equals(Helper.isIgnoringOptimizations(context));
//boolean canSchedule = AlarmManagerCompatEx.canScheduleExactAlarms(context);