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
@@ -11,6 +11,7 @@ import java.util.List;
/**
* Created by Phillip Hsu on 7/2/2016.
*/
@Deprecated
public class AlarmListLoader extends DataListLoader<Alarm, AlarmCursor> {
public AlarmListLoader(Context context) {
@@ -9,6 +9,7 @@ import java.util.List;
/**
* Created by Phillip Hsu on 7/2/2016.
*/
@Deprecated
// TODO: Consider C extends MyTypeBoundedCursorWrapper<D>
public abstract class DataListLoader<D, C extends CursorWrapper> extends AsyncTaskLoader<List<D>> {
@@ -14,7 +14,7 @@ public class DatabaseManager {
private static DatabaseManager sDatabaseManager;
private final Context mContext;
private final AlarmDatabaseHelper mHelper; // TODO: Should we call close() when we're done?
private final AlarmDatabaseHelper mHelper; // TODO: Call close() when *the app* is exiting.
private DatabaseManager(Context context) {
mContext = context.getApplicationContext();