Loading src/com/android/deskclock/Alarms.java +19 −16 Original line number Original line Diff line number Diff line Loading @@ -305,17 +305,17 @@ public class Alarms { // Now add the scheduled alarms // Now add the scheduled alarms final Cursor cursor = getFilteredAlarmsCursor(context.getContentResolver()); final Cursor cursor = getFilteredAlarmsCursor(context.getContentResolver()); if (cursor != null) { if (cursor != null) { if (cursor.moveToFirst()) { try { try { if (cursor.moveToFirst()) { do { do { final Alarm a = new Alarm(cursor); final Alarm a = new Alarm(cursor); alarms.add(a); alarms.add(a); } while (cursor.moveToNext()); } while (cursor.moveToNext()); } } finally { } finally { cursor.close(); cursor.close(); } } } } } Alarm alarm = null; Alarm alarm = null; Loading Loading @@ -352,6 +352,7 @@ public class Alarms { Cursor cur = getFilteredAlarmsCursor(context.getContentResolver()); Cursor cur = getFilteredAlarmsCursor(context.getContentResolver()); long now = System.currentTimeMillis(); long now = System.currentTimeMillis(); try { if (cur.moveToFirst()) { if (cur.moveToFirst()) { do { do { Alarm alarm = new Alarm(cur); Alarm alarm = new Alarm(cur); Loading @@ -364,8 +365,10 @@ public class Alarms { } } } while (cur.moveToNext()); } while (cur.moveToNext()); } } } finally { cur.close(); cur.close(); } } } /** /** * Called at system startup, on time/timezone change, and whenever * Called at system startup, on time/timezone change, and whenever Loading Loading
src/com/android/deskclock/Alarms.java +19 −16 Original line number Original line Diff line number Diff line Loading @@ -305,17 +305,17 @@ public class Alarms { // Now add the scheduled alarms // Now add the scheduled alarms final Cursor cursor = getFilteredAlarmsCursor(context.getContentResolver()); final Cursor cursor = getFilteredAlarmsCursor(context.getContentResolver()); if (cursor != null) { if (cursor != null) { if (cursor.moveToFirst()) { try { try { if (cursor.moveToFirst()) { do { do { final Alarm a = new Alarm(cursor); final Alarm a = new Alarm(cursor); alarms.add(a); alarms.add(a); } while (cursor.moveToNext()); } while (cursor.moveToNext()); } } finally { } finally { cursor.close(); cursor.close(); } } } } } Alarm alarm = null; Alarm alarm = null; Loading Loading @@ -352,6 +352,7 @@ public class Alarms { Cursor cur = getFilteredAlarmsCursor(context.getContentResolver()); Cursor cur = getFilteredAlarmsCursor(context.getContentResolver()); long now = System.currentTimeMillis(); long now = System.currentTimeMillis(); try { if (cur.moveToFirst()) { if (cur.moveToFirst()) { do { do { Alarm alarm = new Alarm(cur); Alarm alarm = new Alarm(cur); Loading @@ -364,8 +365,10 @@ public class Alarms { } } } while (cur.moveToNext()); } while (cur.moveToNext()); } } } finally { cur.close(); cur.close(); } } } /** /** * Called at system startup, on time/timezone change, and whenever * Called at system startup, on time/timezone change, and whenever Loading