Fixed closed cursor access exception on Android 4.x

platforms
This commit is contained in:
Juan Miguel Boyero Corral 2012-05-13 19:12:55 +02:00
parent 9552c6fea5
commit 4534a02874
2 changed files with 3 additions and 2 deletions

Binary file not shown.

View File

@ -114,8 +114,9 @@ public class Notifications extends Module {
/**
* Refreshes data on screen
*/
private void refreshScreen() {
private void refreshScreen() {
//Refresh data on screen
stopManagingCursor(dbCursor);
dbCursor = dbHelper.getDb().getCursor(Global.DB_TABLE_NOTIFICATIONS, selection, orderby);
startManagingCursor(dbCursor);
adapter.changeCursor(dbCursor);
@ -220,7 +221,7 @@ public class Notifications extends Module {
@Override
protected void onResume() {
super.onResume();
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(NotificationsSyncAdapterService.START_SYNC);
intentFilter.addAction(NotificationsSyncAdapterService.STOP_SYNC);