Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34b04eb4 authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Check for null context when adding an alarm

Bug: 10760079
Change-Id: Ib2d861db22773c07ea6b6f9f64b5d35069976376
parent 3993e64d
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -1717,6 +1717,7 @@ public class AlarmClockFragment extends DeskClockFragment implements

            @Override
            protected AlarmInstance doInBackground(Void... parameters) {
                if (context != null && alarm != null) {
                    ContentResolver cr = context.getContentResolver();

                    // Add alarm to db
@@ -1726,6 +1727,7 @@ public class AlarmClockFragment extends DeskClockFragment implements
                    if (newAlarm.enabled) {
                        return setupAlarmInstance(context, newAlarm);
                    }
                }
                return null;
            }