public void deleteAlarm()

in DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/AlarmStorage.java [103:113]


    public void deleteAlarm(Alarm toBeDeleted) {
        for (Map.Entry<String, ?> entry : mSharedPreferences.getAll().entrySet()) {
            Alarm alarm = Alarm.fromJson(entry.getValue().toString());
            if (alarm.id == toBeDeleted.id) {
                SharedPreferences.Editor editor = mSharedPreferences.edit();
                editor.remove(String.valueOf(alarm.id));
                editor.apply();
                return;
            }
        }
    }