diff options
| author | 2011-03-01 18:22:31 -0800 | |
|---|---|---|
| committer | 2011-03-01 18:22:31 -0800 | |
| commit | 8a358a7eedae45178f55c3b514a15e8ae4b10dba (patch) | |
| tree | 692a52d29cd5705af7c8d4766943234c9d83c003 | |
| parent | 108500ab225a9b0b275e45620b9db9dbce0d9925 (diff) | |
bug:3497143 don't print warning if it is a bug in platform - not in app.
fixing a couple of very confusing warnings..
Change-Id: I3c91fa53fc73a2fb4bee213e33af56c4bdb75fd8
| -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(); } |