UpcomingAlarmReceiver and PendingAlarmScheduler load alarm in background

This commit is contained in:
Phillip Hsu
2016-07-07 03:18:03 -07:00
parent 4eb27df911
commit 9380f8f579
9 changed files with 93 additions and 56 deletions
@@ -99,7 +99,7 @@ public class AlarmViewHolder extends BaseViewHolder<Alarm> implements AlarmCount
bindCountdown(false, -1);
bindDismissButton(false, "");
}
save(); // TODO: Problem! If cancelAlarm() saves the repo, this is a redundant call!
save();
}
*/
@@ -164,7 +164,6 @@ public class AlarmViewHolder extends BaseViewHolder<Alarm> implements AlarmCount
String buttonText = alarm.isSnoozed()
? getContext().getString(R.string.title_snoozing_until, formatTime(getContext(), alarm.snoozingUntil()))
: getContext().getString(R.string.dismiss_now);
// TODO: Register dynamic broadcast receiver in this class to listen for
// when this alarm crosses the upcoming threshold, so we can show this button.
bindDismissButton(visible, buttonText);
}
@@ -85,13 +85,6 @@ public class AlarmsFragment extends Fragment implements LoaderCallbacks<Cursor>,
return view;
}
@Override
public void onPause() {
super.onPause();
// TODO: Do we need to save anything?
// AlarmsRepository.getInstance(getActivity()).saveItems();
}
@Override
public void onResume() {
super.onResume();