杀死进程,清除缓存后,报错runqueryonbackgroundthread close cursor!
解决办法:
@Override
public void changeCursor(Cursor newCursor) {
Cursor oldCursor = getCursor();
super.changeCursor(newCursor);
if(oldCursor != null && oldCursor != newCursor) {
// adapter has already dealt with closing the cursor
activity.stopManagingCursor(oldCursor);
}
activity.startManagingCursor(newCursor);
}
解决办法:
@Override
public void changeCursor(Cursor newCursor) {
Cursor oldCursor = getCursor();
super.changeCursor(newCursor);
if(oldCursor != null && oldCursor != newCursor) {
// adapter has already dealt with closing the cursor
activity.stopManagingCursor(oldCursor);
}
activity.startManagingCursor(newCursor);
}
[1].[代码] [Java]代码 跳至 [1]
1
2
3
4
5
6
7
8
9
10
|
@Override
public
void
changeCursor(Cursor newCursor) {
Cursor oldCursor = getCursor();
super
.changeCursor(newCursor);
if
(oldCursor !=
null
&& oldCursor != newCursor) {
// adapter has already dealt with closing the cursor
activity.stopManagingCursor(oldCursor);
}
activity.startManagingCursor(newCursor);
}
|