diff options
| -rw-r--r-- | core/java/android/database/AbstractWindowedCursor.java | 3 | ||||
| -rw-r--r-- | core/java/android/database/CursorWindow.java | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/core/java/android/database/AbstractWindowedCursor.java b/core/java/android/database/AbstractWindowedCursor.java index 8addaa83d090..3d957693f652 100644 --- a/core/java/android/database/AbstractWindowedCursor.java +++ b/core/java/android/database/AbstractWindowedCursor.java @@ -117,7 +117,8 @@ public abstract class AbstractWindowedCursor extends AbstractCursor { super.checkPosition(); if (mWindow == null) { - throw new StaleDataException("Attempting to access a closed cursor"); + throw new StaleDataException("Attempting to access a closed CursorWindow." + + "Most probable cause: cursor is deactivated prior to calling this method."); } } diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java index bd78063fc5ed..7a2d27137ee1 100644 --- a/core/java/android/database/CursorWindow.java +++ b/core/java/android/database/CursorWindow.java @@ -568,12 +568,9 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { if (nWindow == 0) { return; } - if (StrictMode.vmSqliteObjectLeaksEnabled()) { - StrictMode.onSqliteObjectLeaked( - "Releasing cursor in a finalizer. Please ensure " + - "that you explicitly call close() on your cursor: ", - mStackTrace); - } + // due to bugs 3329504, 3502276, cursorwindow sometimes is closed in fialize() + // don't print any warning saying "don't release cursor in finzlize" + // because it is a bug in framework code - NOT an app bug. recordClosingOfWindow(nWindow); close_native(); } |