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

Commit 87a61c0b authored by Isaac Katzenelson's avatar Isaac Katzenelson Committed by Isaac Katzenelson
Browse files

Check for null context when adding an alarm

Bug: 10760079
Change-Id: Ib2d861db22773c07ea6b6f9f64b5d35069976376
(cherry picked from commit 34b04eb4)
parent 3604ac38
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;
            }